server-setup-and-cli
Install, initialize, configure, and start Langchain-Chatchat with the chatchat CLI, data root, model providers, and deployment options.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- server-setup-and-cli
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Install, initialize, configure, and start Langchain-Chatchat with the chatchat CLI, data root, model providers, and deployment options.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/cli-reference.md3.4 KB
- 参考文档references/configuration.md3.6 KB
- 参考文档references/deployment.md3.4 KB
- 参考文档references/model-provider-setup.md3.6 KB
- 参考文档references/troubleshooting.md3.4 KB
03 SKILL.md 正文
Server Setup and CLI
Use this sub-skill for Langchain-Chatchat installation, CHATCHAT_ROOT, YAML configuration, chatchat init, chatchat kb, chatchat start, Docker/Xinference deployment planning, and model-provider setup.
Read first
references/cli-reference.mdlists verified CLI commands and flags.references/configuration.mdexplainsCHATCHAT_ROOT, generated YAML files, and important settings groups.references/model-provider-setup.mdexplains provider separation, model names, and Xinference/Ollama/LocalAI/FastChat/One API style configuration.references/deployment.mdcovers pip/source/Docker deployment choices and why AutoDL scripts are not bundled as runnable helpers.references/troubleshooting.mdgives setup-specific symptoms and recovery steps.- Run
scripts/chatchat_config_audit.pyagainst an initialized data root to check expected config/data files without starting services.
Setup workflow
- Choose environment. Use Python 3.10 or 3.11. Prefer a clean Chatchat environment. Keep heavy model-serving frameworks in separate envs/containers unless the user explicitly wants a combined setup.
- Install package. For normal users, use
python -m pip install -U langchain-chatchat. For source development, install the server package editable from the server package root. - Pick data root. Set
CHATCHAT_ROOTto a persistent directory if the current working directory is not the desired data/config location. - Initialize. Run
chatchat initbefore any service startup. Do not use--recreate-kbuntil embedding provider settings are valid. - Edit YAML. Update model platform, default LLM, default embedding model, server host/port, KB/vector-store settings, and tool settings as needed.
- Rebuild or update KB. Run
chatchat kb -rfor full vector rebuild only after the embedding model is reachable. Use update/increment/prune flags for lighter maintenance. - Start service. Use
chatchat start --api,chatchat start --webui, orchatchat start -a. - Validate endpoints. Open API docs at the API service root redirect or use API/SDK probes from sibling sub-skills.
CLI quick reference
chatchat --help
chatchat init --help
chatchat kb --help
chatchat start --help
Common command sequence:
export CHATCHAT_ROOT=/path/to/chatchat-data
chatchat init
# edit generated YAML files: model_settings.yaml, kb_settings.yaml, basic_settings.yaml, tool_settings.yaml, prompt_settings.yaml
chatchat kb -r
chatchat start -a
If chatchat kb -r fails, do not retry blindly. Confirm the embedding provider endpoint and model name first.
Boundary with sibling sub-skills
- After the API/WebUI process is running, use
../knowledge-base-and-api/SKILL.mdfor route payloads, RAG modes, tools, and vector-store API calls. - Use
../python-sdk-and-adapters/SKILL.mdfor SDK clients,open_chatcaht, and LangChain adapter classes. - Return here when an API/SDK failure points to missing config, wrong model names,
CHATCHAT_ROOT, provider reachability, or service startup.
Safety rules
- Do not start Docker Compose, model downloads, or AutoDL process-killing scripts without explicit user approval.
- Do not run
chatchat kb --clear-tables, prune commands, or--recreate-kbagainst user data until the targetCHATCHAT_ROOTand backup status are clear. - Do not claim GPU/provider readiness from package import or CLI help. Provider readiness requires provider-specific checks.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.