mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Rename AI Agent packages to use Microsoft.Agents.AI (#913)
* Rename AI Agent packages to use Microsoft.Agents.AI * Fix for build * Fix formatting * Fix formatting * Ignore in VSTHRD200 in migration samples * Ignore in VSTHRD200 in migration samples * Add some missing projects and run format * Fix build errors * Address code review feedback * Fix merge issues --------- Co-authored-by: Mark Wallace <markwallace@microsoft.com>
This commit is contained in:
co-authored by
Mark Wallace
parent
a480ccfd16
commit
32e054f1fe
+6
-4
@@ -4,7 +4,7 @@
|
||||
|
||||
using Azure.AI.OpenAI;
|
||||
using Azure.Identity;
|
||||
using Microsoft.Extensions.AI.Agents;
|
||||
using Microsoft.Agents.AI;
|
||||
using Microsoft.SemanticKernel;
|
||||
using Microsoft.SemanticKernel.Agents.OpenAI;
|
||||
using Microsoft.SemanticKernel.Connectors.OpenAI;
|
||||
@@ -23,8 +23,7 @@ await AFAgent();
|
||||
async Task SKAgent()
|
||||
{
|
||||
Console.WriteLine("\n=== SK Agent ===\n");
|
||||
|
||||
var builder = Kernel.CreateBuilder().AddAzureOpenAIChatClient(deploymentName, endpoint, new AzureCliCredential());
|
||||
var _ = Kernel.CreateBuilder().AddAzureOpenAIChatClient(deploymentName, endpoint, new AzureCliCredential());
|
||||
|
||||
var assistantsClient = new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential()).GetAssistantClient();
|
||||
|
||||
@@ -76,6 +75,9 @@ async Task AFAgent()
|
||||
}
|
||||
|
||||
// Clean up
|
||||
await assistantClient.DeleteThreadAsync(thread.ConversationId);
|
||||
if (thread is ChatClientAgentThread chatThread)
|
||||
{
|
||||
await assistantClient.DeleteThreadAsync(chatThread.ConversationId);
|
||||
}
|
||||
await assistantClient.DeleteAssistantAsync(agent.Id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user