From c3938a20c6c73069550e6f118188207db805d393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Cant=C3=BA?= Date: Fri, 4 Apr 2025 15:28:21 -0500 Subject: [PATCH 1/2] Update projects --- src/GenerativeAI.Microsoft/GenerativeAI.Microsoft.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GenerativeAI.Microsoft/GenerativeAI.Microsoft.csproj b/src/GenerativeAI.Microsoft/GenerativeAI.Microsoft.csproj index 05d6b8aa..23c82c96 100644 --- a/src/GenerativeAI.Microsoft/GenerativeAI.Microsoft.csproj +++ b/src/GenerativeAI.Microsoft/GenerativeAI.Microsoft.csproj @@ -32,7 +32,7 @@ - + \ No newline at end of file From aaa1eecb0f0cb36b7077cd7952b56f7071d752c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Cant=C3=BA?= Date: Mon, 7 Apr 2025 17:01:13 -0500 Subject: [PATCH 2/2] Update source --- src/GenerativeAI.Microsoft/GenerativeAIChatClient.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GenerativeAI.Microsoft/GenerativeAIChatClient.cs b/src/GenerativeAI.Microsoft/GenerativeAIChatClient.cs index 411b0be2..676abb25 100644 --- a/src/GenerativeAI.Microsoft/GenerativeAIChatClient.cs +++ b/src/GenerativeAI.Microsoft/GenerativeAIChatClient.cs @@ -81,7 +81,7 @@ private async Task CallFunctionAsync(GenerateContentRequest reques var tool = (AIFunction?) options.Tools.Where(s=>s is AIFunction).FirstOrDefault(s=>s.Name == functionCall.Name); if (tool != null) { - var result = await tool.InvokeAsync(functionCall.Arguments,cancellationToken).ConfigureAwait(false); + var result = await tool.InvokeAsync(new AIFunctionArguments(functionCall.Arguments), cancellationToken).ConfigureAwait(false); if (result != null) { var contents = request.Contents; @@ -126,7 +126,7 @@ private async IAsyncEnumerable CallFunctionStreamingAsync(Ge var tool = (AIFunction?) options.Tools.Where(s=>s is AIFunction).FirstOrDefault(s=>s.Name == functionCall.Name); if (tool != null) { - var result = await tool.InvokeAsync(functionCall.Arguments,cancellationToken).ConfigureAwait(false); + var result = await tool.InvokeAsync(new AIFunctionArguments(functionCall.Arguments), cancellationToken).ConfigureAwait(false); if (result != null) { var contents = request.Contents;