feat: Add web search functionality with -search model suffix #4
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