Skip to content

Commit 7dfd115

Browse files
Merge branch 'main' into main
2 parents f9ece53 + a39b2ba commit 7dfd115

File tree

491 files changed

+19049
-6000
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

491 files changed

+19049
-6000
lines changed

.github/upgrades/prompts/SemanticKernelToAgentFramework.md

Lines changed: 1639 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/python-integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ jobs:
322322
# Opens tcp port 6379 on the host and service container
323323
- 6379:6379
324324
weaviate:
325-
image: cr.weaviate.io/semitechnologies/weaviate:1.26.6
325+
image: cr.weaviate.io/semitechnologies/weaviate:1.33.3
326326
ports:
327327
- 8080:8080
328328
- 50051:50051

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,9 @@ FodyWeavers.xsd
415415
*.iml
416416
*.iws
417417

418+
# VS Code
419+
.vscode/
420+
418421
.env
419422
certs/
420423
launchSettings.json

dotnet/Directory.Packages.props

Lines changed: 57 additions & 49 deletions
Large diffs are not rendered by default.

dotnet/SK-dotnet.slnx

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,55 @@
2727
<Project Path="samples/GettingStartedWithVectorStores/GettingStartedWithVectorStores.csproj" />
2828
<Project Path="samples/LearnResources/LearnResources.csproj" />
2929
</Folder>
30+
<Folder Name="/samples/AgentFrameworkMigration/" />
31+
<Folder Name="/samples/AgentFrameworkMigration/OpenAI/">
32+
<Project Path="samples/AgentFrameworkMigration/OpenAI/Step01_Basics/OpenAI_Step01_Basics.csproj" />
33+
<Project Path="samples/AgentFrameworkMigration/OpenAI/Step02_ToolCall/OpenAI_Step02_ToolCall.csproj" />
34+
<Project Path="samples/AgentFrameworkMigration/OpenAI/Step03_DependencyInjection/OpenAI_Step03_DependencyInjection.csproj" />
35+
</Folder>
36+
<Folder Name="/samples/AgentFrameworkMigration/AzureOpenAI/">
37+
<Project Path="samples/AgentFrameworkMigration/AzureOpenAI/Step01_Basics/AzureOpenAI_Step01_Basics.csproj" />
38+
<Project Path="samples/AgentFrameworkMigration/AzureOpenAI/Step02_ToolCall/AzureOpenAI_Step02_ToolCall.csproj" />
39+
<Project Path="samples/AgentFrameworkMigration/AzureOpenAI/Step03_DependencyInjection/AzureOpenAI_Step03_DependencyInjection.csproj" />
40+
</Folder>
41+
<Folder Name="/samples/AgentFrameworkMigration/OpenAIAssistants/">
42+
<Project Path="samples/AgentFrameworkMigration/OpenAIAssistants/Step01_Basics/OpenAIAssistants_Step01_Basics.csproj" />
43+
<Project Path="samples/AgentFrameworkMigration/OpenAIAssistants/Step02_ToolCall/OpenAIAssistants_Step02_ToolCall.csproj" />
44+
<Project Path="samples/AgentFrameworkMigration/OpenAIAssistants/Step03_DependencyInjection/OpenAIAssistants_Step03_DependencyInjection.csproj" />
45+
<Project Path="samples/AgentFrameworkMigration/OpenAIAssistants/Step04_CodeInterpreter/OpenAIAssistants_Step04_CodeInterpreter.csproj" />
46+
</Folder>
47+
<Folder Name="/samples/AgentFrameworkMigration/AzureOpenAIAssistants/">
48+
<Project Path="samples/AgentFrameworkMigration/AzureOpenAIAssistants/Step01_Basics/AzureOpenAIAssistants_Step01_Basics.csproj" />
49+
<Project Path="samples/AgentFrameworkMigration/AzureOpenAIAssistants/Step02_ToolCall/AzureOpenAIAssistants_Step02_ToolCall.csproj" />
50+
<Project Path="samples/AgentFrameworkMigration/AzureOpenAIAssistants/Step03_DependencyInjection/AzureOpenAIAssistants_Step03_DependencyInjection.csproj" />
51+
<Project Path="samples/AgentFrameworkMigration/AzureOpenAIAssistants/Step04_CodeInterpreter/AzureOpenAIAssistants_Step04_CodeInterpreter.csproj" />
52+
</Folder>
53+
<Folder Name="/samples/AgentFrameworkMigration/OpenAIResponses/">
54+
<Project Path="samples/AgentFrameworkMigration/OpenAIResponses/Step01_Basics/OpenAIResponses_Step01_Basics.csproj" />
55+
<Project Path="samples/AgentFrameworkMigration/OpenAIResponses/Step02_ReasoningModel/OpenAIResponses_Step02_ReasoningModel.csproj" />
56+
<Project Path="samples/AgentFrameworkMigration/OpenAIResponses/Step03_ToolCall/OpenAIResponses_Step03_ToolCall.csproj" />
57+
<Project Path="samples/AgentFrameworkMigration/OpenAIResponses/Step04_DependencyInjection/OpenAIResponses_Step04_DependencyInjection.csproj" />
58+
</Folder>
59+
<Folder Name="/samples/AgentFrameworkMigration/AzureOpenAIResponses/">
60+
<Project Path="samples/AgentFrameworkMigration/AzureOpenAIResponses/Step01_Basics/AzureOpenAIResponses_Step01_Basics.csproj" />
61+
<Project Path="samples/AgentFrameworkMigration/AzureOpenAIResponses/Step02_ReasoningModel/AzureOpenAIResponses_Step02_ReasoningModel.csproj" />
62+
<Project Path="samples/AgentFrameworkMigration/AzureOpenAIResponses/Step03_ToolCall/AzureOpenAIResponses_Step03_ToolCall.csproj" />
63+
<Project Path="samples/AgentFrameworkMigration/AzureOpenAIResponses/Step04_DependencyInjection/AzureOpenAIResponses_Step04_DependencyInjection.csproj" />
64+
</Folder>
65+
<Folder Name="/samples/AgentFrameworkMigration/AzureAIFoundry/">
66+
<Project Path="samples/AgentFrameworkMigration/AzureAIFoundry/Step01_Basics/AzureAIFoundry_Step01_Basics.csproj" />
67+
<Project Path="samples/AgentFrameworkMigration/AzureAIFoundry/Step02_ToolCall/AzureAIFoundry_Step02_ToolCall.csproj" />
68+
<Project Path="samples/AgentFrameworkMigration/AzureAIFoundry/Step03_DependencyInjection/AzureAIFoundry_Step03_DependencyInjection.csproj" />
69+
<Project Path="samples/AgentFrameworkMigration/AzureAIFoundry/Step04_CodeInterpreter/AzureAIFoundry_Step04_CodeInterpreter.csproj" />
70+
</Folder>
71+
<Folder Name="/samples/AgentFrameworkMigration/AgentOrchestrations/">
72+
<Project Path="samples/AgentFrameworkMigration/AgentOrchestrations/Step01_Concurrent/AgentOrchestrations_Step01_Concurrent.csproj" />
73+
<Project Path="samples/AgentFrameworkMigration/AgentOrchestrations/Step02_Sequential/AgentOrchestrations_Step02_Sequential.csproj" />
74+
<Project Path="samples/AgentFrameworkMigration/AgentOrchestrations/Step03_Handoff/AgentOrchestrations_Step03_Handoff.csproj" />
75+
</Folder>
76+
<Folder Name="/samples/AgentFrameworkMigration/Playground/">
77+
<Project Path="samples/AgentFrameworkMigration/Playground/SemanticKernelBasic/SemanticKernelBasic.csproj" />
78+
</Folder>
3079
<Folder Name="/samples/Demos/">
3180
<File Path="samples/Demos/README.md" />
3281
<Project Path="samples/Demos/AIModelRouter/AIModelRouter.csproj" />
@@ -40,8 +89,8 @@
4089
<Project Path="samples/Demos/ModelContextProtocolPlugin/ModelContextProtocolPlugin.csproj" />
4190
<Project Path="samples/Demos/ModelContextProtocolPluginAuth/ModelContextProtocolPluginAuth.csproj" />
4291
<Project Path="samples/Demos/OllamaFunctionCalling/OllamaFunctionCalling.csproj" />
43-
<Project Path="samples/Demos/OnnxSimpleRAG/OnnxSimpleRAG.csproj" />
4492
<Project Path="samples/Demos/OnnxSimpleChatWithCuda/OnnxSimpleChatWithCuda.csproj" />
93+
<Project Path="samples/Demos/OnnxSimpleRAG/OnnxSimpleRAG.csproj" />
4594
<Project Path="samples/Demos/OpenAIRealtime/OpenAIRealtime.csproj" />
4695
<Project Path="samples/Demos/ProcessWithDapr/ProcessWithDapr.csproj" />
4796
<Project Path="samples/Demos/QualityCheck/QualityCheckWithFilters/QualityCheckWithFilters.csproj" />
@@ -50,6 +99,7 @@
5099
<Project Path="samples/Demos/TelemetryWithAppInsights/TelemetryWithAppInsights.csproj" />
51100
<Project Path="samples/Demos/TimePlugin/TimePlugin.csproj" />
52101
<Project Path="samples/Demos/VectorStoreRAG/VectorStoreRAG.csproj" />
102+
<Project Path="samples/Demos/VoiceChat/VoiceChat.csproj" />
53103
</Folder>
54104
<Folder Name="/samples/Demos/A2AClientServer/">
55105
<Project Path="samples/Demos/A2AClientServer/A2AClient/A2AClient.csproj" />

