From 118b1ba1fc05f30855f039bf367183e2dec6e4dc Mon Sep 17 00:00:00 2001 From: ranjit singh Date: Sat, 20 Sep 2025 13:53:10 +0530 Subject: [PATCH] Making the index field optional in the ChatCompletionMessageToolCallChunk struct to make it compatible with Gemini and OpenAI endpoint responses --- async-openai/src/types/chat.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/async-openai/src/types/chat.rs b/async-openai/src/types/chat.rs index d9373db6..5773689a 100644 --- a/async-openai/src/types/chat.rs +++ b/async-openai/src/types/chat.rs @@ -989,7 +989,7 @@ pub struct FunctionCallStream { #[derive(Debug, Deserialize, Serialize, Clone, PartialEq)] pub struct ChatCompletionMessageToolCallChunk { - pub index: u32, + pub index: Option, /// The ID of the tool call. pub id: Option, /// The type of the tool. Currently, only `function` is supported.