mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET: Inline const values in samples where used only once (#1387)
* Inline const values in samples where used only once * Fix some spacing issues and use consistent ordering of settings/params
This commit is contained in:
committed by
GitHub
Unverified
parent
3730db3e94
commit
d6fdb91480
@@ -21,8 +21,8 @@ static string GetWeather([Description("The location to get the weather for.")] s
|
||||
AIAgent agent = new AzureOpenAIClient(
|
||||
new Uri(endpoint),
|
||||
new AzureCliCredential())
|
||||
.GetChatClient(deploymentName)
|
||||
.CreateAIAgent(instructions: "You are a helpful assistant", tools: [AIFunctionFactory.Create(GetWeather)]);
|
||||
.GetChatClient(deploymentName)
|
||||
.CreateAIAgent(instructions: "You are a helpful assistant", tools: [AIFunctionFactory.Create(GetWeather)]);
|
||||
|
||||
// Non-streaming agent interaction with function tools.
|
||||
Console.WriteLine(await agent.RunAsync("What is the weather like in Amsterdam?"));
|
||||
|
||||
Reference in New Issue
Block a user