From f6b4447ef79a5c3e0930829a31e94268c674d998 Mon Sep 17 00:00:00 2001 From: Simon <10131203+gaomeng1900@users.noreply.github.com> Date: Mon, 2 Feb 2026 16:51:51 +0800 Subject: [PATCH] docs: tips about Ollama --- CONTRIBUTING.md | 10 ++++ .../src/pages/docs/features/models/page.tsx | 49 ++++++++++++++++++- 2 files changed, 57 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d552c10..2c75a38 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -126,6 +126,16 @@ If your lame AI assistant does not support [AGENTS.md](https://agents.md/). Add LLM_BASE_URL=https://api.your-llm-provider.com/v1 ``` +- **Ollama example** (tested on 0.15 + qwen3:14b, RTX3090 24GB): + + ```env + LLM_BASE_URL="http://localhost:11434/v1" + LLM_API_KEY="NA" + LLM_MODEL_NAME="qwen3:14b" + ``` + + > ⚠️ Add `*` to `OLLAMA_ORIGINS` (403). Models < 10B unlikely strong enough. Requires tool_call support. Set context length > 15k (default 4k will NOT work): `$env:OLLAMA_CONTEXT_LENGTH=64000; ollama serve` + - Restart the dev server to load new env vars - If not provided, the demo will the free testing proxy by default diff --git a/packages/website/src/pages/docs/features/models/page.tsx b/packages/website/src/pages/docs/features/models/page.tsx index 40abc23..4b3c92a 100644 --- a/packages/website/src/pages/docs/features/models/page.tsx +++ b/packages/website/src/pages/docs/features/models/page.tsx @@ -136,8 +136,8 @@ const pageAgent = new PageAgent({ // Self-hosted models (e.g., Ollama) const pageAgent = new PageAgent({ baseURL: 'http://localhost:11434/v1', - apiKey: 'N/A', // Ollama typically accepts any value - model: 'qwen3:latest' + apiKey: 'NA', + model: 'qwen3:14b' }); // Free testing endpoint @@ -149,6 +149,51 @@ const DEMO_API_KEY = 'PAGE-AGENT-FREE-TESTING-RANDOM' `} /> + + {/* Ollama Section */} +
+

Ollama

+

+ {isZh + ? '已在 Ollama 0.15 + qwen3:14b (RTX3090 24GB) 上测试通过。' + : 'Tested on Ollama 0.15 with qwen3:14b (RTX3090 24GB).'} +

+ +
+

+ {isZh ? '⚠️ 注意事项' : '⚠️ Important Notes'} +

+
    +
  • + {isZh + ? '确保 OLLAMA_ORIGINS 设置为 * 以避免 403 错误' + : 'Add * to OLLAMA_ORIGINS to avoid 403 errors'} +
  • +
  • + {isZh + ? '小于 10B 参数的模型通常效果不佳' + : 'Models smaller than 10B are unlikely to be strong enough'} +
  • +
  • {isZh ? '需要支持 tool_call 的模型' : 'Requires tool_call capable models'}
  • +
  • + {isZh + ? '确保上下文长度大于输入 token 数,否则 Ollama 会静默截断 prompt。普通页面约需 15k token,随步骤增加。默认 4k 上下文长度无法正常工作' + : 'Ensure context length exceeds input tokens, or Ollama will silently truncate prompts. ~15k tokens for a typical page, increases with steps. Default 4k context length will NOT work'} +
      +
    • + + $env:OLLAMA_CONTEXT_LENGTH=64000; ollama serve + +
    • +
    +
  • +
+
+
) }