跳到主要内容

SerpApi

注意

本教程为社区贡献,Open WebUI 团队不提供官方支持。它仅作为如何针对特定使用场景自定义 Open WebUI 的演示。想要贡献?请查看贡献教程。

提示

有关与 Web Search 相关的所有环境变量的完整列表(包括并发设置、结果数量等),请参考 Environment Configuration 文档

Troubleshooting

Web Search 遇到问题?请参考 Web Search 问题排查指南以获取代理配置、连接超时和空内容等常见问题的解决方案。

SerpApi API

SerpApi 可以通过我们快速、简便且完整的 API 来抓取 Google 以及其他搜索引擎的数据。支持任何现有的或即将推出的、返回 organic_results 的 SERP 引擎。默认的 Web 搜索引擎为 google,但也可以更改为 bingbaidugoogle_newsgoogle_scholargoogle_patents 等。

设置

  1. 访问 SerpApi,登录或创建新账户。
  2. 进入 Dashboard 并复制 API 密钥。
  3. 获取 API key 后,打开 Open WebUI Admin panel,点击 Settings 选项卡,然后点击 Web Search
  4. 启用 Web search 并将 Web Search Engine 设置为 serpapi
  5. SerpApi API Key 中填入您在步骤 2 中从 SerpApi 控制面板复制的 API key
  6. [可选] 输入您想要查询的 SerpApi engine 名称。例如,googlebingbaidugoogle_newsgoogle_videosgoogle_scholargoogle_patents。默认情况下,它设置为 google。您可以在 SerpApi 文档中找到更多选项。
  7. 点击 Save

Open WebUI Admin panel

注意

您必须在提示词输入栏中启用 Web search,才能使用 SerpApi 引擎搜索网络。

enable Web search

This content is for informational purposes only and does not constitute a warranty, guarantee, or contractual commitment. Open WebUI is provided "as is." See your license for applicable terms.