.NET: Bring OpenAIResponsesChatClient temporarily (#449)

* copy OpenAIResponsesChatClient from meai temporarly

* Update dotnet/src/Microsoft.Extensions.AI.Agents.OpenAI/NewOpenAIResponsesChatClient.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add AsNewIChatClient extension method

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
SergeyMenshykh
2025-08-20 16:12:12 +01:00
committed by GitHub
Unverified
parent 0982aa9d6d
commit 011edfe420
5 changed files with 912 additions and 3 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ using Microsoft.Extensions.AI;
using Microsoft.Extensions.AI.Agents;
using Microsoft.Shared.Diagnostics;
using Microsoft.Shared.Samples;
using OpenAI;
using OpenAI.Assistants;
using OpenAI.Chat;
using OpenAI.Responses;
@@ -110,7 +111,7 @@ public class AgentSample(ITestOutputHelper output) : BaseSample(output)
private IChatClient GetOpenAIResponsesClient()
=> new OpenAIResponseClient(TestConfiguration.OpenAI.ChatModelId, TestConfiguration.OpenAI.ApiKey)
.AsIChatClient();
.AsNewIChatClient();
private NewPersistentAgentsChatClient GetAzureAIAgentPersistentClient(ChatClientAgentOptions options)
=> new(new PersistentAgentsClient(TestConfiguration.AzureAI.Endpoint, new AzureCliCredential()), options.Id!);