.NET: Fix Semantic Kernel migration samples (#739)

* use GetOpenAIResponseClient

Signed-off-by: Jianguo Ma <jiangma@microsoft.com>

* use PersistentAgentsClient

Signed-off-by: Jianguo Ma <jiangma@microsoft.com>

---------

Signed-off-by: Jianguo Ma <jiangma@microsoft.com>
This commit is contained in:
Jianguo Ma
2025-09-15 07:49:41 +00:00
committed by GitHub
parent 8af4918f56
commit 2a75482777
5 changed files with 5 additions and 5 deletions
@@ -42,7 +42,7 @@ async Task AFAgent()
var serviceCollection = new ServiceCollection();
serviceCollection.AddTransient((sp) => new OpenAIClient(apiKey)
.GetChatClient(modelId)
.GetOpenAIResponseClient(modelId)
.CreateAIAgent(name: "Joker", instructions: "You are good at telling jokes."));
await using ServiceProvider serviceProvider = serviceCollection.BuildServiceProvider();