Skip to main content

开始使用

环境配置完成后,启动步骤为先启动chatchat-server,然后启动chatchat-frontend。 chatchat可通过pypi安装一键启动,您也可以选择使用源码启动。(Tips: 源码配置可以帮助我们更快的寻找bug,或者改进基础设施。我们不建议新手使用这个方式)

pypi安装一键启动

  • 安装chatchat
pip install langchain-chatchat -U

注意:chatchat请放在独立的虚拟环境中,比如conda,venv,virtualenv等

已知问题,不能跟xf一起安装,会让一些插件出bug,例如文件无法上传

工作空间配置

操作指令 chatchat-config

 
Usage: chatchat-config [OPTIONS] COMMAND [ARGS]...

  指令` chatchat-config` 工作空间配置

Options:
  --help  Show this message and exit.

Commands:
  basic   基础配置
  kb      知识库配置
  model   模型配置
  server  服务配置

模型服务配置

如果您已经有了一个openai endpoint的能力的地址,可以在MODEL_PLATFORMS这里直接配置

chatchat-config model --set_model_platforms TEXT      模型平台配置 as a JSON string.
  • platform_name 可以任意填写,不要重复即可
  • platform_type 以后可能根据平台类型做一些功能区分,与platform_name一致即可
  • 将框架部署的模型填写到对应列表即可。不同框架可以加载同名模型,项目会自动做负载均衡。
  • 设置模型
$ chatchat-config model --set_model_platforms "[{
    \"platform_name\": \"xinference\",
    \"platform_type\": \"xinference\",
    \"api_base_url\": \"http://127.0.0.1:9997/v1\",
    \"api_key\": \"EMPT\",
    \"api_concurrencies\": 5,
    \"llm_models\": [
        \"autodl-tmp-glm-4-9b-chat\"
    ],
    \"embed_models\": [
        \"bge-large-zh-v1.5\"
    ],
    \"image_models\": [],
    \"reranking_models\": [],
    \"speech2text_models\": [],
    \"tts_models\": []
}]"

初始化知识库

chatchat-kb -r

启动服务

chatchat -a

模型?

chatchat 0.3版本中,为保证平台、模型、及本地服务的兼容,在保证可扩展性的同时, 我们对模型的加载进行了重新设计. chatchat 0.3之后的版本,我们将分离模型加载和服务启动. 您可以使用提供了openaiEndpoint任何服务,在MODEL_PLATFORMS这里直接配置

chatchat-config model --set_model_platforms TEXT      模型平台配置 as a JSON string.
  • platform_name 可以任意填写,不要重复即可
  • platform_type 以后可能根据平台类型做一些功能区分,与platform_name一致即可
  • 将框架部署的模型填写到对应列表即可。不同框架可以加载同名模型,项目会自动做负载均衡。

部署手册

移步这里 xinference环境配置手册

Metadata

Release files for langchain-chatchat 0.3.0.20240625

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-chatchat 0.3.0.20240625
File Size Uploaded
langchain_chatchat-0.3.0.20240625.tar.gz 23.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-chatchat 0.3.0.20240625
File Interpreter ABI Platform
langchain_chatchat-0.3.0.20240625-py3-none-any.whl Python 3 none any Details

Total release size: 46.2 MB

Release files / langchain_chatchat-0.3.0.20240625.tar.gz

Download URL langchain_chatchat-0.3.0.20240625.tar.gz
Size 23.0 MB
Tags Source
SHA-256 checksum
How to use checksums
3fa3d0c2ef5b802643f8dfbf352db3cc611af35d0ac2d7d6d096edb798be818a
BLAKE2b-256 checksum
How to use checksums
c4ea72cd2b88b5b78449fe82b690e38dfdb429989ced52863d69afc98bf077da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / langchain_chatchat-0.3.0.20240625-py3-none-any.whl

Download URL langchain_chatchat-0.3.0.20240625-py3-none-any.whl
Size 23.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
33ff16462a1d6c23a82bc81d9f58440ce255d34e888ce998f6565b4418529448
BLAKE2b-256 checksum
How to use checksums
42c0ff1261b8a82baaf7726dcb140dfdb6fed604da050947037388cb7e8b6b80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page