-
Notifications
You must be signed in to change notification settings - Fork 2.3k
.NET: [Bug]: missing method GetResponseClient #6401
Copy link
Copy link
Closed
Labels
.NETUsage: [Issues, PRs], Target: .NetUsage: [Issues, PRs], Target: .NetbugUsage: [Issues], Target: all issues (Legacy, prefer issue type: bug)Usage: [Issues], Target: all issues (Legacy, prefer issue type: bug)reproducedUsage: [Issues], Target: all issues that can be reproduced by the triage workflowUsage: [Issues], Target: all issues that can be reproduced by the triage workflow
Description
Activity
Metadata
Metadata
Assignees
Labels
.NETUsage: [Issues, PRs], Target: .NetUsage: [Issues, PRs], Target: .NetbugUsage: [Issues], Target: all issues (Legacy, prefer issue type: bug)Usage: [Issues], Target: all issues (Legacy, prefer issue type: bug)reproducedUsage: [Issues], Target: all issues that can be reproduced by the triage workflowUsage: [Issues], Target: all issues that can be reproduced by the triage workflow
Type
Projects
- StatusShow more project fieldsDone
Description
on the guide https://learn.microsoft.com/en-us/agent-framework/agents/providers/azure-openai?pivots=programming-language-csharp is present example code which describe is recommended use Responses. this is the example :
AzureOpenAIClient client = new AzureOpenAIClient(
new Uri("https://.openai.azure.com"),
new DefaultAzureCredential());
var responsesClient = client.GetResponseClient("gpt-4o-mini");
AIAgent agent = responsesClient.AsAIAgent(
instructions: "You are a helpful coding assistant.",
name: "CodeHelper");
Console.WriteLine(await agent.RunAsync("Write a Python function to sort a list."));
But the method GetResponseClient is not present but only GetResponsesClient without arguments
Code Sample
AzureOpenAIClient client = new AzureOpenAIClient( new Uri("https://<myresource>.openai.azure.com"), new DefaultAzureCredential()); var responsesClient = client.GetResponseClient("gpt-4o-mini"); AIAgent agent = responsesClient.AsAIAgent( instructions: "You are a helpful coding assistant.", name: "CodeHelper"); Console.WriteLine(await agent.RunAsync("Write a Python function to sort a list."));Error Messages / Stack Traces
Package Versions
Azure.AI.OpenAI Version="2.9.0-beta.1" Azure.Identity" Version="1.21.0" Microsoft.Agents.AI.OpenAI Version="1.9.0"
.NET Version
NET 10
Additional Context
No response