Skip to main content

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

Metadata

Release files for chatmysql 0.1.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chatmysql 0.1.18
File Size Uploaded
chatmysql-0.1.18.tar.gz 22.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chatmysql 0.1.18
File Interpreter ABI Platform
chatmysql-0.1.18-py3-none-any.whl Python 3 none any Details

Total release size: 50.6 kB

Release files / chatmysql-0.1.18.tar.gz

Download URL chatmysql-0.1.18.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d2b1de4a30310f255b5c3bdec68b5a1b321c8b090dbb9602b14dd4deacf69e37
BLAKE2b-256 checksum
How to use checksums
06d333d752a8f3f083f8f1105193181519133695223093ecb92f517134c49521
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / chatmysql-0.1.18-py3-none-any.whl

Download URL chatmysql-0.1.18-py3-none-any.whl
Size 27.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9933c8e2c5ea80e291e87d5460c69501b2443e5965cb6342e5291766f47ff033
BLAKE2b-256 checksum
How to use checksums
22b16b13fa4dd382d8f84e64aca7e54d6ab26b42774523b1cac211125ab0359a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.1.18 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page