Repository navigation
Conversation
This branch has not been deployed
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.
What
将 DeepEyes-V2 中写死的占位
search()改造成可插拔搜索后端。当前已完成第一阶段:
DEEPEYES_V2_SEARCH_BACKEND控制 backend,默认使用mock。mock为确定性离线实现,不联网、不需要 API key。elapsed_time和data,每条结果包含title、link、snippet、date。retriever和external预留入口,当前未实现时安全返回"Error"。"Error",不向上抛出。image_search()未改动。后续会继续实现 Search-R1 retriever、external search API、超时/重试及相关文档。
Why
Relates to #321(贡献者计划第二期 No.10)。
当前 DeepEyes-V2 的
search()是固定 placeholder,只能返回模拟搜索结果,无法接入真实检索服务或网页搜索 API。本任务目标是支持
mock / retriever / external三种后端,同时保持默认配置下完全离线可运行。How
当前
search()根据DEEPEYES_V2_SEARCH_BACKEND分发:默认
mock根据 query 和 size 确定性生成统一格式结果。backend 不存在或执行异常时沿用现有
"Error"约定,因此本阶段无需修改 DeepEyes-V2 上层调用逻辑。Testing
结果:
当前覆盖:
git diff --check通过。pre-commit run --all-filespassespytest tests/)Type of Change