@@ -354,7 +354,7 @@ public static class Program
354354 ?? throw new Exception (" AZURE_OPENAI_ENDPOINT is not set." );
355355 var deploymentName = Environment .GetEnvironmentVariable (" AZURE_OPENAI_DEPLOYMENT_NAME" ) ?? " gpt-4o-mini" ;
356356 var chatClient = new AIProjectClient (new Uri (endpoint ), new DefaultAzureCredential ())
357- .GetChatClient ( deploymentName ). AsIChatClient ();
357+ .GetProjectOpenAIClient (). GetProjectResponsesClient (). AsIChatClient (deploymentName );
358358
359359 // Create agents
360360 AIAgent spamDetectionAgent = GetSpamDetectionAgent (chatClient );
@@ -973,7 +973,10 @@ public static class Program
973973 // Set up the Azure OpenAI client
974974 var endpoint = Environment .GetEnvironmentVariable (" AZURE_OPENAI_ENDPOINT" ) ?? throw new Exception (" AZURE_OPENAI_ENDPOINT is not set." );
975975 var deploymentName = Environment .GetEnvironmentVariable (" AZURE_OPENAI_DEPLOYMENT_NAME" ) ?? " gpt-4o-mini" ;
976- var chatClient = new AIProjectClient (new Uri (endpoint ), new DefaultAzureCredential ()).GetChatClient (deploymentName ).AsIChatClient ();
976+ var chatClient = new AIProjectClient (new Uri (endpoint ), new DefaultAzureCredential ())
977+ .GetProjectOpenAIClient ()
978+ .GetProjectResponsesClient ()
979+ .AsIChatClient (deploymentName );
977980
978981 // Create agents
979982 AIAgent spamDetectionAgent = GetSpamDetectionAgent (chatClient );
@@ -1721,7 +1724,10 @@ public static class Program
17211724 // Set up the Azure OpenAI client
17221725 var endpoint = Environment .GetEnvironmentVariable (" AZURE_OPENAI_ENDPOINT" ) ?? throw new Exception (" AZURE_OPENAI_ENDPOINT is not set." );
17231726 var deploymentName = Environment .GetEnvironmentVariable (" AZURE_OPENAI_DEPLOYMENT_NAME" ) ?? " gpt-4o-mini" ;
1724- var chatClient = new AIProjectClient (new Uri (endpoint ), new DefaultAzureCredential ()).GetChatClient (deploymentName ).AsIChatClient ();
1727+ var chatClient = new AIProjectClient (new Uri (endpoint ), new DefaultAzureCredential ())
1728+ .GetProjectOpenAIClient ()
1729+ .GetProjectResponsesClient ()
1730+ .AsIChatClient (deploymentName );
17251731
17261732 // Create agents
17271733 AIAgent emailAnalysisAgent = GetEmailAnalysisAgent (chatClient );
0 commit comments