添加联网搜索工具、自定义channel、语义搜索

This commit is contained in:
龙澳
2026-03-28 15:45:58 +08:00
parent fc10e46033
commit af77a757e8
9 changed files with 39 additions and 11 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
# customize your .gitignore as needed
nanobot-config/workspace/sessions/*
MCP/mars-mcp/chromadb
# ---> Python
# Byte-compiled / optimized / DLL files

View File

@@ -1,12 +1,16 @@
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
ENV PATH="/root/.local/bin:${PATH}"
ENV PATH="/usr/local/bin:${PATH}"
# Install nanobot from PyPI via uv tool.
RUN uv tool install --upgrade nanobot-ai -i https://pypi.tuna.tsinghua.edu.cn/simple
# Install nanobot into the system Python so channel plugins can share the same environment.
RUN uv pip install --system --upgrade nanobot-ai -i https://pypi.tuna.tsinghua.edu.cn/simple
# Persist nanobot config/workspace here via volume mount.
RUN mkdir -p /root/.nanobot /opt/mcp
RUN mkdir -p /root/.nanobot /opt/mcp /opt/plugins
# Preinstall local channel plugin into the same env as nanobot (entry point discovery).
COPY nanobot-channel-web /opt/plugins/nanobot-channel-web
RUN uv pip install --system /opt/plugins/nanobot-channel-web -i https://pypi.tuna.tsinghua.edu.cn/simple
# Preinstall local MCP project dependencies into the image.
COPY MCP /opt/mcp
@@ -14,7 +18,7 @@ RUN uv pip install --system -e /opt/mcp/mars-mcp -e /opt/mcp/map-mcp -i https://
WORKDIR /workspace
EXPOSE 18790
EXPOSE 18790 8005 9000
ENTRYPOINT ["nanobot"]
CMD ["status"]

View File

@@ -27,12 +27,12 @@ DATACUBE_API_URL = os.getenv(
)
EMBEDDING_API_URL = os.getenv(
"EMBEDDING_API_URL",
"http://192.168.190.42:11434/api/embeddings"
"http://192.168.190.62:11434/api/embeddings"
)
EMBEDDING_MODEL = os.getenv("EMBEDDING_MODEL", "qwen3-embedding:8b-fp16")
CHROMADB_PATH = os.getenv(
"CHROMADB_PATH",
str(Path("~/studio/mars-data-serv-llm/data/chromadb").expanduser())
str(Path("/opt/mcp/mars-mcp/chromadb").expanduser())
)
logging.basicConfig(level=logging.WARNING)

View File

@@ -6,5 +6,5 @@ mars-nanobot配置文件。
```bash
sudo docker compose build
docker compose up -d nanobot-gateway
sudo docker compose up -d nanobot-gateway
```

View File

@@ -12,6 +12,7 @@ services:
ports:
- "18790:18790"
- "8005:8005"
- "8009:9000"
nanobot-cli:
build:

View File

@@ -126,7 +126,7 @@
]
},
"web": {
"enabled": false,
"enabled": true,
"host": "0.0.0.0",
"port": 9000,
"allowFrom": [

View File

@@ -1,6 +1,6 @@
# Soul
I am nanobot 🐈, a **Mars Digital Assistant** (火星数字助手).
I am a **Mars Digital Assistant** (火星数字助手).
## Identity

View File

@@ -13,3 +13,18 @@ This file documents non-obvious constraints and usage patterns.
## cron — Scheduled Reminders
- Please refer to cron skill for usage.
## Web Search Tool Priority
When web search is required, follow this priority order:
1. **First Choice: `multi-search-engine-2-0-1` skill**
- Installed at: `skills/multi-search-engine-2-0-1/`
- 17 search engines (8 CN + 9 Global)
- No API key required
- Supports: advanced search operators, time filters, site search, privacy engines, WolframAlpha
2. **Second Choice: Web Search Prime MCP** (`mcp_web-search-prime_*`)
- Provided by Zhipu AI
- Requires API key (configured in config.json)
- Use only if multi-search-engine is not available

View File

@@ -22,7 +22,6 @@ This file stores important information that should persist across sessions.
- Prefers detailed geological analysis and feature descriptions
- Interested in scientific value and geological evolution of Martian features
- Natural language interaction style for all operations
- **When web search is needed, prioritize using multi-search-engine skill** (17 engines including Baidu, Google, DuckDuckGo, WolframAlpha, etc.)
## Project Context
@@ -46,6 +45,14 @@ This file stores important information that should persist across sessions.
- `map_get_drawn_geometry` - Get hand-drawn geometry
- **Note**: No layer switching capability available
### Web Search Priority
- **优先使用**: `multi-search-engine-2-0-1` skill已安装
- 集成17个搜索引擎8个中文 + 9个全球
- 无需API密钥
- 支持高级搜索操作符、时间过滤、站内搜索、隐私搜索引擎、WolframAlpha知识查询
- 安装位置: C:\Users\islon\.nanobot\workspace\skills\multi-search-engine-2-0-1
- **次选**: Web Search Prime MCP智谱提供需要API密钥
### Data Sources
- **Tianwen-1 MoRIC imagery** (`tianwen_moric`): High-resolution Mars imagery from Chinese Tianwen-1 mission