mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Address manual change in samples
This commit is contained in:
@@ -115,8 +115,8 @@ public class AgentSample(ITestOutputHelper output) : BaseSample(output)
|
||||
private NewPersistentAgentsChatClient GetAzureAIAgentPersistentClient(ChatClientAgentOptions options)
|
||||
=> new(new PersistentAgentsClient(TestConfiguration.AzureAI.Endpoint, new AzureCliCredential()), options.Id!);
|
||||
|
||||
private IChatClient GetOpenAIAssistantChatClient(ChatClientAgentOptions options)
|
||||
=> new AssistantClient(TestConfiguration.OpenAI.ApiKey).AsIChatClient(options.Id!);
|
||||
private NewOpenAIAssistantChatClient GetOpenAIAssistantChatClient(ChatClientAgentOptions options)
|
||||
=> new(new AssistantClient(TestConfiguration.OpenAI.ApiKey), options.Id!);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ using Azure.Identity;
|
||||
using Microsoft.Extensions.AI;
|
||||
using Microsoft.Extensions.AI.Agents;
|
||||
using Microsoft.Shared.Samples;
|
||||
using OpenAI.Assistants;
|
||||
using OpenAI.Files;
|
||||
using OpenAI.VectorStores;
|
||||
|
||||
@@ -45,8 +44,7 @@ public sealed class Step07_ChatClientAgent_UsingFileSearchTools(ITestOutputHelpe
|
||||
// Create the server-side agent Id when applicable (depending on the provider).
|
||||
agentOptions.Id = await base.AgentCreateAsync(provider, agentOptions);
|
||||
|
||||
using var chatClient = new NewOpenAIAssistantChatClient(new AssistantClient(TestConfiguration.OpenAI.ApiKey), agentOptions.Id!);
|
||||
//using var chatClient = base.GetChatClient(provider, agentOptions);
|
||||
using var chatClient = base.GetChatClient(provider, agentOptions);
|
||||
|
||||
ChatClientAgent agent = new(chatClient, agentOptions);
|
||||
|
||||
|
||||
-5
@@ -30,9 +30,4 @@
|
||||
<ItemGroup>
|
||||
<InternalsVisibleTo Include="Microsoft.Extensions.AI.Agents.Abstractions.UnitTests" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="MEAI\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user