Skip to content

Commit ee7bedd

Browse files
committed
fix: previous fix
1 parent 56710e1 commit ee7bedd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/backend/src/modules/puterai/XAIService.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,18 @@ class XAIService extends BaseService {
2121
get_system_prompt () {
2222
return PUTER_PROMPT;
2323
}
24+
25+
adapt_model (model) {
26+
return model;
27+
}
2428

2529
async _init () {
2630
this.anthropic = new Anthropic({
2731
apiKey: this.global_config.services.xai.apiKey,
2832
baseURL: 'https://api.x.ai'
2933
});
3034
}
31-
35+
3236
static IMPLEMENTS = {
3337
['puter-chat-completion']: {
3438
async list () {
@@ -37,6 +41,7 @@ class XAIService extends BaseService {
3741
];
3842
},
3943
async complete ({ messages, stream, model }) {
44+
model = this.adapt_model(model);
4045
const adapted_messages = [];
4146

4247
const system_prompts = [];

0 commit comments

Comments
 (0)