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-09-03
- Stars
- ★ 351
- Forks
- 27
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 资源文件 6
- 参考文档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
- 脚本scripts/chatchat_config_audit.py4.5 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
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).