fix: take messages with empty tool_calls as normal messages
This commit is contained in:
parent
117cf548fe
commit
b7ee0ea7b3
@ -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…
x
Reference in New Issue
Block a user