返回顶部
x

xai-searchxAI实时搜索

Search X/Twitter and the web in real-time using xAI's Grok API with agentic search tools.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.4
安全检测
已通过
2,976
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

xai-search

xAI搜索 (Grok API)

使用xAI的智能搜索功能实时查询X/Twitter和网络。该功能利用Grok的websearch和xsearch工具。

文档: https://docs.x.ai/docs/

环境要求

  • - XAIAPIKEY 环境变量
  • Python 3 + xai-sdk:pip install xai-sdk

快速使用 (curl)

网络搜索

bash curl -s https://api.x.ai/v1/chat/completions \ -H Authorization: Bearer $XAIAPIKEY \ -H Content-Type: application/json \ -d { model: grok-3-fast, messages: [{role: user, content: 在此输入您的查询}], tools: [{type: function, function: {name: web_search}}] } | jq -r .choices[0].message.content

X/Twitter搜索

bash curl -s https://api.x.ai/v1/chat/completions \ -H Authorization: Bearer $XAIAPIKEY \ -H Content-Type: application/json \ -d { model: grok-3-fast, messages: [{role: user, content: 在此输入您的查询}], tools: [{type: function, function: {name: x_search}}] } | jq -r .choices[0].message.content

组合搜索(网络 + X)

bash curl -s https://api.x.ai/v1/chat/completions \ -H Authorization: Bearer $XAIAPIKEY \ -H Content-Type: application/json \ -d { model: grok-3-fast, messages: [{role: user, content: 在此输入您的查询}], tools: [ {type: function, function: {name: web_search}}, {type: function, function: {name: x_search}} ] } | jq -r .choices[0].message.content

辅助脚本

为方便使用,可使用scripts/文件夹中的xai-search.py脚本:

bash

网络搜索(根据技能位置调整路径)


python ~/.clawdbot/skills/xai-search/scripts/xai-search.py web 关于AI的最新新闻

X/Twitter搜索

python ~/.clawdbot/skills/xai-search/scripts/xai-search.py x 大家对Clawdbot的看法

两者都搜索

python ~/.clawdbot/skills/xai-search/scripts/xai-search.py both 今日时事

模型

  • - grok-3-fast — 快速,适合快速搜索
  • grok-4-1-fast — 推理模型,适合复杂查询

X搜索过滤器

您可以通过以下方式过滤X搜索:

  • - allowedxhandles / excludedxhandles — 限定特定账号
  • fromdate / todate — 日期范围(ISO8601格式)
  • enableimageunderstanding — 分析帖子中的图片
  • enablevideounderstanding — 分析帖子中的视频

网络搜索过滤器

  • - alloweddomains / excludeddomains — 限定特定网站
  • enableimageunderstanding — 分析页面中的图片

使用技巧

  • - 突发新闻:使用X搜索
  • 事实/研究查询:使用网络搜索或两者结合
  • 情感/观点:使用X搜索
  • 模型会根据需要多次调用搜索(智能模式)

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 xai-search-1776381317 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 xai-search-1776381317 技能

通过命令行安装

skillhub install xai-search-1776381317

下载

⬇ 下载 xai-search v1.0.4(免费)

文件大小: 2.54 KB | 发布时间: 2026-4-17 14:58

v1.0.4 最新 2026-4-17 14:58
Fixed script extension for ClawdHub packaging (.py)

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部