Langchain Chatchat is a knowledge base enhancement solution that enables: fully localized reasoning, focusing on solving the enterprise pain points of data security protection and private domain deployment. The open source solution is licensed under the Apache License and can be commercialized free of charge.
Support for the market mainstream local large language model and Embedding model , support for open source local vector database .
1. Environmental configuration
First, make sure your machine has Python 3.8 - 3.11 installed (Python 3.11 is highly recommended). Do not use the latest version!
$ python --version
Demo environment is Windows 11, RTX 4090 24GB, i7-12700
To install CUDA Toolkit, it is recommended to install CUDA version 12.1 as this is the version used by the developers, click to go to [Official Download]
Note that if you're not overseas, you need to have global scientific internet access yourself, otherwise it won't install properly.
2. Formal installation
Pull the repository project file:
# Pull Warehouse
$ git clone https://github.com/chatchat-space/Langchain-Chatchat.git# Access to Catalog
$ cd Langchain-Chatchat# Install all dependencies
$ pip install -r requirements.txt
$ pip install -r requirements_api.txt
$ pip install -r requirements_webui.txt# default dependencies include the base runtime environment (FAISS vector library). If you want to use a vector library such as milvus/pg_vector, please uncomment the corresponding dependency in requirements.txt before installing.
3. Download model
git lfs install
git clone https://huggingface.co/THUDM/chatglm3-6b
git clone https://huggingface.co/BAAI/bge-large-zh
Initialization Configuration
python copy_config_example.py
python init_database.py --recreate-vs
4. Activation
python startup.py -a
The first time you start it, you need to enter an email address to open the webUI visualization for use!
Recommended parameters for GPU hardware
7B model with 14GB+ of video memory, recommended NVIDIA RTX4080 16G and above
Class 14B model with 30GB+ of video memory, recommended NVIDIA Tesla V100 32G and higher
39B class model with 69GB+ of video memory, recommended NVIDIA A100 80G and above
72B-class model with 145GB+ of video memory, requires professional-grade graphics card or multi-card stacking