添加联网搜索工具、自定义channel、语义搜索
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
# customize your .gitignore as needed
|
# customize your .gitignore as needed
|
||||||
nanobot-config/workspace/sessions/*
|
nanobot-config/workspace/sessions/*
|
||||||
|
MCP/mars-mcp/chromadb
|
||||||
|
|
||||||
# ---> Python
|
# ---> Python
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
|
|||||||
14
Dockerfile
14
Dockerfile
@@ -1,12 +1,16 @@
|
|||||||
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
|
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.
|
# Install nanobot into the system Python so channel plugins can share the same environment.
|
||||||
RUN uv tool install --upgrade nanobot-ai -i https://pypi.tuna.tsinghua.edu.cn/simple
|
RUN uv pip install --system --upgrade nanobot-ai -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
|
|
||||||
# Persist nanobot config/workspace here via volume mount.
|
# 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.
|
# Preinstall local MCP project dependencies into the image.
|
||||||
COPY MCP /opt/mcp
|
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
|
WORKDIR /workspace
|
||||||
|
|
||||||
EXPOSE 18790
|
EXPOSE 18790 8005 9000
|
||||||
|
|
||||||
ENTRYPOINT ["nanobot"]
|
ENTRYPOINT ["nanobot"]
|
||||||
CMD ["status"]
|
CMD ["status"]
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ DATACUBE_API_URL = os.getenv(
|
|||||||
)
|
)
|
||||||
EMBEDDING_API_URL = os.getenv(
|
EMBEDDING_API_URL = os.getenv(
|
||||||
"EMBEDDING_API_URL",
|
"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")
|
EMBEDDING_MODEL = os.getenv("EMBEDDING_MODEL", "qwen3-embedding:8b-fp16")
|
||||||
CHROMADB_PATH = os.getenv(
|
CHROMADB_PATH = os.getenv(
|
||||||
"CHROMADB_PATH",
|
"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)
|
logging.basicConfig(level=logging.WARNING)
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ mars-nanobot配置文件。
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo docker compose build
|
sudo docker compose build
|
||||||
docker compose up -d nanobot-gateway
|
sudo docker compose up -d nanobot-gateway
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "18790:18790"
|
- "18790:18790"
|
||||||
- "8005:8005"
|
- "8005:8005"
|
||||||
|
- "8009:9000"
|
||||||
|
|
||||||
nanobot-cli:
|
nanobot-cli:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -126,7 +126,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"web": {
|
"web": {
|
||||||
"enabled": false,
|
"enabled": true,
|
||||||
"host": "0.0.0.0",
|
"host": "0.0.0.0",
|
||||||
"port": 9000,
|
"port": 9000,
|
||||||
"allowFrom": [
|
"allowFrom": [
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Soul
|
# Soul
|
||||||
|
|
||||||
I am nanobot 🐈, a **Mars Digital Assistant** (火星数字助手).
|
I am a **Mars Digital Assistant** (火星数字助手).
|
||||||
|
|
||||||
## Identity
|
## Identity
|
||||||
|
|
||||||
|
|||||||
@@ -13,3 +13,18 @@ This file documents non-obvious constraints and usage patterns.
|
|||||||
## cron — Scheduled Reminders
|
## cron — Scheduled Reminders
|
||||||
|
|
||||||
- Please refer to cron skill for usage.
|
- 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
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ This file stores important information that should persist across sessions.
|
|||||||
- Prefers detailed geological analysis and feature descriptions
|
- Prefers detailed geological analysis and feature descriptions
|
||||||
- Interested in scientific value and geological evolution of Martian features
|
- Interested in scientific value and geological evolution of Martian features
|
||||||
- Natural language interaction style for all operations
|
- 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
|
## Project Context
|
||||||
|
|
||||||
@@ -46,6 +45,14 @@ This file stores important information that should persist across sessions.
|
|||||||
- `map_get_drawn_geometry` - Get hand-drawn geometry
|
- `map_get_drawn_geometry` - Get hand-drawn geometry
|
||||||
- **Note**: No layer switching capability available
|
- **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
|
### Data Sources
|
||||||
|
|
||||||
- **Tianwen-1 MoRIC imagery** (`tianwen_moric`): High-resolution Mars imagery from Chinese Tianwen-1 mission
|
- **Tianwen-1 MoRIC imagery** (`tianwen_moric`): High-resolution Mars imagery from Chinese Tianwen-1 mission
|
||||||
|
|||||||
Reference in New Issue
Block a user