Skip to content

zhanglingAI/nl2sql-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NL2SQL Agent — 自然语言查数据库

基于 Qwen3.5-9B 的 NL2SQL 智能查询代理。用自然语言问数据库问题,自动生成 SQL 查询并返回 Excel 结果。

架构

用户 → Web界面 → NL2SQL Agent → Qwen3.5-9B (vLLM API) → SQL
                    ↓                                         ↓
                MySQL (assets)  ← ← ← ← ← ← ← ← ← ← ← ← 执行查询
                    ↓
               Excel 下载 ← 结果

组件

  • Backend: FastAPI (Python)
  • LLM: Qwen3.5-9B 自托管 (OpenAI 兼容 API)
  • DB: MySQL 8 (assets 库)
  • Output: XLSX (openpyxl)

部署

pip install -r requirements.txt
python main.py

访问 http://localhost:8800

About

NL2SQL Agent - natural language to SQL query tool using Qwen3.5-9B

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors