Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion streamaccumulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (prev *chatCompletionResponseState) update(chunk ChatCompletionChunk) (just
new.state = contentResponseState
case delta.JSON.Refusal.Valid():
new.state = refusalResponseState
case delta.JSON.ToolCalls.Valid():
case delta.JSON.ToolCalls.Valid() && len(delta.ToolCalls) > 0:
new.state = toolResponseState
new.index = int(delta.ToolCalls[0].Index)
default:
Expand Down