Skip to content

Commit

Permalink
🐛 fix: fix function calling issue, disable stream when using tools (l…
Browse files Browse the repository at this point in the history
  • Loading branch information
hezhijie0327 authored Oct 12, 2024
1 parent acfbbf2 commit 9f8e0a9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libs/agent-runtime/siliconcloud/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ import { LobeOpenAICompatibleFactory } from '../utils/openaiCompatibleFactory';

export const LobeSiliconCloudAI = LobeOpenAICompatibleFactory({
baseURL: 'https://api.siliconflow.cn/v1',
chatCompletion: {
handlePayload: (payload) => {
return {
...payload,
stream: !payload.tools,
} as any;
},
},
debug: {
chatCompletion: () => process.env.DEBUG_SILICONCLOUD_CHAT_COMPLETION === '1',
},
Expand Down

0 comments on commit 9f8e0a9

Please sign in to comment.