PageIndex icon indicating copy to clipboard operation
PageIndex copied to clipboard

支持本地部署吗?支持对接自定义的openai兼容的LLM服务吗

Open SeoMP opened this issue 5 months ago • 1 comments

SeoMP avatar Jun 05 '26 09:06 SeoMP

Both are supported 👍 PageIndex talks to models through LiteLLM, so you just set model in pageindex/config.yaml and the endpoint/keys in .env.

1. Custom OpenAI-compatible service (vLLM / LM Studio / an enterprise gateway, etc.):

# config.yaml
model: "openai/<your-model-name>"
# .env
OPENAI_API_BASE=http://<your-endpoint>/v1
OPENAI_API_KEY=<any-value>   # put any placeholder if your service has no auth

2. Local model (Ollama):

# config.yaml
model: "ollama/llama3"

LiteLLM defaults to http://localhost:11434; override it with OLLAMA_API_BASE in .env.

Full provider list: https://docs.litellm.ai/docs/providers

⚠️ One heads-up: the indexing pipeline asks the model for structured JSON at several steps, so very small local models can be unreliable — a capable instruct model works best (we're also hardening JSON tolerance for weaker models in #333).

Closing as answered — feel free to reopen if you run into issues!

KylinMountain avatar Jul 03 '26 10:07 KylinMountain