-
Notifications
You must be signed in to change notification settings - Fork 4.2k
.Net: Add sample showing how to use web and file search #12611
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
.Net: Add sample showing how to use web and file search #12611
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 samples demonstrating how to utilize web and file search capabilities with the OpenAIResponseAgent, along with updates to support reasoning models and new agent invoke options.
- Updated BaseResponsesAgentTest to use ChatModelId and added FileClient and VectorStoreClient.
- Changed invoke option types in OpenAIResponseAgent to OpenAIResponseAgentInvokeOptions.
- Added new sample files demonstrating tool usage for web search, file search, and reasoning with summaries.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
dotnet/src/InternalUtilities/samples/AgentUtilities/BaseResponsesAgentTest.cs | Updated client instantiation, changed model identifier, and added file and vector store clients; EnableLogging default has changed. |
dotnet/src/Agents/OpenAI/OpenAIResponseAgentInvokeOptions.cs | Added support to propagate ResponseCreationOptions in constructor overloads. |
dotnet/src/Agents/OpenAI/OpenAIResponseAgent.cs | Updated invoke options type from OpenAIAssistantAgentInvokeOptions to OpenAIResponseAgentInvokeOptions. |
dotnet/src/Agents/OpenAI/Extensions/OpenAIResponseExtensions.cs | Extended response conversion for ReasoningResponseItem and added helper conversion for summary texts. |
dotnet/samples/GettingStartedWithAgents/OpenAIResponse/Step04_OpenAIResponseAgent_Tools.cs | New sample demonstrating usage of web search and file search tools. |
dotnet/samples/GettingStartedWithAgents/OpenAIResponse/Step03_OpenAIResponseAgent_ReasoningModel.cs | Added test for using a reasoning model with summaries, including multi-line prompt usage. |
dotnet/src/InternalUtilities/samples/AgentUtilities/BaseResponsesAgentTest.cs
Show resolved
Hide resolved
dotnet/samples/GettingStartedWithAgents/OpenAIResponse/Step04_OpenAIResponseAgent_Tools.cs
Show resolved
Hide resolved
### Motivation and Context Partial fix for #12562 ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
One unrelated integration tests failure
|
Motivation and Context
Partial fix for #12562
Description
Contribution Checklist