ModelEngine-Group / ModelEngine-Group/fit-framework
[Feature] fel-community 新增 You.com 联网搜索工具模块,为 FEL 智能体提供带来源的实时检索
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 335
- PR merge metrics
- No merged PRs in 30d
Description
功能描述
FEL 目前通过标准工具机制(@Group / @ToolMethod)让智能体调用各类工具,fel-community 也已有 model-openai、tokenizer-hanlp 两个社区模块,但框架内尚无联网搜索工具。建议新增一个 You.com 联网搜索社区工具模块,让基于 FEL 构建的智能体获得开箱即用的实时联网检索能力(带来源链接与摘录片段)。
建议方案
新增 framework/fel/java/fel-community/tool-youcom-search 模块,完全参照现有社区模块与工具的实现模式:
- 标准工具定义:
@Group接口 +@ToolMethod(namespace = "youcom", name = "web_search"),参数 query(必填)/ count(默认 5,上限 20)/ freshness(可选),与WeatherService示例同构 - 实现调用 You.com Search API(
GET https://ydc-index.io/v1/search,X-API-Key认证),API Key 取环境变量YDC_API_KEY(新账户 $100 免费额度) - 未配置 Key 时返回友好中文提示字符串,不抛异常、不影响任何现有功能
- 不引入新的第三方依赖,复用社区模块既有的 HTTP 客户端方式
- 遵循项目规范:版权头、公共 API 中文 Javadoc(@author / @since)、Conventional Commits
- 附完整单元测试(离线可运行)与一个环境变量门控的在线测试
集成收益
- FEL 智能体首次获得原生联网搜索工具,检索结果附带来源,便于溯源与引用
- 纯增量社区模块,默认不启用任何网络调用,对框架零侵入
实现已基本完成并通过测试,若方向认可将提交 PR(预期标签:in: fel、type: feature)。期待反馈,欢迎讨论。
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing fel-community modules model-openai and tokenizer-hanlp, then compare the WeatherService example and the standard @Group/@ToolMethod pattern. Implement the new framework/fel/java/fel-community/tool-youcom-search module using the stated API and environment variable, with offline unit tests and a gated online test. Done means the module follows project conventions and remains inert without YDC_API_KEY.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- ai, backend, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100