Query Stardew Valley Wiki using natural language. Ask about crops, NPCs, strategies, and more.
問牧場物語的任何問題。由本機 AI 和本地 Wiki 向量資料庫驅動。
在使用前,需要初始化向量資料庫。
# 1. 安裝依賴
pip install requests beautifulsoup4 lxml numpy faiss-cpu ollama
# 2. 下載 Embedding 模型
ollama pull qwen3-embedding
# 3. 下載 LLM 模型
ollama pull qwen3:8b
# 4. 爬取 Wiki (100 頁)
python3 {baseDir}/scripts/crawl_wiki.py --max-pages 100 --output {baseDir}/data
# 5. 建立向量索引
python3 {baseDir}/scripts/build_vectors.py --input {baseDir}/data/raw_pages.json --output {baseDir}/data --model qwen3-embedding
# 初始化完成!
Takes ~20-30 minutes on first run:
Note (OpenClaw sandbox): {baseDir}/venv in this repo is a macOS venv (Mach-O) and will not run inside the Linux Docker sandbox.
OpenClaw will create a Linux venv at {baseDir}/.venv inside the sandbox and install deps from {baseDir}/requirements.txt.
{baseDir}/.venv/bin/python3 {baseDir}/scripts/query.py \
--data-dir {baseDir}/data \
--query "你的問題" \
--embedding-model qwen3-embedding \
--llm-model qwen3:8b
Output Format for Agents: When responding to user queries:
qwen3-embedding (4.7 GB, for embeddings)qwen3:8b (5.2 GB, for LLM inference)Crawl — BFS 爬取 zh.stardewvalleywiki.com(100+ 頁)
Chunk — 將每頁分成 500 字的段落
Embed — 用 qwen3-embedding 生成 4096 維向量
Index — 用 FAISS 建立本機索引
Query — 用戶提問 → 相似度搜尋 → qwen3:8b 生成答案
ollama serve is runningollama pull qwen3:8bTo refresh Wiki data:
python3 {baseDir}/scripts/crawl_wiki.py --max-pages 100 --output {baseDir}/data
python3 {baseDir}/scripts/build_vectors.py --input {baseDir}/data/raw_pages.json --output {baseDir}/data