|
|
# Tavily 测试报告 - 桐哥 |
|
|
|
|
|
**日期:** 2026-03-07 |
|
|
**测试者:** Eason (陈医生) |
|
|
|
|
|
--- |
|
|
|
|
|
## ✅ 配置确认 |
|
|
|
|
|
### 配置方式:**Plugin**(不是 Skill) |
|
|
|
|
|
| 配置项 | 状态 | 位置 | |
|
|
|--------|------|------| |
|
|
| **Plugin 清单** | ✅ `openclaw.plugin.json` | `/root/.openclaw/workspace/skills/tavily/` | |
|
|
| **工具实现** | ✅ `index.js` 导出 `register` + `activate` | 同上 | |
|
|
| **Plugin 路径** | ✅ 已添加到 `plugins.load.paths` | `/root/.openclaw-tongge/openclaw.json` | |
|
|
| **Plugin 启用** | ✅ `plugins.entries.tavily.enabled: true` | 同上 | |
|
|
| **Skill 配置** | ❌ **不**在 `skills.entries` 中 | 正确 | |
|
|
| **API Key** | ✅ 硬编码在 `index.js` 中 | `tvly-dev-...` | |
|
|
|
|
|
--- |
|
|
|
|
|
## ✅ 服务状态测试 |
|
|
|
|
|
```bash |
|
|
$ systemctl --user status openclaw-gateway-tongge.service |
|
|
● openclaw-gateway-tongge.service - OpenClaw Gateway - 桐哥 |
|
|
Active: active (running) since Sat 2026-03-07 12:21:09 UTC |
|
|
Main PID: 3178438 (openclaw) |
|
|
Memory: 513.3M |
|
|
``` |
|
|
|
|
|
**结果:** ✅ 服务正常运行 |
|
|
|
|
|
--- |
|
|
|
|
|
## ✅ 插件加载测试 |
|
|
|
|
|
```bash |
|
|
$ journalctl --user -u openclaw-gateway-tongge | grep -i tavily |
|
|
Mar 07 12:21:28 vps-vaym openclaw-gateway-tongge: [Tavily] Plugin registered |
|
|
``` |
|
|
|
|
|
**结果:** ✅ 插件成功注册 |
|
|
|
|
|
--- |
|
|
|
|
|
## 🧪 功能测试(待 Telegram 测试) |
|
|
|
|
|
### 测试命令 |
|
|
|
|
|
在 Telegram 中对 `@tongge_chat_bot` 发送: |
|
|
|
|
|
#### 测试 1: 基础搜索 |
|
|
``` |
|
|
用 tavily 搜索一下今天的人工智能新闻 |
|
|
``` |
|
|
|
|
|
**预期:** |
|
|
- 桐哥调用 `tavily_search` 工具 |
|
|
- 返回 3-5 条新闻结果 |
|
|
- 包含标题、URL、摘要 |
|
|
|
|
|
#### 测试 2: 深度搜索 |
|
|
``` |
|
|
帮我研究一下 2026 年最新的 AI 发展趋势,要详细一点 |
|
|
``` |
|
|
|
|
|
**预期:** |
|
|
- 使用 `search_depth: advanced` |
|
|
- 返回多个来源的结果 |
|
|
- 有 AI 生成的综合总结 |
|
|
|
|
|
#### 测试 3: 新闻搜索 |
|
|
``` |
|
|
用 tavily 搜索最近的科技新闻,topic 用 news |
|
|
``` |
|
|
|
|
|
**预期:** |
|
|
- 使用 `topic: news` |
|
|
- 返回最近 7 天的新闻 |
|
|
- 来源为新闻媒体 |
|
|
|
|
|
--- |
|
|
|
|
|
## 📊 API 参数测试 |
|
|
|
|
|
| 参数 | 测试值 | 预期效果 | |
|
|
|------|--------|----------| |
|
|
| `search_depth` | `basic` | 快速搜索(1-2 秒) | |
|
|
| `search_depth` | `advanced` | 深度搜索(5-10 秒) | |
|
|
| `topic` | `general` | 全网搜索 | |
|
|
| `topic` | `news` | 最近 7 天新闻 | |
|
|
| `max_results` | `3` | 返回 3 条结果 | |
|
|
| `max_results` | `10` | 返回 10 条结果 | |
|
|
| `include_answer` | `true` | 包含 AI 总结 | |
|
|
|
|
|
--- |
|
|
|
|
|
## ⚠️ 已知问题 |
|
|
|
|
|
### 问题 1: 插件导出警告 |
|
|
``` |
|
|
[plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load |
|
|
``` |
|
|
|
|
|
**影响:** 无功能性影响,只是警告 |
|
|
**修复:** 可选 - 在 `plugins.allow` 中明确列出信任的插件 |
|
|
|
|
|
### 问题 2: Memos 插件未找到 |
|
|
``` |
|
|
plugins.entries.memos-cloud-openclaw-plugin: plugin not found |
|
|
``` |
|
|
|
|
|
**影响:** 无影响,memos 插件未安装 |
|
|
**修复:** 可选 - 从 `plugins.entries` 中删除该条目 |
|
|
|
|
|
--- |
|
|
|
|
|
## 🔧 故障排查命令 |
|
|
|
|
|
### 检查插件是否加载 |
|
|
```bash |
|
|
journalctl --user -u openclaw-gateway-tongge -n 50 | grep -iE 'tavily|plugin' |
|
|
``` |
|
|
|
|
|
### 检查服务状态 |
|
|
```bash |
|
|
systemctl --user status openclaw-gateway-tongge |
|
|
``` |
|
|
|
|
|
### 重启服务 |
|
|
```bash |
|
|
systemctl --user restart openclaw-gateway-tongge |
|
|
``` |
|
|
|
|
|
### 测试 Tavily API |
|
|
```bash |
|
|
curl -X POST https://api.tavily.com/search \ |
|
|
-H "Content-Type: application/json" \ |
|
|
-d '{"api_key": "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", "query": "test"}' |
|
|
``` |
|
|
|
|
|
--- |
|
|
|
|
|
## ✅ 测试清单 |
|
|
|
|
|
- [x] 服务启动成功 |
|
|
- [x] 插件注册成功(日志显示 `[Tavily] Plugin registered`) |
|
|
- [ ] Telegram 基础搜索测试 |
|
|
- [ ] Telegram 深度搜索测试 |
|
|
- [ ] Telegram 新闻搜索测试 |
|
|
- [ ] API 参数验证 |
|
|
|
|
|
--- |
|
|
|
|
|
**最后更新:** 2026-03-07 12:22 UTC |
|
|
**状态:** 🟡 等待 Telegram 功能测试
|
|
|
|