mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
fix: take messages with empty tool_calls as normal messages
This commit is contained in:
parent
3dbfd4928c
commit
446136273f
@ -474,7 +474,7 @@ export default class OpenAIProvider extends BaseProvider {
|
||||
|
||||
const finishReason = chunk.choices[0]?.finish_reason
|
||||
|
||||
if (delta?.tool_calls) {
|
||||
if (delta?.tool_calls?.length) {
|
||||
const chunkToolCalls = delta.tool_calls
|
||||
for (const t of chunkToolCalls) {
|
||||
const { index, id, function: fn, type } = t
|
||||
|
||||
Loading…
Reference in New Issue
Block a user