From 840cb9fa531c5a7d6f4d3bc05827e24a4332c2a1 Mon Sep 17 00:00:00 2001 From: Dmitrii Medvedev Date: Mon, 18 Aug 2025 16:43:12 +0300 Subject: [PATCH] Make ChoiceDeltaToolCall.index optional --- Sources/OpenAI/Public/Models/ChatStreamResult.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/OpenAI/Public/Models/ChatStreamResult.swift b/Sources/OpenAI/Public/Models/ChatStreamResult.swift index 05052467..c1f30216 100644 --- a/Sources/OpenAI/Public/Models/ChatStreamResult.swift +++ b/Sources/OpenAI/Public/Models/ChatStreamResult.swift @@ -71,7 +71,7 @@ public struct ChatStreamResult: Codable, Equatable, Sendable { public struct ChoiceDeltaToolCall: Codable, Equatable, Sendable { - public let index: Int + public let index: Int? /// The ID of the tool call. public let id: String? /// The function that the model called.