Skip to main content

A simple chat cli based on mysql cli.

Project description

cmysql

本项目是一个MySQL客户端(CLI),它的功能是在普通的MySQL客户端的基础上增加了一个chat功能,可以在MySQL客户端上进行对话聊天,以完成更复杂的任务。

依赖

  • MySQL 标准客户端 CLI
  • 一个OpenAI的账号,用于调用OpenAI的API
  • 其他 python 依赖库,请参考 requirements.txt

安装

pip install cmysql

使用

cmysql -h127.0.0.1 -uroot 
cmysql> select 1;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)

cmysql> 这个库是干嘛的?

这个是一个电商系统的数据库,用于存储用户的信息,订单信息,商品信息等等。

cmysql> 有多大?

总共有40GB。

SQL:
select count(*) from information_schema.tables where table_schema='test';
+----------+
| count(*) |
+----------+
|       10 |
+----------+
1 row in set (0.00 sec)

cmysql> 


cmysql> 帮我造1000个订单数据吧

好的,马上开始造数据。

写入中...
10%
50%
100%

完成!

cmysql> 帮我导出一份订单数据,用csv格式存储

文件导出中...
90%
100%
导出完成,文件路径:/tmp/orders.csv

cmysql> 上周的订单量是多少?

总共 1342 个订单。

目标

  • 打造 一个 MySQL Client Copilot,背后是一个 AI Agent
  • 基于人的反馈,来构建一个有记忆的 Database Copilot,需要用到符号化存储(Vector&Graph Database)
  • 除了是一个MySQL Client,还能支持以对话的方式完成以下操作:
    • 数据的导入和导出
    • 数据的查询和可视化
      • 数据字典的管理,可自动识别,可基于HF更新
    • 测试数据的构造
  • 因为是一个mysql客户端的增强,因此只考虑单实例、单并发(对异构数据源、多实例、多人并发的支持会放在后续版本中)

架构设计

img.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chatmysql-0.1.18.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

chatmysql-0.1.18-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file chatmysql-0.1.18.tar.gz.

File metadata

  • Download URL: chatmysql-0.1.18.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for chatmysql-0.1.18.tar.gz
Algorithm Hash digest
SHA256 d2b1de4a30310f255b5c3bdec68b5a1b321c8b090dbb9602b14dd4deacf69e37
MD5 96698c485fbeb14ab836d78254758b62
BLAKE2b-256 06d333d752a8f3f083f8f1105193181519133695223093ecb92f517134c49521

See more details on using hashes here.

File details

Details for the file chatmysql-0.1.18-py3-none-any.whl.

File metadata

  • Download URL: chatmysql-0.1.18-py3-none-any.whl
  • Upload date:
  • Size: 27.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for chatmysql-0.1.18-py3-none-any.whl
Algorithm Hash digest
SHA256 9933c8e2c5ea80e291e87d5460c69501b2443e5965cb6342e5291766f47ff033
MD5 5b1fddb54ea7ffc5e98f3afede014f1b
BLAKE2b-256 22b16b13fa4dd382d8f84e64aca7e54d6ab26b42774523b1cac211125ab0359a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page