dotnet/nuget/nuget-package.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project>
22
<PropertyGroup>
33
<!-- Central version prefix - applies to all nuget packages. -->
4-
<VersionPrefix>1.65.0</VersionPrefix>
4+
<VersionPrefix>1.66.0</VersionPrefix>
55
<PackageVersion Condition="'$(VersionSuffix)' != ''">$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
66
<PackageVersion Condition="'$(VersionSuffix)' == ''">$(VersionPrefix)</PackageVersion>
77

88
<Configurations>Debug;Release;Publish</Configurations>
99
<IsPackable>true</IsPackable>
1010

1111
<!-- Package validation. Baseline Version should be the latest version available on NuGet. -->
12-
<PackageValidationBaselineVersion>1.64.0</PackageValidationBaselineVersion>
12+
<PackageValidationBaselineVersion>1.65.0</PackageValidationBaselineVersion>
1313
<!-- Validate assembly attributes only for Publish builds -->
1414
<NoWarn Condition="'$(Configuration)' != 'Publish'">$(NoWarn);CP0003</NoWarn>
1515
<!-- Do not validate reference assemblies -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net9.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
<NoWarn>$(NoWarn);CA1707;CA1812;CA2007;RCS1102;VSTHRD111;VSTHRD200</NoWarn>
9+
<InjectSharedThrow>true</InjectSharedThrow>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="Microsoft.Agents.AI.Abstractions" />
14+
<PackageReference Include="Microsoft.Agents.AI.AzureAI" />
15+
<PackageReference Include="Microsoft.Agents.AI.Workflows" />
16+
</ItemGroup>
17+
18+
<ItemGroup>
19+
<ProjectReference Include="..\..\..\..\src\Agents\AzureAI\Agents.AzureAI.csproj" />
20+
<ProjectReference Include="..\..\..\..\src\Agents\Core\Agents.Core.csproj" />
21+
<ProjectReference Include="..\..\..\..\src\Agents\Orchestration\Agents.Orchestration.csproj" />
22+
<ProjectReference Include="..\..\..\..\src\Agents\Runtime\InProcess\Runtime.InProcess.csproj" />
23+
<ProjectReference Include="..\..\..\..\src\SemanticKernel.MetaPackage\SemanticKernel.MetaPackage.csproj" />
24+
</ItemGroup>
25+
26+
</Project>
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
// Copyright (c) Microsoft. All rights reserved.
2+
3+
using Azure.AI.OpenAI;
4+
using Azure.Identity;
5+
using Microsoft.Agents.AI;
6+
using Microsoft.Agents.AI.Workflows;
7+
using Microsoft.Extensions.AI;
8+
using Microsoft.SemanticKernel;
9+
using Microsoft.SemanticKernel.Agents;
10+
using Microsoft.SemanticKernel.Agents.Orchestration;
11+
using Microsoft.SemanticKernel.Agents.Orchestration.Concurrent;
12+
using Microsoft.SemanticKernel.Agents.Runtime.InProcess;
13+
14+
var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set.");
15+
var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
16+
17+
var agentInstructions = "You are a translation assistant who only responds in {0}. Respond to any input by outputting the name of the input language and then translating the input to {0}.";
18+
19+
// This sample compares running concurrent orchestrations using
20+
// Semantic Kernel and the Agent Framework.
21+
Console.WriteLine("=== Semantic Kernel Concurrent Orchestration ===");
22+
await SKConcurrentOrchestration();
23+
24+
Console.WriteLine("\n=== Agent Framework Concurrent Agent Workflow ===");
25+
await AFConcurrentAgentWorkflow();
26+
27+
# region SKConcurrentOrchestration
28+
#pragma warning disable SKEXP0110 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
29+
async Task SKConcurrentOrchestration()
30+
{
31+
ConcurrentOrchestration orchestration = new([
32+
GetSKTranslationAgent("French"),
33+
GetSKTranslationAgent("Spanish")])
34+
{
35+
StreamingResponseCallback = StreamingResultCallback,
36+
};
37+
38+
InProcessRuntime runtime = new();
39+
await runtime.StartAsync();
40+
41+
// Run the orchestration
42+
OrchestrationResult<string[]> result = await orchestration.InvokeAsync("Hello, world!", runtime);
43+
string[] texts = await result.GetValueAsync(TimeSpan.FromSeconds(20));
44+
45+
await runtime.RunUntilIdleAsync();
46+
}
47+
#pragma warning restore SKEXP0110 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
48+
49+
ChatCompletionAgent GetSKTranslationAgent(string targetLanguage)
50+
{
51+
var kernel = Kernel.CreateBuilder().AddAzureOpenAIChatCompletion(deploymentName, endpoint, new AzureCliCredential()).Build();
52+
return new ChatCompletionAgent()
53+
{
54+
Kernel = kernel,
55+
Instructions = string.Format(agentInstructions, targetLanguage),
56+
Description = $"Agent that translates texts to {targetLanguage}",
57+
Name = $"SKTranslationAgent_{targetLanguage}"
58+
};
59+
}
60+
61+
ValueTask StreamingResultCallback(StreamingChatMessageContent streamedResponse, bool isFinal)
62+
{
63+
Console.Write(streamedResponse.Content);
64+
65+
if (isFinal)
66+
{
67+
Console.WriteLine();
68+
}
69+
70+
return ValueTask.CompletedTask;
71+
}
72+
# endregion
73+
74+
# region AFConcurrentAgentWorkflow
75+
async Task AFConcurrentAgentWorkflow()
76+
{
77+
var client = new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential()).GetChatClient(deploymentName).AsIChatClient();
78+
var frenchAgent = GetAFTranslationAgent("French", client);
79+
var spanishAgent = GetAFTranslationAgent("Spanish", client);
80+
var concurrentAgentWorkflow = AgentWorkflowBuilder.BuildConcurrent([frenchAgent, spanishAgent]);
81+
82+
await using StreamingRun run = await InProcessExecution.StreamAsync(concurrentAgentWorkflow, "Hello, world!");
83+
await run.TrySendMessageAsync(new TurnToken(emitEvents: true));
84+
85+
string? lastExecutorId = null;
86+
await foreach (WorkflowEvent evt in run.WatchStreamAsync().ConfigureAwait(false))
87+
{
88+
if (evt is AgentRunUpdateEvent e)
89+
{
90+
if (string.IsNullOrEmpty(e.Update.Text))
91+
{
92+
continue;
93+
}
94+
95+
if (e.ExecutorId != lastExecutorId)
96+
{
97+
lastExecutorId = e.ExecutorId;
98+
Console.WriteLine();
99+
Console.Write($"{e.Update.AuthorName}: ");
100+
}
101+
102+
Console.Write(e.Update.Text);
103+
}
104+
}
105+
}
106+
107+
ChatClientAgent GetAFTranslationAgent(string targetLanguage, IChatClient chatClient) =>
108+
new(chatClient, string.Format(agentInstructions, targetLanguage), name: $"AFTranslationAgent_{targetLanguage}");
109+
# endregion
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net9.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
<NoWarn>$(NoWarn);CA1707;CA1812;CA2007;RCS1102;VSTHRD111;VSTHRD200</NoWarn>
9+
<InjectSharedThrow>true</InjectSharedThrow>
10+
</PropertyGroup>
11+
12+
<ItemGroup>
13+
<PackageReference Include="Microsoft.Agents.AI.Abstractions" />
14+
<PackageReference Include="Microsoft.Agents.AI.AzureAI" />
15+
<PackageReference Include="Microsoft.Agents.AI.Workflows" />
16+
</ItemGroup>
17+
18+
<ItemGroup>
19+
<ProjectReference Include="..\..\..\..\src\Agents\AzureAI\Agents.AzureAI.csproj" />
20+
<ProjectReference Include="..\..\..\..\src\Agents\Core\Agents.Core.csproj" />
21+
<ProjectReference Include="..\..\..\..\src\Agents\Orchestration\Agents.Orchestration.csproj" />
22+
<ProjectReference Include="..\..\..\..\src\Agents\Runtime\InProcess\Runtime.InProcess.csproj" />
23+
<ProjectReference Include="..\..\..\..\src\SemanticKernel.MetaPackage\SemanticKernel.MetaPackage.csproj" />
24+
</ItemGroup>
25+
26+
</Project>
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
// Copyright (c) Microsoft. All rights reserved.
2+
3+
using Azure.AI.OpenAI;
4+
using Azure.Identity;
5+
using Microsoft.Agents.AI;
6+
using Microsoft.Agents.AI.Workflows;
7+
using Microsoft.Extensions.AI;
8+
using Microsoft.SemanticKernel;
9+
using Microsoft.SemanticKernel.Agents;
10+
using Microsoft.SemanticKernel.Agents.Orchestration;
11+
using Microsoft.SemanticKernel.Agents.Orchestration.Sequential;
12+
using Microsoft.SemanticKernel.Agents.Runtime.InProcess;
13+
14+
var endpoint = Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT") ?? throw new InvalidOperationException("AZURE_OPENAI_ENDPOINT is not set.");
15+
var deploymentName = Environment.GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME") ?? "gpt-4o-mini";
16+
17+
var agentInstructions = "You are a translation assistant who only responds in {0}. Respond to any input by outputting the name of the input language and then translating the input to {0}.";
18+
19+
// This sample compares running sequential orchestrations using
20+
// Semantic Kernel and the Agent Framework.
21+
Console.WriteLine("=== Semantic Kernel Sequential Orchestration ===");
22+
await SKSequentialOrchestration();
23+
24+
Console.WriteLine("\n=== Agent Framework Sequential Agent Workflow ===");
25+
await AFSequentialAgentWorkflow();
26+
27+
# region SKSequentialOrchestration
28+
#pragma warning disable SKEXP0110 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
29+
async Task SKSequentialOrchestration()
30+
{
31+
SequentialOrchestration orchestration = new([
32+
GetSKTranslationAgent("French"),
33+
GetSKTranslationAgent("Spanish"),
34+
GetSKTranslationAgent("English")])
35+
{
36+
StreamingResponseCallback = StreamingResultCallback,
37+
};
38+
39+
InProcessRuntime runtime = new();
40+
await runtime.StartAsync();
41+
42+
// Run the orchestration
43+
OrchestrationResult<string> result = await orchestration.InvokeAsync("Hello, world!", runtime);
44+
string text = await result.GetValueAsync(TimeSpan.FromSeconds(20));
45+
46+
await runtime.RunUntilIdleAsync();
47+
}
48+
#pragma warning restore SKEXP0110 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
49+
50+
ChatCompletionAgent GetSKTranslationAgent(string targetLanguage)
51+
{
52+
var kernel = Kernel.CreateBuilder().AddAzureOpenAIChatCompletion(deploymentName, endpoint, new AzureCliCredential()).Build();
53+
return new ChatCompletionAgent()
54+
{
55+
Kernel = kernel,
56+
Instructions = string.Format(agentInstructions, targetLanguage),
57+
Description = $"Agent that translates texts to {targetLanguage}",
58+
Name = $"SKTranslationAgent_{targetLanguage}"
59+
};
60+
}
61+
62+
ValueTask StreamingResultCallback(StreamingChatMessageContent streamedResponse, bool isFinal)
63+
{
64+
Console.Write(streamedResponse.Content);
65+
66+
if (isFinal)
67+
{
68+
Console.WriteLine();
69+
}
70+
71+
return ValueTask.CompletedTask;
72+
}
73+
# endregion
74+
75+
# region AFSequentialAgentWorkflow
76+
async Task AFSequentialAgentWorkflow()
77+
{
78+
var client = new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential()).GetChatClient(deploymentName).AsIChatClient();
79+
var frenchAgent = GetAFTranslationAgent("French", client);
80+
var spanishAgent = GetAFTranslationAgent("Spanish", client);
81+
var englishAgent = GetAFTranslationAgent("English", client);
82+
var sequentialAgentWorkflow = AgentWorkflowBuilder.BuildSequential(
83+
[frenchAgent, spanishAgent, englishAgent]);
84+
85+
await using StreamingRun run = await InProcessExecution.StreamAsync(sequentialAgentWorkflow, "Hello, world!");
86+
await run.TrySendMessageAsync(new TurnToken(emitEvents: true));
87+
88+
string? lastExecutorId = null;
89+
await foreach (WorkflowEvent evt in run.WatchStreamAsync().ConfigureAwait(false))
90+
{
91+
if (evt is AgentRunUpdateEvent e)
92+
{
93+
if (string.IsNullOrEmpty(e.Update.Text))
94+
{
95+
continue;
96+
}
97+
98+
if (e.ExecutorId != lastExecutorId)
99+
{
100+
lastExecutorId = e.ExecutorId;
101+
Console.WriteLine();
102+
Console.Write($"{e.Update.AuthorName}: ");
103+
}
104+
105+
Console.Write(e.Update.Text);
106+
}
107+
}
108+
}
109+
110+
ChatClientAgent GetAFTranslationAgent(string targetLanguage, IChatClient chatClient) =>
111+
new(chatClient, string.Format(agentInstructions, targetLanguage), name: $"AFTranslationAgent_{targetLanguage}");
112+
# endregion

0 commit comments

Comments
 (0)