mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET: Update Foundry Agents to latest 2.0.0 alpha.20251107.3 (#2050)
* Update extensions for new CreateVersionOptions structure * Update unit tests * Addresss capitalized
This commit is contained in:
committed by
GitHub
Unverified
parent
fb1f4e2799
commit
68f79d8bea
@@ -46,39 +46,39 @@ internal sealed class Program
|
||||
|
||||
private static async Task CreateAgentsAsync(Uri foundryEndpoint, IConfiguration configuration)
|
||||
{
|
||||
AgentsClient agentsClient = new(foundryEndpoint, new AzureCliCredential());
|
||||
AgentClient agentClient = new(foundryEndpoint, new AzureCliCredential());
|
||||
|
||||
await agentsClient.CreateAgentAsync(
|
||||
await agentClient.CreateAgentAsync(
|
||||
agentName: "ResearchAgent",
|
||||
agentDefinition: DefineResearchAgent(configuration),
|
||||
agentDescription: "Planner agent for DeepResearch workflow");
|
||||
|
||||
await agentsClient.CreateAgentAsync(
|
||||
await agentClient.CreateAgentAsync(
|
||||
agentName: "PlannerAgent",
|
||||
agentDefinition: DefinePlannerAgent(configuration),
|
||||
agentDescription: "Planner agent for DeepResearch workflow");
|
||||
|
||||
await agentsClient.CreateAgentAsync(
|
||||
await agentClient.CreateAgentAsync(
|
||||
agentName: "ManagerAgent",
|
||||
agentDefinition: DefineManagerAgent(configuration),
|
||||
agentDescription: "Manager agent for DeepResearch workflow");
|
||||
|
||||
await agentsClient.CreateAgentAsync(
|
||||
await agentClient.CreateAgentAsync(
|
||||
agentName: "SummaryAgent",
|
||||
agentDefinition: DefineSummaryAgent(configuration),
|
||||
agentDescription: "Summary agent for DeepResearch workflow");
|
||||
|
||||
await agentsClient.CreateAgentAsync(
|
||||
await agentClient.CreateAgentAsync(
|
||||
agentName: "KnowledgeAgent",
|
||||
agentDefinition: DefineKnowledgeAgent(configuration),
|
||||
agentDescription: "Research agent for DeepResearch workflow");
|
||||
|
||||
await agentsClient.CreateAgentAsync(
|
||||
await agentClient.CreateAgentAsync(
|
||||
agentName: "CoderAgent",
|
||||
agentDefinition: DefineCoderAgent(configuration),
|
||||
agentDescription: "Coder agent for DeepResearch workflow");
|
||||
|
||||
await agentsClient.CreateAgentAsync(
|
||||
await agentClient.CreateAgentAsync(
|
||||
agentName: "WeatherAgent",
|
||||
agentDefinition: DefineWeatherAgent(configuration),
|
||||
agentDescription: "Weather agent for DeepResearch workflow");
|
||||
|
||||
@@ -55,9 +55,9 @@ internal sealed class Program
|
||||
|
||||
private static async Task CreateAgentAsync(Uri foundryEndpoint, IConfiguration configuration, AIFunction[] functions)
|
||||
{
|
||||
AgentsClient agentsClient = new(foundryEndpoint, new AzureCliCredential());
|
||||
AgentClient agentClient = new(foundryEndpoint, new AzureCliCredential());
|
||||
|
||||
await agentsClient.CreateAgentAsync(
|
||||
await agentClient.CreateAgentAsync(
|
||||
agentName: "MenuAgent",
|
||||
agentDefinition: DefineMenuAgent(configuration, functions),
|
||||
agentDescription: "Provides information about the restaurant menu");
|
||||
|
||||
@@ -45,19 +45,19 @@ internal sealed class Program
|
||||
|
||||
private static async Task CreateAgentsAsync(Uri foundryEndpoint, IConfiguration configuration)
|
||||
{
|
||||
AgentsClient agentsClient = new(foundryEndpoint, new AzureCliCredential());
|
||||
AgentClient agentClient = new(foundryEndpoint, new AzureCliCredential());
|
||||
|
||||
await agentsClient.CreateAgentAsync(
|
||||
await agentClient.CreateAgentAsync(
|
||||
agentName: "AnalystAgent",
|
||||
agentDefinition: DefineAnalystAgent(configuration),
|
||||
agentDescription: "Analyst agent for Marketing workflow");
|
||||
|
||||
await agentsClient.CreateAgentAsync(
|
||||
await agentClient.CreateAgentAsync(
|
||||
agentName: "WriterAgent",
|
||||
agentDefinition: DefineWriterAgent(configuration),
|
||||
agentDescription: "Writer agent for Marketing workflow");
|
||||
|
||||
await agentsClient.CreateAgentAsync(
|
||||
await agentClient.CreateAgentAsync(
|
||||
agentName: "EditorAgent",
|
||||
agentDefinition: DefineEditorAgent(configuration),
|
||||
agentDescription: "Editor agent for Marketing workflow");
|
||||
|
||||
@@ -45,14 +45,14 @@ internal sealed class Program
|
||||
|
||||
private static async Task CreateAgentsAsync(Uri foundryEndpoint, IConfiguration configuration)
|
||||
{
|
||||
AgentsClient agentsClient = new(foundryEndpoint, new AzureCliCredential());
|
||||
AgentClient agentClient = new(foundryEndpoint, new AzureCliCredential());
|
||||
|
||||
await agentsClient.CreateAgentAsync(
|
||||
await agentClient.CreateAgentAsync(
|
||||
agentName: "StudentAgent",
|
||||
agentDefinition: DefineStudentAgent(configuration),
|
||||
agentDescription: "Student agent for MathChat workflow");
|
||||
|
||||
await agentsClient.CreateAgentAsync(
|
||||
await agentClient.CreateAgentAsync(
|
||||
agentName: "TeacherAgent",
|
||||
agentDefinition: DefineTeacherAgent(configuration),
|
||||
agentDescription: "Teacher agent for MathChat workflow");
|
||||
|
||||
@@ -46,9 +46,9 @@ internal sealed class Program
|
||||
|
||||
private static async Task CreateAgentAsync(Uri foundryEndpoint, IConfiguration configuration)
|
||||
{
|
||||
AgentsClient agentsClient = new(foundryEndpoint, new AzureCliCredential());
|
||||
AgentClient agentClient = new(foundryEndpoint, new AzureCliCredential());
|
||||
|
||||
await agentsClient.CreateAgentAsync(
|
||||
await agentClient.CreateAgentAsync(
|
||||
agentName: "DocumentSearchAgent",
|
||||
agentDefinition: DefineSearchAgent(configuration),
|
||||
agentDescription: "Searches documents on Microsoft Learn");
|
||||
|
||||
Reference in New Issue
Block a user