# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# README
🗣 📊 Chat2Data is a tool for interacting with your data, including MySQL, PostgreSQL, SQLite3, CSV, Text, PDF, and HTML pages.
Feature
- 🗣 Easy Interaction: Chat2Data allows you to chat with your data, making it intuitive to use.
- 🔗 Multiple Databases: It supports MySQL, PostgreSQL, SQLite3, CSV, Text, PDF, and HTML pages.
- 🐳 Docker Support: It provides a Docker image for easy deployment.
- 💻 CLI and Web UI: It offers both a command line and a web interface.
- ⚙️ Simple Installation: It's easy to install with a Go command.
- 🧠 AI Integration: It leverages the OpenAI API for advanced natural language processing.
Preview
Install
Download
Go install
go install github.com/byebyebruce/chat2data/cmd/chat2data@latest
Quick Run
- Binary
OPENAI_API_KEY=xxx chat2data db -c testdata/world_happiness_2015.db
Ask: Which is the highest happiness country?
- Docker
docker run --rm -it -e OPENAI_API_KEY=xxx -p 8088:8088 bailu1901/chat2data html 'https://github.com/byebyebruce/chat2data'
Open http://localhost:8088
in browser, then ask: What is the feature of chat2data?
Config
- Use local
.env
filecp .env.template .env
then edit it. - You can also use
export OPENAI_API_KEY=xxx
to specify the environment variables. - Or run with env
OPENAI_API_KEY=xxx OPENAI_BASE_URL=https://api.openai.com/v1 chat2data db root:pwd@tcp(localhost:3306)/mydb
Usage
- help
chat2data --help
global flags
--web -w web ui port
--cli -c cli mode
- Run CLI(command line interface)
- mysql
chat2data db -c root:pwd@tcp(localhost:3306)/mydb
- postgre
chat2data db -c postgres://db_user:mysecretpassword@localhost:5438/test?sslmode=disable
- sqlite3
chat2data db -c sqlite.db
- csv
chat2data csv -c csvfile.csv
orchat2data csv csvdir
- html
chat2data html -c https://github.com/byebyebruce/chat2data
- text
chat2data txt -c textfile.txt
- with env
OPENAI_API_KEY=xxx chat2data db -c root:pwd@tcp(localhost:3306)/mydb
- mysql
- Run Web UI
- mysql
chat2data db root:example@tcp(10.12.21.101:3306)/mydb
- html
chat2data html https://github.com/byebyebruce/chat2data
- pdf
chat2data pdf testdata/sample.pdf
- sqlite3
chat2data db -w=:0.0.0.0:8088 mytest.db
- mysql
Build
git clone github.com/byebyebruce/chat2data
- build binary
make build
- build docker image
docker build -t chat2data .
TODO
- Support Docker
- Support Postgre Database
- Support load csv
- Add Web ui
- Local vector database
- Support load html
- Support load pdf
- Doc QA
- Support word
- Beautiful CLI