.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:
westey
2025-10-10 17:50:53 +01:00
committed by GitHub
Unverified
parent 3730db3e94
commit d6fdb91480
21 changed files with 53 additions and 106 deletions
@@ -25,8 +25,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: [new ApprovalRequiredAIFunction(AIFunctionFactory.Create(GetWeather))]);
.GetChatClient(deploymentName)
.CreateAIAgent(instructions: "You are a helpful assistant", tools: [new ApprovalRequiredAIFunction(AIFunctionFactory.Create(GetWeather))]);
// Call the agent and check if there are any user input requests to handle.
AgentThread thread = agent.GetNewThread();