From bdd720d93373295c457f49b129991c023b77b816 Mon Sep 17 00:00:00 2001 From: Mitchell Kutchuk Date: Tue, 28 Nov 2023 11:27:59 -0500 Subject: [PATCH] OpenAI-DotNet 7.3.7 (#191) - Fixes streaming with tools not being property copied over --- OpenAI-DotNet/Chat/Message.cs | 2 +- OpenAI-DotNet/OpenAI-DotNet.csproj | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/OpenAI-DotNet/Chat/Message.cs b/OpenAI-DotNet/Chat/Message.cs index 7af32e12..448c79fa 100644 --- a/OpenAI-DotNet/Chat/Message.cs +++ b/OpenAI-DotNet/Chat/Message.cs @@ -157,7 +157,7 @@ internal void CopyFrom(Delta other) { if (otherToolCall.Index + 1 > toolCalls.Count) { - toolCalls.Insert(otherToolCall.Index.Value, otherToolCall); + toolCalls.Insert(otherToolCall.Index.Value, new Tool(otherToolCall)); } toolCalls[otherToolCall.Index.Value].CopyFrom(otherToolCall); diff --git a/OpenAI-DotNet/OpenAI-DotNet.csproj b/OpenAI-DotNet/OpenAI-DotNet.csproj index 2f17219a..3487e7f9 100644 --- a/OpenAI-DotNet/OpenAI-DotNet.csproj +++ b/OpenAI-DotNet/OpenAI-DotNet.csproj @@ -18,8 +18,10 @@ More context [on Roger Pincombe's blog](https://rogerpincombe.com/openai-dotnet- https://github.com/RageAgainstThePixel/OpenAI-DotNet OpenAI, AI, ML, API, gpt-4, gpt-3.5-tubo, gpt-3, chatGPT, chat-gpt, gpt-2, gpt, dall-e-2, dall-e-3 OpenAI API - 7.3.6 - Version 7.3.6 + 7.3.7 + Version 7.3.7 +- Fixes streaming with tools not being property copied over +Version 7.3.6 - Fixed ArgumentOutOfRangeException when streaming chat completion response contains more than one tool Version 7.3.5 - Added GetModerationChunkedAsync method in ModerationsEndpoint