feat: Add web search functionality with -search model suffix#4
Draft
tblinka1996 wants to merge 1 commit intomainfrom
Draft
feat: Add web search functionality with -search model suffix#4tblinka1996 wants to merge 1 commit intomainfrom
tblinka1996 wants to merge 1 commit intomainfrom
Conversation
- Add support for search models (e.g., gpt-4o-search, claude-3.5-sonnet-search) - Automatically detect -search suffix and enable You.com web search features - Extend model list API to include all search model variants - Maintain full OpenAI API compatibility - Return original search model name in responses Users can now select search models directly from the model list at /v1/models and get AI responses enhanced with real-time web search results.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
功能概述
添加网络搜索功能支持。用户可以通过在模型名后添加
-search后缀来启用 You.com 的网络搜索功能。主要变更
gpt-4o-search、claude-3.5-sonnet-search等)技术实现
isSearchModel()和getBaseModelName()函数自动检测搜索模型use_search=true,search_focus=web,enable_web_results=true使用示例
测试验证
文件变更
api/main.go- 核心搜索功能实现SEARCH_FEATURE.md- 用户使用文档用户现在可以直接从模型列表中选择搜索模型,无需手动添加后缀,获得增强的AI回答体验。
@tblinka1996 can click here to continue refining the PR