Quickstart
DB-GPT supports the installation and use of a variety of open source and closed models. Different models have different requirements for environment and resources. If localized model deployment is required, GPU resources are required for deployment. The API proxy model requires relatively few resources and can be deployed and started on a CPU machine.
note
- Detailed installation and deployment tutorials can be found in Installation.
- This page only introduces deployment based on ChatGPT proxy and local glm model.
Environmental preparation
Download source code
提示
Download DB-GPT
git clone https://github.com/eosphoros-ai/DB-GPT.git
Miniconda environment installation
- The default database uses SQLite, so there is no need to install a database in the default startup mode. If you need to use other databases, you can read the advanced tutorials below. We recommend installing the Python virtual environment through the conda virtual environment. For the installation of Miniconda environment, please refer to the Miniconda installation tutorial.
提示
Create a Python virtual environment
python >= 3.10
conda create -n dbgpt_env python=3.10
conda activate dbgpt_env
# it will take some minutes
pip install -e ".[default]"
提示
Copy environment variables
cp .env.template .env
Model deployment
note
Provide two deployment methods to quickly start experiencing DB-GPT.
- Open AI(Proxy LLM)
- glm-4(Local LLM)
note
⚠️ You need to ensure that git-lfs is installed
● CentOS installation: yum install git-lfs
● Ubuntu installation: apt-get install git-lfs
● MacOS installation: brew install git-lfs
Install dependencies
pip install -e ".[openai]"
Download embedding model
cd DB-GPT
mkdir models and cd models
git clone https://huggingface.co/GanymedeNil/text2vec-large-chinese
Configure the proxy and modify LLM_MODEL, PROXY_API_URL and API_KEY in the .env
file
# .env
LLM_MODEL=chatgpt_proxyllm
PROXY_API_KEY={your-openai-sk}
PROXY_SERVER_URL=https://api.openai.com/v1/chat/completions