chat2data

module
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2023 License: MIT

README

Chat2Data is a tool that uses AI to facilitate interaction with your MySQL, PostgreSQL, SQLite3 databases.

Feature

  • 🗣 Easy Interaction: Chat2Data lets you chat with your databases, making it intuitive to use.
  • 🔗 Multiple Databases: It supports MySQL, PostgreSQL, SQLite3, and CSV files.
  • 🐳 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 Go command.
  • 🧠 AI Integration: It leverages OpenAI API for advanced natural language processing.

Preview

CLI

Web UI

Quick Run(Docker)

docker run --rm -it -e OPENAI_API_KEY=xxx bailu1901/chat2data --mysql=root:pwd@tcp(localhost:3306)/mydb

Install

  • go >= 1.19
go install github.com/byebyebruce/chat2data/cmd/chat2data@latest

Run

  1. Config environment variables
    • Use local .env file cp .env.template .env then edit it.
    • You can also use export OPENAI_API_KEY=xxx to specify the environment variables.
  2. Run CLI(command line interface)
    • help chat2data --help
    • mysql chat2data --mysql=root:pwd@tcp(localhost:3306)/mydb
    • postgre chat2data --postgre=postgres://db_user:mysecretpassword@localhost:5438/test?sslmode=disable
    • sqlite3 chat2data --sqlite3=mytest.db
    • csv chat2data --csv=csvfile.csv or chat2data --csv=csvdir
    • with env OPENAI_API_KEY=xxx chat2data --mysql=root:pwd@tcp(localhost:3306)/mydb
  3. Run Web UI
    • mysql chat2data --mysql="root:example@tcp(10.12.21.101:3306)/mydb" --web=8088

    • sqlite3 chat2data --sqlite3=./mytest.db --web=8088

Build by source

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
  • Doc QA

Change Log

Special Thanks

Directories

Path Synopsis
cmd
chat2data command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL