Skip to content

Commit 78862a2

Browse files
authored
fix: add missing fields in tool_calls (#558)
1 parent 8127072 commit 78862a2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

chat.go

+2
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ type ChatCompletionMessage struct {
7171
}
7272

7373
type ToolCall struct {
74+
// Index is not nil only in chat completion chunk object
75+
Index *int `json:"index,omitempty"`
7476
ID string `json:"id"`
7577
Type ToolType `json:"type"`
7678
Function FunctionCall `json:"function"`

0 commit comments

Comments
 (0)