From 78862a2798df46f6ca8bb73350b720f9c8d4a592 Mon Sep 17 00:00:00 2001 From: Simone Vellei Date: Thu, 9 Nov 2023 15:05:03 +0100 Subject: [PATCH] fix: add missing fields in tool_calls (#558) --- chat.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chat.go b/chat.go index 9ad31c4..ebdc0e2 100644 --- a/chat.go +++ b/chat.go @@ -71,6 +71,8 @@ type ChatCompletionMessage struct { } type ToolCall struct { + // Index is not nil only in chat completion chunk object + Index *int `json:"index,omitempty"` ID string `json:"id"` Type ToolType `json:"type"` Function FunctionCall `json:"function"`