mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET: Fix samples, improve readme language and add readme to sln. (#942)
* Fix samples, improve readme language and add readme to sln. * Fix threading in openai samples too.
This commit is contained in:
+4
-3
@@ -49,8 +49,9 @@ async Task SKAgentAsync()
|
||||
{
|
||||
Console.WriteLine("\n=== SK Agent ===\n");
|
||||
|
||||
OpenAIResponseAgent agent = new(new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
|
||||
.GetOpenAIResponseClient(deploymentName))
|
||||
var responseClient = new AzureOpenAIClient(new Uri(endpoint), new AzureCliCredential())
|
||||
.GetOpenAIResponseClient(deploymentName);
|
||||
OpenAIResponseAgent agent = new(responseClient)
|
||||
{
|
||||
Name = "Joker",
|
||||
Instructions = "You are good at telling jokes.",
|
||||
@@ -69,7 +70,7 @@ async Task SKAgentAsync()
|
||||
}
|
||||
};
|
||||
|
||||
Microsoft.SemanticKernel.Agents.AgentThread? thread = null;
|
||||
Microsoft.SemanticKernel.Agents.AgentThread? thread = new OpenAIResponseAgentThread(responseClient);
|
||||
await foreach (var item in agent.InvokeAsync(userInput, thread, agentOptions))
|
||||
{
|
||||
foreach (var content in item.Message.Items)
|
||||
|
||||
Reference in New Issue
Block a user