Skip to content

Commit

Permalink
✨ feat: support minimax as a new provider (lobehub#2087)
Browse files Browse the repository at this point in the history
* add minimax as provider

* add i18n token

* update

* update

* Revert "add i18n token"

This reverts commit 4be6d67.

* 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
  • Loading branch information
Yanyutin753 committed May 11, 2024
1 parent 557e201 commit b2a57d7
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/app/api/chat/agentRuntime.ts
Expand Up @@ -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();

Expand Down Expand Up @@ -230,4 +223,4 @@ export const createTraceOptions = (
[LOBE_CHAT_TRACE_ID]: trace?.id,
},
};
};
};

0 comments on commit b2a57d7

Please sign in to comment.