feat: chat in explore support agent (#647)
Co-authored-by: StyleZhang <jasonapring2015@outlook.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import { del, get, patch, post, put } from './base'
|
||||
import type {
|
||||
AccountIntegrate, CommonResponse, DataSourceNotion,
|
||||
IWorkspace, LangGeniusVersionResponse, Member,
|
||||
OauthResponse, Provider, ProviderAnthropicToken, ProviderAzureToken, TenantInfoResponse,
|
||||
OauthResponse, PluginProvider, Provider, ProviderAnthropicToken, ProviderAzureToken, TenantInfoResponse,
|
||||
UserProfileOriginResponse,
|
||||
} from '@/models/common'
|
||||
import type {
|
||||
@@ -102,6 +102,17 @@ export const updateDataSourceNotionAction: Fetcher<CommonResponse, { url: string
|
||||
return patch(url) as Promise<CommonResponse>
|
||||
}
|
||||
|
||||
export const fetchPluginProviders: Fetcher<PluginProvider[] | null, string> = (url) => {
|
||||
return get(url) as Promise<PluginProvider[] | null>
|
||||
}
|
||||
|
||||
export const validatePluginProviderKey: Fetcher<ValidateOpenAIKeyResponse, { url: string; body: { credentials: any } }> = ({ url, body }) => {
|
||||
return post(url, { body }) as Promise<ValidateOpenAIKeyResponse>
|
||||
}
|
||||
export const updatePluginProviderAIKey: Fetcher<UpdateOpenAIKeyResponse, { url: string; body: { credentials: any } }> = ({ url, body }) => {
|
||||
return post(url, { body }) as Promise<UpdateOpenAIKeyResponse>
|
||||
}
|
||||
|
||||
export const invitationCheck: Fetcher<CommonResponse & { is_valid: boolean; workspace_name: string }, { url: string; params: { workspace_id: string; email: string; token: string } }> = ({ url, params }) => {
|
||||
return get(url, { params }) as Promise<CommonResponse & { is_valid: boolean; workspace_name: string }>
|
||||
}
|
||||
|
Reference in New Issue
Block a user