diff --git a/dotnet/src/Connectors/Connectors.AzureOpenAI.UnitTests/Core/AzureOpenAIChatMessageContentTests.cs b/dotnet/src/Connectors/Connectors.AzureOpenAI.UnitTests/Core/AzureOpenAIChatMessageContentTests.cs index 76e0b2064439..49832b221978 100644 --- a/dotnet/src/Connectors/Connectors.AzureOpenAI.UnitTests/Core/AzureOpenAIChatMessageContentTests.cs +++ b/dotnet/src/Connectors/Connectors.AzureOpenAI.UnitTests/Core/AzureOpenAIChatMessageContentTests.cs @@ -41,8 +41,8 @@ public void GetOpenAIFunctionToolCallsReturnsCorrectList() var content2 = new AzureOpenAIChatMessageContent(AuthorRole.User, "content", "model-id", []); // Act - var actualToolCalls1 = content1.GetOpenAIFunctionToolCalls(); - var actualToolCalls2 = content2.GetOpenAIFunctionToolCalls(); + var actualToolCalls1 = content1.GetFunctionToolCalls(); + var actualToolCalls2 = content2.GetFunctionToolCalls(); // Assert Assert.Equal(2, actualToolCalls1.Count); diff --git a/dotnet/src/Connectors/Connectors.AzureOpenAI/Core/AzureOpenAIChatMessageContent.cs b/dotnet/src/Connectors/Connectors.AzureOpenAI/Core/AzureOpenAIChatMessageContent.cs index ff7183cb0b12..8112d2c7dee4 100644 --- a/dotnet/src/Connectors/Connectors.AzureOpenAI/Core/AzureOpenAIChatMessageContent.cs +++ b/dotnet/src/Connectors/Connectors.AzureOpenAI/Core/AzureOpenAIChatMessageContent.cs @@ -75,15 +75,15 @@ private static ChatMessageContentItemCollection CreateContentItems(IReadOnlyList /// Retrieve the resulting function from the chat result. /// /// The , or null if no function was returned by the model. - public IReadOnlyList GetOpenAIFunctionToolCalls() + public IReadOnlyList GetFunctionToolCalls() { List? functionToolCallList = null; foreach (var toolCall in this.ToolCalls) { - if (toolCall is ChatToolCall functionToolCall) + if (toolCall.Kind == ChatToolCallKind.Function) { - (functionToolCallList ??= []).Add(new AzureOpenAIFunctionToolCall(functionToolCall)); + (functionToolCallList ??= []).Add(new AzureOpenAIFunctionToolCall(toolCall)); } } diff --git a/dotnet/src/Connectors/Connectors.AzureOpenAI/Services/AzureOpenAIChatCompletionService.cs b/dotnet/src/Connectors/Connectors.AzureOpenAI/Services/AzureOpenAIChatCompletionService.cs index bd06f49bfefa..809c6fb21f6c 100644 --- a/dotnet/src/Connectors/Connectors.AzureOpenAI/Services/AzureOpenAIChatCompletionService.cs +++ b/dotnet/src/Connectors/Connectors.AzureOpenAI/Services/AzureOpenAIChatCompletionService.cs @@ -69,16 +69,16 @@ public AzureOpenAIChatCompletionService( /// Creates a new client instance using the specified . /// /// Azure OpenAI deployment name, see https://learn.microsoft.com/azure/cognitive-services/openai/how-to/create-resource - /// Custom . + /// Custom . /// Azure OpenAI model id, see https://learn.microsoft.com/azure/cognitive-services/openai/how-to/create-resource /// The to use for logging. If null, no logging will be performed. public AzureOpenAIChatCompletionService( string deploymentName, - AzureOpenAIClient openAIClient, + AzureOpenAIClient azureOpenAIClient, string? modelId = null, ILoggerFactory? loggerFactory = null) { - this._core = new(deploymentName, openAIClient, loggerFactory?.CreateLogger(typeof(AzureOpenAIChatCompletionService))); + this._core = new(deploymentName, azureOpenAIClient, loggerFactory?.CreateLogger(typeof(AzureOpenAIChatCompletionService))); this._core.AddAttribute(AIServiceExtensions.ModelIdKey, modelId); }