.NET: [BREAKING] Renamed CreateAIAgent/GetAIAgent to AsAIAgent (#3222)

* Renamed chat client extension method

* Additional renaming

* Updated documentation

* Fixed tests

* Small fix

* Small fix
This commit is contained in:
Dmytro Struk
2026-01-15 08:01:15 -08:00
committed by GitHub
Unverified
parent e192af93a7
commit 2ab859dd94
99 changed files with 307 additions and 307 deletions
@@ -31,7 +31,7 @@ AIAgent agent = new AzureOpenAIClient(
new Uri(endpoint),
new AzureCliCredential())
.GetResponsesClient(deploymentName)
.CreateAIAgent(
.AsAIAgent(
instructions: "You answer questions by searching the Microsoft Learn content only.",
name: "MicrosoftLearnAgent",
tools: [mcpTool]);
@@ -58,7 +58,7 @@ AIAgent agentWithRequiredApproval = new AzureOpenAIClient(
new Uri(endpoint),
new AzureCliCredential())
.GetResponsesClient(deploymentName)
.CreateAIAgent(
.AsAIAgent(
instructions: "You answer questions by searching the Microsoft Learn content only.",
name: "MicrosoftLearnAgentWithApproval",
tools: [mcpToolWithApproval]);