Skip to main content

Langchain-Chatchat (formerly langchain-ChatGLM), local knowledge based LLM (like ChatGLM, Qwen and Llama) RAG and Agent app with langchain

Project description

项目简介

chatchat-space%2FLangchain-Chatchat | Trendshift

pypi badge Generic badge

🌍 READ THIS IN ENGLISH

📃 LangChain-Chatchat (原 Langchain-ChatGLM)

基于 ChatGLM 等大语言模型与 Langchain 等应用框架实现,开源、可离线部署的 RAG 与 Agent 应用项目。

点击这里了解项目详情。

安装

  1. PYPI 安装
pip install langchain-chatchat

# or if you use xinference to provide model API:
# pip install langchain-chatchat[xinference]

详见这里的安装指引

注意:chatchat请放在独立的虚拟环境中,比如conda,venv,virtualenv等 已知问题,不能跟xinference一起安装,会让一些插件出bug,例如文件无法上传

  1. 源码安装

除了通过pypi安装外,您也可以选择使用源码启动。(Tips: 源码配置可以帮助我们更快的寻找bug,或者改进基础设施。我们不建议新手使用这个方式)

  1. Docker
docker pull chatimage/chatchat:0.3.0-2024-0624

[!important] 强烈建议: 使用 docker-compose 部署, 具体参考 README_docker

  1. AudoDL

🌐 AutoDL 镜像0.3.0 版本所使用代码已更新至本项目 v0.3.0 版本。

初始化与配置

项目运行需要特定的数据目录和配置文件,执行下列命令可以生成默认配置(您可以随时修改 yaml 配置文件):

# set the root path where storing data.
# will use current directory if not set
export CHATCHAT_ROOT=/path/to/chatchat_data

# initialize data and yaml configuration templates
chatchat init

CHATCHAT_ROOT 或当前目录可以找到 *_settings.yaml 文件,修改这些文件选择合适的模型配置,详见初始化

启动服务

确保所有配置正确后(特别是 LLM 和 Embedding Model),执行下列命令创建默认知识库、启动服务:

chatchat kb -r
chatchat -a

如无错误将自动弹出浏览器页面。

更新日志:

0.3.1.1 (2024-07-15)

  • 修复:
    • WEBUI 中设置 system message 无效(#4491)
    • 模型平台不支持代理(#4492)
    • 移除失效的 vqa_processor & aqa_processor 工具(#4498)
    • prompt settings 错误导致 KeyError: 'template'(#4501)
    • searx 搜索引擎不支持中文(#4504)
    • init时默认去连 xinference,若默认 xinference 服务不存在会报错(#4508)
    • init时,调用shutil.copytree,当src与dst一样时shutil报错的问题(#4507)

项目里程碑

  • 2023年4月: Langchain-ChatGLM 0.1.0 发布,支持基于 ChatGLM-6B 模型的本地知识库问答。

  • 2023年8月: Langchain-ChatGLM 改名为 Langchain-Chatchat,发布 0.2.0 版本,使用 fastchat 作为模型加载方案,支持更多的模型和数据库。

  • 2023年10月: Langchain-Chatchat 0.2.5 发布,推出 Agent 内容,开源项目在Founder Park & Zhipu AI & Zilliz 举办的黑客马拉松获得三等奖。

  • 2023年12月: Langchain-Chatchat 开源项目获得超过 20K stars.

  • 2024年6月: Langchain-Chatchat 0.3.0 发布,带来全新项目架构。

  • 🔥 让我们一起期待未来 Chatchat 的故事 ···


协议

本项目代码遵循 Apache-2.0 协议。

联系我们

Telegram

Telegram

引用

如果本项目有帮助到您的研究,请引用我们:

@software{langchain_chatchat,
    title        = {{langchain-chatchat}},
    author       = {Liu, Qian and Song, Jinke, and Huang, Zhiguo, and Zhang, Yuxuan, and glide-the, and Liu, Qingwei},
    year         = 2024,
    journal      = {GitHub repository},
    publisher    = {GitHub},
    howpublished = {\url{https://github.com/chatchat-space/Langchain-Chatchat}}
}

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.1.1.tar.gz (18.8 MB view hashes)

Uploaded Source

Built Distribution

langchain_chatchat-0.3.1.1-py3-none-any.whl (19.0 MB view hashes)

Uploaded Python 3

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