Skip to main content

1. About DB-GPT

DB-GPT is an open-source AI native data application development framework (AI Native Data App Development framework with AWEL (Agentic Workflow Expression Language) and Agents). Its purpose is to build infrastructure in the field of large models by developing capabilities like multi-model management (SMMF), Text2SQL optimization, RAG framework and enhancements, multi-agent framework collaboration, AWEL (agentic workflow orchestration), and more. This makes building large model applications centered around databases simpler and more convenient.

2. Obtain API Key

2.1 Open the SiliconFlow official website and register an account (if already registered, simply log in). 2.2 After registration, navigate to API Key, create a new API Key, and copy it for later use.

3. Deploy DB-GPT

3.1 Clone the DB-GPT Source Code

3.2 Create a Virtual Environment and Install Dependencies

3.3 Configure Basic Environment Variables

3.4 Modify the .env Environment Variable File to Configure the SiliconFlow Model

Note that the SILICONFLOW_API_KEY, PROXY_HTTP_OPENAPI_PROXY_SERVER_URL, and RERANK_PROXY_SILICONFLOW_PROXY_API_KEY environment variables are the SiliconFlow API Keys obtained in Step 2. The language model (SILICONFLOW_MODEL_VERSION), embedding model (PROXY_HTTP_OPENAPI_PROXY_BACKEND), and rerank model (RERANK_PROXY_SILICONFLOW_PROXY_BACKEND) can be found in the Model List - SiliconFlow.

3.5 Start the DB-GPT Service

Open the browser and navigate to http://127.0.0.1:5670/ to access the deployed DB-GPT.

4. Use SiliconFlow Models through the DB-GPT Python SDK

4.1 Install the DB-GPT Python Package

Install additional dependencies for testing.

4.2 Use SiliconFlow’s Large Language Model

4.3 Use SiliconFlow’s Embedding Model

4.4 Use SiliconFlow’s Rerank Model

5. Getting Started Guide

Take the data dialogue feature as an example. The data dialogue capability allows natural language conversations with data, primarily supporting structured and semi-structured data, assisting in data analysis and insights. Below is the specific operation process:

1. Add a Data Source

First, select “Data Source” on the left to add a database. DB-GPT currently supports multiple database types. Choose the appropriate database type to add. Here, MySQL is used for demonstration. The test data for this demo can be found in the test examples.

2. Select Dialogue Type

Choose the ChatData dialogue type.

3. Start Data Dialogue

Note: During the conversation, select the corresponding model and database. DB-GPT also provides both preview and edit modes.