Write Your Own Chat Data With AWEL
In this guide, we will show you how to write your own Chat Data with AWEL, just
link the scene of Chat Data in DB-GPT.
This guide is a little bit advanced, may take you some time to understand it. If you have any questions, please feel free to ask in the DB-GPT issues.
Introduction
Chat Data is chat with your database. Its goal is to interact with the database
through natural language, it includes the following steps:
- Build knowledge base: parse the database schema and other information to build a knowledge base.
- Chat with database: chat with the database through natural language.
There are some steps of Chat with database:
- Retrieve relevant information: retrieve the relevant information from the database according to the user's query.
- Generate response: pass relevant information and user query to the LLM, and then generate a response which includes some SQL and other information.
- Execute SQL: execute the SQL to get the final result.
- Visualize result: visualize the result and return it to the user.
In this guide, we mainly focus on step 1, 2, and 3.
Install Dependencies
First, you need to install the dbgpt library.
pip install "dbgpt[rag, agent, client, simple_framework]>=0.7.0" "dbgpt_ext>=0.7.0" -U
pip install openai