@@ -33,7 +33,7 @@ public static ChatClientAgent CreateAgenticChat()
3333 {
3434 ChatClient chatClient = s_azureOpenAIClient ! . GetChatClient ( s_deploymentName ! ) ;
3535
36- return chatClient . AsIChatClient ( ) . CreateAIAgent (
36+ return chatClient . AsIChatClient ( ) . AsAIAgent (
3737 name : "AgenticChat" ,
3838 description : "A simple chat agent using Azure OpenAI" ) ;
3939 }
@@ -42,7 +42,7 @@ public static ChatClientAgent CreateBackendToolRendering()
4242 {
4343 ChatClient chatClient = s_azureOpenAIClient ! . GetChatClient ( s_deploymentName ! ) ;
4444
45- return chatClient . AsIChatClient ( ) . CreateAIAgent (
45+ return chatClient . AsIChatClient ( ) . AsAIAgent (
4646 name : "BackendToolRenderer" ,
4747 description : "An agent that can render backend tools using Azure OpenAI" ,
4848 tools : [ AIFunctionFactory . Create (
@@ -56,7 +56,7 @@ public static ChatClientAgent CreateHumanInTheLoop()
5656 {
5757 ChatClient chatClient = s_azureOpenAIClient ! . GetChatClient ( s_deploymentName ! ) ;
5858
59- return chatClient . AsIChatClient ( ) . CreateAIAgent (
59+ return chatClient . AsIChatClient ( ) . AsAIAgent (
6060 name : "HumanInTheLoopAgent" ,
6161 description : "An agent that involves human feedback in its decision-making process using Azure OpenAI" ) ;
6262 }
@@ -65,15 +65,15 @@ public static ChatClientAgent CreateToolBasedGenerativeUI()
6565 {
6666 ChatClient chatClient = s_azureOpenAIClient ! . GetChatClient ( s_deploymentName ! ) ;
6767
68- return chatClient . AsIChatClient ( ) . CreateAIAgent (
68+ return chatClient . AsIChatClient ( ) . AsAIAgent (
6969 name : "ToolBasedGenerativeUIAgent" ,
7070 description : "An agent that uses tools to generate user interfaces using Azure OpenAI" ) ;
7171 }
7272
7373 public static AIAgent CreateAgenticUI ( JsonSerializerOptions options )
7474 {
7575 ChatClient chatClient = s_azureOpenAIClient ! . GetChatClient ( s_deploymentName ! ) ;
76- var baseAgent = chatClient . AsIChatClient ( ) . CreateAIAgent ( new ChatClientAgentOptions
76+ var baseAgent = chatClient . AsIChatClient ( ) . AsAIAgent ( new ChatClientAgentOptions
7777 {
7878 Name = "AgenticUIAgent" ,
7979 Description = "An agent that generates agentic user interfaces using Azure OpenAI" ,
@@ -116,7 +116,7 @@ public static AIAgent CreateSharedState(JsonSerializerOptions options)
116116 {
117117 ChatClient chatClient = s_azureOpenAIClient ! . GetChatClient ( s_deploymentName ! ) ;
118118
119- var baseAgent = chatClient . AsIChatClient ( ) . CreateAIAgent (
119+ var baseAgent = chatClient . AsIChatClient ( ) . AsAIAgent (
120120 name : "SharedStateAgent" ,
121121 description : "An agent that demonstrates shared state patterns using Azure OpenAI" ) ;
122122
@@ -127,7 +127,7 @@ public static AIAgent CreatePredictiveStateUpdates(JsonSerializerOptions options
127127 {
128128 ChatClient chatClient = s_azureOpenAIClient ! . GetChatClient ( s_deploymentName ! ) ;
129129
130- var baseAgent = chatClient . AsIChatClient ( ) . CreateAIAgent ( new ChatClientAgentOptions
130+ var baseAgent = chatClient . AsIChatClient ( ) . AsAIAgent ( new ChatClientAgentOptions
131131 {
132132 Name = "PredictiveStateUpdatesAgent" ,
133133 Description = "An agent that demonstrates predictive state updates using Azure OpenAI" ,
0 commit comments