openclaw-whatsapp-gif — openclaw-WhatsApp-GIF
v1.0.1Source and 发送 relevant reaction GIFs in Whats应用 chats using safe 过滤器s and deterministic ranking. Use when the user asks for a GIF/meme/reaction, or when a short visual reaction is better than plAIn text for celebration, humor, acknowledgment, empathy, or agreement.
运行时依赖
安装命令
点击复制技能文档
WhatsApp GIF 源安全、上下文匹配的 GIF,并将一个高质量的结果发送到 WhatsApp。 工作流程 决定是否适合发送 GIF。 从用户意图(2-5 个字)中构建简洁的搜索查询。 运行脚本/find_gif.py 以获取和排名候选项。 使用消息工具将顶级结果发送到 WhatsApp(首选本地文件有效载荷模式)。 如果发送失败,使用下一个候选项重试一次。 如果仍然失败或没有结果,发送简洁的回退文本。 决策规则 在以下情况下更喜欢 GIF: 用户明确要求 GIF/表情包/反应。 简短的情感信号足够。 语气从视觉响应中受益。 避免在以下情况下使用 GIF: 主题是严肃/敏感的(医疗、法律、冲突、悲伤)。 群组上下文是正式的或不明确的。 用户要求仅文本响应。 脚本用法 使用这些确定性助手: python3 skills/openclaw-whatsapp-gif/scripts/find_gif.py "祝贺 庆祝" --limit 5 --json python3 skills/openclaw-whatsapp-gif/scripts/find_gif.py "做得好" --limit 3 --json --target "+1234567890" python3 skills/openclaw-whatsapp-gif/scripts/send_gif.py "+1234567890" "做得好 庆祝" --json python3 skills/openclaw-whatsapp-gif/scripts/send_gif.py "+1234567890" "做得好 庆祝" --delivery-mode local --json python3 skills/openclaw-whatsapp-gif/scripts/send_gif.py "+1234567890" "做得好 庆祝" --payload-only 行为: 读取 TENOR_API_KEY 和/或 GIPHY_API_KEY。 应用安全过滤(contentfilter=low / rating=g + blocklist)。 使用重试 + 后退网络获取。 根据关键字重叠 + 轻量级首选项进行排名。 如果没有 API 密钥或没有提供程序结果,使用内置安全回退目录。 可选的 Web 抓取回退仅在 references/policy.json 中启用 allowWebScrapeFallback 时可用。 使用常见反应别名扩展意图查询。 在提供程序之间删除重复的 URL。 返回 URL(默认)或候选列表(--json)。 使用 --target,打印准备好的 WhatsApp 消息有效载荷 JSON。 使用 send_gif.py --payload-only,打印最终消息有效载荷以进行直接工具交接。 send_gif.py 验证媒体大小/类型,在 URL 坏时重试下一个候选项,并写入 OS 临时缓存。 遥测日志记录默认情况下禁用,可以通过策略或 CLI 标志启用。 远程 URL 回退默认情况下禁用,必须在策略中显式启用。 运行时策略可以在 references/policy.json 中配置。 WhatsApp 发送模式 使用消息: action: "send" channel: "whatsapp" target: <聊天 ID/收件人> media: caption: <可选的简短行> gifPlayback: true 如果提供程序拒绝 .gif,请使用下一个候选 URL(首选 MP4)重试。 回退 如果没有合适的 GIF 或交付失败两次: 发送保留意图的简洁文本。 不要在循环中不断重试。 参考 提供程序说明: references/providers.md GitHub API CLI