🔍 feat: Web Search via OpenAI Responses API #8186
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request introduces a new Web Search toggle to the OpenAI parameters panel, enabling OpenAI's built-in web search functionality for more accurate and up-to-date responses. It also includes UI and backend changes to support this feature, along with a minor UI adjustment to the
DynamicSlider
component.New Feature: Web Search Functionality
web_search
parameter to enable OpenAI's web search. This includes updates to schemas (tConversationSchema
,openAIBaseSchema
), types (IConversation
), and configurations (openAIParams
,openAICol2
). [1] [2] [3] [4] [5] [6]getOpenAIConfig
function to handle theweb_search
parameter, enabling the Responses API and adding web search tools when the feature is active. [1] [2]useSetIndexOptions
hook to automatically enable the Responses API when web search is activated.translation.json
.Backend Enhancements
LLMConfigResult
type to include an optionaltools
array for web search tools.BindToolsInput
in relevant files to support the new tools configuration. [1] [2]UI Improvements
DynamicSlider
component to improve input alignment and spacing.Change Type
Please delete any irrelevant options.
Demonstration
cap-web-search.mp4
Testing
Manually tested in LibreChat with an OpenAI model by asking for the current date and other timely events to verify search was being used for responses.
Checklist
Please delete any irrelevant options.