Categorygithub.com/byebyebruce/chat2data
repository
0.5.3
Repository: https://github.com/byebyebruce/chat2data.git
Documentation: pkg.go.dev

# 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

Go Report Card GitHub release (with filter) Docker Pulls

🗣 📊 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

CLI Web UI

Install

Download

Releases Page

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 file cp .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
  1. 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 or chat2data 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
  2. 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

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

Change Log

Special Thanks