{"id":20734377,"url":"https://github.com/byebyebruce/chat2data","last_synced_at":"2025-04-23T23:04:59.125Z","repository":{"id":178495549,"uuid":"660580393","full_name":"byebyebruce/chat2data","owner":"byebyebruce","description":"🗣 📊Chat2Data is a tool for interacting with your DATA, supporting MySQL, PostgreSQL, SQLite3, and CSV files","archived":false,"fork":false,"pushed_at":"2023-10-26T07:28:08.000Z","size":1518,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T23:04:52.417Z","etag":null,"topics":["ai","chat","chatgpt","csv","database","embed","langchaigo","langchain","llm","mysql","openai","pdf","postgres","sqlite","txt","vectordb","web-ui"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/byebyebruce.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-30T10:26:33.000Z","updated_at":"2025-02-19T07:05:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc33e29c-3b18-4fe2-a776-d3ecc33e61b3","html_url":"https://github.com/byebyebruce/chat2data","commit_stats":null,"previous_names":["byebyebruce/chat2data"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byebyebruce%2Fchat2data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byebyebruce%2Fchat2data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byebyebruce%2Fchat2data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byebyebruce%2Fchat2data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byebyebruce","download_url":"https://codeload.github.com/byebyebruce/chat2data/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250528732,"owners_count":21445516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","chat","chatgpt","csv","database","embed","langchaigo","langchain","llm","mysql","openai","pdf","postgres","sqlite","txt","vectordb","web-ui"],"created_at":"2024-11-17T05:30:10.324Z","updated_at":"2025-04-23T23:04:59.101Z","avatar_url":"https://github.com/byebyebruce.png","language":"Go","readme":" \u003cdiv align=\"center\"\u003e\n   \u003cimg src=\"https://readme-typing-svg.demolab.com/?lines=Chat+2+Data\u0026size=50\u0026height=80\u0026center=true\u0026vCenter=true\u0026\u0026duration=1000\u0026pause=5000\"\u003e\n\u003c/div\u003e\n\n中文 | [English](README_en.md)\n\n\u003e  🗣 📊 Chat2Data是一个与数据交互的工具,支持MySQL、PostgreSQL、SQLite3、CSV、文本、PDF和HTML页面。\n \n[![Go Report Card](https://goreportcard.com/badge/github.com/byebyebruce/chat2data)](https://goreportcard.com/report/github.com/byebyebruce/chat2data)\n![GitHub release (with filter)](https://img.shields.io/github/v/release/byebyebruce/chat2data)\n[![Docker Pulls](https://img.shields.io/docker/pulls/bailu1901/chat2data)](https://hub.docker.com/r/bailu1901/chat2data/)\n![](https://hits.sh/github.com/byebyebruce/chat2data/doc/hits.svg?label=visit)\n\n\n## 特性\n* 🗣 易于交互:Chat2Data允许你通过聊天的方式与数据交互,使得使用很直观。\n* 🔗 支持多种数据库:它支持MySQL、PostgreSQL、SQLite3、CSV、文本、PDF和HTML页面。\n* 🐳 Docker支持:提供Docker镜像方便部署。\n* 💻 命令行和Web界面:同时提供命令行和Web界面。\n* ⚙️ 简单安装:通过Go命令可以很容易安装。\n* 🧠 AI集成:利用OpenAI API进行高级自然语言处理。\n\n## 预览\n![CLI](doc/cli.jpg)\n![Web UI](doc/web-ui.png)\n\n## 安装\n#### 下载编译好的程序  \n[Releases Page](https://github.com/byebyebruce/chat2data/releases)\n  \n#### Go安装 \n`go install github.com/byebyebruce/chat2data/cmd/chat2data@latest`\n\n## 快速运行\n* 二进制程序\n```bash\nOPENAI_API_KEY=xxx chat2data db -c testdata/world_happiness_2015.db\n```\n输入: `Which is the highest happiness country?`\n\n* Docker\n```bash\ndocker run --rm -it -e OPENAI_API_KEY=xxx -p 8088:8088 bailu1901/chat2data html 'https://github.com/byebyebruce/chat2data'\n```\n在浏览器打开 http://localhost:8088,然后询问:chat2data的特性是什么?\n\n## 配置\n* 使用本地.env文件 cp .env.template .env 然后编辑它。\n* 也可以使用 export OPENAI_API_KEY=xxx 来指定环境变量。\n* 或者带着环境变量运行 OPENAI_API_KEY=xxx OPENAI_BASE_URL=https://api.openai.com/v1 chat2data db root:pwd@tcp(localhost:3306)/mydb    \n \n## 用法\n* 帮助信息 chat2data --help \n* 全局参数\n```bash\n      --web  -w  web ui port\n      --cli  -c  cli mode\n```\n1. 运行命令行CLI(Command Line Interface)\n   * mysql `chat2data db -c root:pwd@tcp(localhost:3306)/mydb` \n   * postgre `chat2data db -c postgres://db_user:mysecretpassword@localhost:5438/test?sslmode=disable`\n   * sqlite3 `chat2data db -c sqlite.db`\n   * csv `chat2data csv -c csvfile.csv` or `chat2data csv csvdir`\n   * html `chat2data html -c https://github.com/byebyebruce/chat2data`\n   * text `chat2data txt -c textfile.txt`\n   * with env `OPENAI_API_KEY=xxx chat2data db -c root:pwd@tcp(localhost:3306)/mydb`\n2. 运行Web界面\n   * mysql `chat2data db root:example@tcp(10.12.21.101:3306)/mydb`\n   * html `chat2data html https://github.com/byebyebruce/chat2data`\n   * pdf `chat2data pdf testdata/sample.pdf`\n   * sqlite3 `chat2data db -w=:0.0.0.0:8088 mytest.db`\n\n## 构建\n`git clone github.com/byebyebruce/chat2data`\n* 构建二进制程序\n```base\nmake build\n```\n* 构建Docker镜像\n```bash \ndocker build -t chat2data .\n```\n\n## TODO\n- [x] 支持Docker\n- [x] 支持PostgreSQL数据库\n- [x] 支持加载CSV\n- [x] 添加Web界面\n- [x] 本地向量数据库\n- [x] 支持加载HTML\n- [x] 支持加载PDF\n- [x] 文档问答\n- [ ] 支持Word 文档\n- [ ] 更优雅的命令行界面\n\n## [更新日志](CHANGELOG.md)\n\n## 特别感谢\n* [🦜️🔗 LangChain Go](https://github.com/tmc/langchaingo)\n \n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyebyebruce%2Fchat2data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyebyebruce%2Fchat2data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyebyebruce%2Fchat2data/lists"}