feat: Clickhouse Connection (#476)

1.add Clickhouse Connection
```
class ClickhouseConnect(RDBMSDatabase):
    """Connect Clickhouse Database fetch MetaData
    Args:
    Usage:
    """
```
2.chatdata document update
3.README support Windows
This commit is contained in:
magic.chen
2023-08-22 20:35:13 +08:00
committed by GitHub
11 changed files with 264 additions and 77 deletions

View File

@@ -27,6 +27,15 @@ you can execute sql script to generate data.
![db plugins demonstration](../../../../assets/chat_data/add_datasource.png)
```{note}
now DB-GPT support Datasource Type
* Mysql
* Sqlite
* DuckDB
* Clickhouse
```
### 2.ChatData
After successfully setting up the data source, you can start conversing with the database. You can ask it to generate
@@ -34,6 +43,7 @@ SQL for you or inquire about relevant information on the database's metadata.
![db plugins demonstration](../../../../assets/chat_data/chatdata_eg.png)
### 3.ChatDB
![db plugins demonstration](../../../../assets/chat_data/chatdb_eg.png)

View File

@@ -1,10 +1,24 @@
Chat DB FAQ
==================================
##### Q1: What difference between ChatData and ChatDB
ChatData generates SQL from natural language and executes it. ChatDB involves conversing with metadata from the Database, including metadata about databases, tables, and fields.
##### Q2: The suitable llm model currently supported for text-to-SQL is?
##### Q1: What difference between ChatData and ChatDB
ChatData generates SQL from natural language and executes it. ChatDB involves conversing with metadata from the
Database, including metadata about databases, tables, and fields.
##### Q2: The suitable llm model currently supported for text-to-SQL is?
Now vicunna-13b-1.5 and llama2-70b is more suitable for text-to-SQL.
##### Q3: How to fine-tune Text-to-SQL in DB-GPT
##### Q3: How to fine-tune Text-to-SQL in DB-GPT
there is another github project for Text-to-SQL fine-tune (https://github.com/eosphoros-ai/DB-GPT-Hub)
##### Q4: chatdata with clickhouse clickhouse-sqlalchemy 0.2.4 requires sqlalchemy<1.5,>=1.4.24, but you have sqlalchemy 2.0.20 which is incompatible
Just set sqlalchemy<1.5,>=1.4.24
```commandline
pip install clickhouse-driver
pip install sqlalchemy==1.4.24
```