跳转到内容

Perplexity

Perplexity 插件通过 Perplexity Search API 或通过 OpenRouter 的 Perplexity Sonar 提供网络搜索功能。

属性
类型网络搜索提供商(不是模型提供商)
认证PERPLEXITY_API_KEY(直接)或 OPENROUTER_API_KEY(通过 OpenRouter)
配置路径plugins.entries.perplexity.config.webSearch.apiKey
  1. 设置 API 密钥

    运行交互式网络搜索配置流程:

    Terminal window
    openclaw configure --section web

    或直接设置密钥:

    Terminal window
    openclaw config set plugins.entries.perplexity.config.webSearch.apiKey "pplx-xxxxxxxxxxxx"
  2. 开始搜索

    配置密钥后,代理将自动使用 Perplexity 进行网络搜索。无需其他步骤。

插件根据 API 密钥前缀自动选择传输方式:

当您的密钥以 pplx- 开头时,OpenClaw 使用原生 Perplexity Search API。此传输方式返回结构化结果并支持域名、语言 和日期筛选(请参阅下方的筛选选项)。

密钥前缀传输方式功能
pplx-原生 Perplexity Search API结构化结果、域名/语言/日期筛选
sk-or-OpenRouter (Sonar)带有引用的 AI 合成答案

当使用原生 Perplexity API 时,搜索支持以下筛选器:

筛选器描述示例
国家两位字母国家代码us, de, jp
语言ISO 639-1 语言代码en, fr, zh
日期范围时间范围窗口day, week, month, year
域名筛选器允许列表或拒绝列表(最多 20 个域名)example.com
内容预算每个响应/每个页面的 Token 限制max_tokens, max_tokens_per_page
Environment variable for daemon processes

If the OpenClaw Gateway(网关) runs as a daemon (launchd/systemd), make sure PERPLEXITY_API_KEY is available to that process.

OpenRouter proxy setup

If you prefer to route Perplexity searches through OpenRouter, set an OPENROUTER_API_KEY (prefix sk-or-) instead of a native Perplexity key. OpenClaw will detect the prefix and switch to the Sonar transport automatically.

Perplexity search 工具

代理如何调用 Perplexity 搜索并解读结果。

配置参考

包括插件条目在内的完整配置参考。