配置教程
OpenHuman 联网搜索配置 — AI 实时获取网络信息
2026-05-25约 5 分钟阅读
OpenHuman 内置联网搜索和网页抓取功能。配置后你可以让 AI 获取最新网络信息——搜索新闻、抓取网页、获取实时数据,不受模型知识截止日期限制。
默认配置
联网搜索默认开启:
[web]
search_enabled = true
scraper_enabled = true搜索提供方
OpenHuman 默认使用内建搜索引擎。你也可以配置自定义搜索 API:
[web]
search_provider = "google" # google, bing, searxng
search_api_key = "your-api-key" # 部分提供方需要
search_engine_id = "your-engine-id" # Google Custom Search 需要国内网络配置(代理)
如果你在中国大陆使用,可能需要配置代理才能访问 Google 搜索:
[web]
proxy = "http://127.0.0.1:7890" # 你的代理地址
search_enabled = true
scraper_enabled = true配置网页抓取
[web]
scraper_enabled = true
scraper_timeout = 30 # 抓取超时(秒)
scraper_max_size = 500000 # 最大抓取大小(字节)
scraper_user_agent = "Mozilla/5.0..." # 自定义 UA 避免被屏蔽可以这样用
- "帮我搜索一下 OpenHuman 最新的 GitHub Release 信息"
- "查一下今天 AI 行业的重大新闻"
- "打开 xxx 网页,帮我总结一下主要内容"
- "对比这三篇教程的内容"
搜索行为说明
- 当你明确提到"搜索""查一下""找找"等词时,OpenHuman 会触发联网搜索
- 日常对话使用模型自身知识,不会自动联网
- 抓取结果会自动压缩后进入模型上下文
- 搜索历史不会自动进入 Memory Tree,除非你明确要求保存
常见问题
搜索返回空结果
检查网络连接和代理配置。如果使用自定义搜索 API,确认 Key 有效。
网页抓取失败
某些网站有反爬机制。可以尝试修改 user_agent 模拟浏览器。如果网站需要登录,OpenHuman 无法抓取。