Skip to content

Commit 17c1c0f

Browse files
committed
refactor: minimax 使用 openai model
1 parent 24f2ea5 commit 17c1c0f

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

src/cli/commands/chat.ts

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class ChatCommand extends BaseCommand {
5757
const aiDisplay = this.getDisplayContent(PromptRole.AI);
5858
let lastMessage = 'How can I help you today?';
5959

60+
console.warn = () => {};
6061
process.stdout.write(
6162
this.getDisplayContent(PromptRole.SYSTEM) + `Type ${chalk.cyan('exit')} to end this conversation\n`
6263
);

src/platform/minimax.ts

+1-15
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,11 @@
1-
import type { BaseLanguageModel } from '@langchain/core/language_models/base';
2-
3-
import { ChatMinimax } from '@langchain/community/chat_models/minimax';
4-
51
import Platform from './base';
62

73
class MiniMax extends Platform {
84
protected model = 'abab5.5-chat';
95

106
public name = 'MiniMax';
117

12-
protected server = 'api.minimax.chat';
13-
14-
protected getChatModel(apiKey?: string, streaming = false): BaseLanguageModel {
15-
return new ChatMinimax({
16-
minimaxApiKey: apiKey,
17-
minimaxGroupId: process.env.MINIMAX_GROUP_ID || '1782658868262748274',
18-
model: this.model,
19-
streaming,
20-
temperature: this.temperature
21-
});
22-
}
8+
protected server = 'api.minimax.chat/v1/text/chatcompletion_v2#';
239
}
2410

2511
export default MiniMax;

0 commit comments

Comments
 (0)