Skip to main content

No project description provided

Project description

开始使用

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

pypi安装一键启动

  • 安装chatchat
pip install langchain-chatchat -U

工作空间配置

操作指令 chatchat-config

options:
     
    -h, --help            show this help message and exit
    -v {true,false}, --verbose {true,false}
    是否开启详细日志
    -d DATA, --data DATA  数据存放路径
    -f FORMAT, --format FORMAT
    日志格式
    --clear               清除配置
    --show               显示配置

查看配置

 chatchat-config --show                                                                                               ±[●●][dev_config_init]
{
    "log_verbose": false,
    "CHATCHAT_ROOT": "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/libs/chatchat-server/chatchat",
    "DATA_PATH": "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/libs/chatchat-server/chatchat/data",
    "IMG_DIR": "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/libs/chatchat-server/chatchat/img",
    "NLTK_DATA_PATH": "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/libs/chatchat-server/chatchat/data/nltk_data",
    "LOG_FORMAT": "%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s",
    "LOG_PATH": "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/libs/chatchat-server/chatchat/data/logs",
    "MEDIA_PATH": "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/libs/chatchat-server/chatchat/data/media",
    "BASE_TEMP_DIR": "/media/gpt4-pdf-chatbot-langchain/langchain-ChatGLM/libs/chatchat-server/chatchat/data/temp",
    "class_name": "ConfigBasic"
}

模型服务配置

如果您已经有了一个openai endpoint的能力的地址,可以在configs._model_config.py文件中MODEL_PLATFORMS直接配置

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

自定义平台加载

可以通过 model_providers 提供转换不同平台的接口为openai endpoint的能力

配置CHATCHAT_ROOT文件夹configs中的model_providers.yaml文件,即可完成自定义平台加载

 
vim model_providers.yaml

注意: 在您配置平台之前,请确认平台依赖完整,例如智谱平台,您需要安装智谱sdk pip install zhipuai

详细配置请参考README.md

初始化知识库

chatchat-kb -r

启动服务

chatchat -a

模型?

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_chatchat-0.3.0.20240612.2.tar.gz (27.1 MB view details)

Uploaded Source

Built Distribution

File details

Details for the file langchain_chatchat-0.3.0.20240612.2.tar.gz.

File metadata

File hashes

Hashes for langchain_chatchat-0.3.0.20240612.2.tar.gz
Algorithm Hash digest
SHA256 4d300b18a10baf15c19fea91e36d0f24984b8dcd1e0aac56cab7036cd862f26f
MD5 7c6ff6cd41a31cf1fc782cfa0e1c91ac
BLAKE2b-256 4e29dfbd3f51d2f7a0e91fcdc9bcacb40e94c00a07d345f33bf3f7add52c6f2c

See more details on using hashes here.

File details

Details for the file langchain_chatchat-0.3.0.20240612.2-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_chatchat-0.3.0.20240612.2-py3-none-any.whl
Algorithm Hash digest
SHA256 889ece67809af4e1283d3b6de91119b310cc847e971589056025228d550625be
MD5 31ab62e10fa57c018880360268431f98
BLAKE2b-256 94563dcaa4a5a1e2b27f95ec5739a10f7b17973b2b91d880f5f54198c4939708

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page