mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-16 12:36:07 +00:00
🐛 fix: fix xAI API calling, not support stream_options (#7353)
* 🐛 fix: fix xAI API calling, not support `stream_options` * 🐛 fix: try to fix ci error
This commit is contained in:
@@ -10,4 +10,8 @@ testProvider({
|
||||
defaultBaseURL: 'https://api.x.ai/v1',
|
||||
chatDebugEnv: 'DEBUG_XAI_CHAT_COMPLETION',
|
||||
chatModel: 'grok',
|
||||
|
||||
test: {
|
||||
skipAPICall: true,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -9,6 +9,10 @@ export interface XAIModelCard {
|
||||
|
||||
export const LobeXAI = LobeOpenAICompatibleFactory({
|
||||
baseURL: 'https://api.x.ai/v1',
|
||||
chatCompletion: {
|
||||
// xAI API does not support stream_options: { include_usage: true }
|
||||
excludeUsage: true,
|
||||
},
|
||||
debug: {
|
||||
chatCompletion: () => process.env.DEBUG_XAI_CHAT_COMPLETION === '1',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user