From b2a57d72b7b2337432a3c5fbad3ea997d636ae1e Mon Sep 17 00:00:00 2001 From: Yanyutin753 <132346501+Yanyutin753@users.noreply.github.com> Date: Sat, 11 May 2024 12:40:18 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20support=20minimax=20as=20a?= =?UTF-8?q?=20new=20provider=20(#2087)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add minimax as provider * add i18n token * update * update * Revert "add i18n token" This reverts commit 4be6d6797b4b60baa965243dc772a023b10b96f6. * add i18n token * add doc * update i18n * implement MinimaxStream * use fetchSSE function * fix TypeError and SyntaxError * add unit test * add agent runtime * add debug log * use fetch function directly * refactor(minimax): streamline response parsing logic * remove redundant error response check * fix code style --- src/app/api/chat/agentRuntime.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/app/api/chat/agentRuntime.ts b/src/app/api/chat/agentRuntime.ts index 39d6ba20fe6..7674e0886a9 100644 --- a/src/app/api/chat/agentRuntime.ts +++ b/src/app/api/chat/agentRuntime.ts @@ -115,13 +115,6 @@ const getLlmOptionsFromPayload = (provider: string, payload: JWTPayload) => { return { apiKey }; } - case ModelProvider.Minimax: { - const { MINIMAX_API_KEY } = getServerConfig(); - const apiKey = apiKeyManager.pick(payload?.apiKey || MINIMAX_API_KEY); - return { - apiKey, - }; - } case ModelProvider.Mistral: { const { MISTRAL_API_KEY } = getServerConfig(); @@ -230,4 +223,4 @@ export const createTraceOptions = ( [LOBE_CHAT_TRACE_ID]: trace?.id, }, }; -}; +}; \ No newline at end of file