Skip to main content

Grok 搜索

OpenClaw 支持 Grok 作为 web_search 提供商,利用 xAI 网络基于响应生成由实时搜索结果和引用支持的 AI 综合答案。

获取 API 密钥

1

Create a key

xAI 获取 API 密钥。
2

Store the key

在 Gateway(网关) 环境中设置 XAI_API_KEY,或通过以下方式配置:
openclaw configure --section web

配置

{
  plugins: {
    entries: {
      xai: {
        config: {
          webSearch: {
            apiKey: "xai-...", // optional if XAI_API_KEY is set
          },
        },
      },
    },
  },
  tools: {
    web: {
      search: {
        provider: "grok",
      },
    },
  },
}
环境变量替代方案: 在 Gateway(网关) 环境中设置 XAI_API_KEY。 对于 Gateway 安装,请将其放入 ~/.openclaw/.env 中。

工作原理

Grok 利用 xAI 网络基于响应来综合带有内联引用的答案,类似于 Gemini 的 Google 搜索基于方法。

支持的参数

Grok 搜索支持标准的 querycount 参数。 目前不支持特定于提供商的筛选器。

相关


本页面源自 openclaw/openclaw,由 BeaversLab 翻译,遵循 MIT 协议 发布。
Last modified on March 27, 2026