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 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;