mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.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:
committed by
GitHub
Unverified
parent
0982aa9d6d
commit
011edfe420
@@ -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!);
|
||||
|
||||
Reference in New Issue
Block a user