Add fastgpt as seperate assistant mode

This commit is contained in:
Xin Wang
2026-03-11 08:37:34 +08:00
parent 13684d498b
commit f3612a710d
26 changed files with 2333 additions and 210 deletions

View File

@@ -95,6 +95,7 @@ const mapAssistant = (raw: AnyRecord): Assistant => ({
configMode: readField(raw, ['configMode', 'config_mode'], 'platform') as 'platform' | 'dify' | 'fastgpt' | 'none',
apiUrl: readField(raw, ['apiUrl', 'api_url'], ''),
apiKey: readField(raw, ['apiKey', 'api_key'], ''),
appId: readField(raw, ['appId', 'app_id'], ''),
llmModelId: readField(raw, ['llmModelId', 'llm_model_id'], ''),
asrModelId: readField(raw, ['asrModelId', 'asr_model_id'], ''),
embeddingModelId: readField(raw, ['embeddingModelId', 'embedding_model_id'], ''),
@@ -302,6 +303,7 @@ export const createAssistant = async (data: Partial<Assistant>): Promise<Assista
configMode: data.configMode || 'platform',
apiUrl: data.apiUrl || '',
apiKey: data.apiKey || '',
appId: data.appId || '',
llmModelId: data.llmModelId || '',
asrModelId: data.asrModelId || '',
embeddingModelId: data.embeddingModelId || '',
@@ -335,6 +337,7 @@ export const updateAssistant = async (id: string, data: Partial<Assistant>): Pro
configMode: data.configMode,
apiUrl: data.apiUrl,
apiKey: data.apiKey,
appId: data.appId,
llmModelId: data.llmModelId,
asrModelId: data.asrModelId,
embeddingModelId: data.embeddingModelId,