-
Notifications
You must be signed in to change notification settings - Fork 942
.NET: Add samples for OpenAIChatClientAgent and OpenAIResponseClientAgent #2638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds two new samples demonstrating how to create AI agents using native OpenAI SDK primitives (OpenAIChatClientAgent and OpenAIResponseClientAgent) instead of the Microsoft.Extensions.AI abstractions.
- Adds
Agent_OpenAI_Step03_CreateFromChatClientsample showing usage ofOpenAIChatClientAgent - Adds
Agent_OpenAI_Step04_CreateFromOpenAIResponseClientsample showing usage ofOpenAIResponseClientAgent - Updates parent README with references to the new samples
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| dotnet/samples/GettingStarted/AgentWithOpenAI/README.md | Updated table of samples to include new Step03 and Step04 samples with descriptions |
| dotnet/samples/GettingStarted/AgentWithOpenAI/Agent_OpenAI_Step03_CreateFromChatClient/README.md | Added README documenting how to use OpenAIChatClientAgent with ChatClient |
| dotnet/samples/GettingStarted/AgentWithOpenAI/Agent_OpenAI_Step03_CreateFromChatClient/Program.cs | Added sample code demonstrating OpenAIChatClientAgent with both regular and streaming invocation |
| dotnet/samples/GettingStarted/AgentWithOpenAI/Agent_OpenAI_Step03_CreateFromChatClient/Agent_OpenAI_Step03_CreateFromChatClient.csproj | Added project file for Step03 sample |
| dotnet/samples/GettingStarted/AgentWithOpenAI/Agent_OpenAI_Step04_CreateFromOpenAIResponseClient/README.md | Added README documenting how to use OpenAIResponseClientAgent with OpenAIResponseClient |
| dotnet/samples/GettingStarted/AgentWithOpenAI/Agent_OpenAI_Step04_CreateFromOpenAIResponseClient/Program.cs | Added sample code demonstrating OpenAIResponseClientAgent with both regular and streaming invocation |
| dotnet/samples/GettingStarted/AgentWithOpenAI/Agent_OpenAI_Step04_CreateFromOpenAIResponseClient/Agent_OpenAI_Step04_CreateFromOpenAIResponseClient.csproj | Added project file for Step04 sample |
| dotnet/agent-framework-dotnet.slnx | Added references to the two new sample projects in the solution file |
...et/samples/GettingStarted/AgentWithOpenAI/Agent_OpenAI_Step03_CreateFromChatClient/README.md
Outdated
Show resolved
Hide resolved
...et/samples/GettingStarted/AgentWithOpenAI/Agent_OpenAI_Step03_CreateFromChatClient/README.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
…p03_CreateFromChatClient/README.md Co-authored-by: Copilot <[email protected]>
…p03_CreateFromChatClient/README.md Co-authored-by: Copilot <[email protected]>
This PR adds samples demonstrating how to create AI agent that uses the OpenAI SDK primitives instead of the ones from Microsoft.Extensions.AI and Microsoft.Agents.AI abstractions.