Skip to content

Commit d585811

Browse files
update readme
1 parent 7b5f75d commit d585811

File tree

3 files changed

+90
-61
lines changed

3 files changed

+90
-61
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
- [Database Configuration](#database-configuration)
4444
- [Launch](#launch)
4545
- [Claude Desktop](#claude-desktop)
46+
- [Goose](#goose)
4647
- [Citation](#citation)
4748

4849

@@ -91,7 +92,7 @@ a default config file is provided in config_demo.yml which looks like this:
9192
model:
9293
name: "pre-xiyansql-qwencoder-32b"
9394
key: ""
94-
url: "https://poc-dashscope.aliyuncs.com/compatible-mode/v1"
95+
url: "https://pre-xiyan-stream.biz.aliyun.com/service/api/xiyan-sql"
9596

9697
database:
9798
host: "localhost"
@@ -131,19 +132,21 @@ name: "YOUR NAME",
131132
email: "YOUR EMAIL",
132133
organization: "your college or Company or Organization"
133134
```
134-
We will send you a ``key`` according to your email. And you can fill the ``env`` in the yml file.
135+
We will send you a ``key`` according to your email. And you can fill the ``key`` in the yml file.
136+
The ``key`` will be expired by 1 month or 200 queries or other legal restrictions.
137+
135138
136139
```yaml
137140
model:
138141
name: "pre-xiyansql-qwencoder-32b"
139142
key: "KEY"
140-
url: "https://poc-dashscope.aliyuncs.com/compatible-mode/v1"
143+
url: "https://pre-xiyan-stream.biz.aliyun.com/service/api/xiyan-sql"
141144
database:
142145
```
143146
144147
Note: this model service is just for trial, if you need to use it in production, please contact us.
145148
146-
Alternatively, you can also deploy the model (XiYanSQL-qwencoder-32B) on your own server.
149+
Alternatively, you can also deploy the model [XiYanSQL-qwencoder-32B](https://github.com/XGenerationLab/XiYanSQL-QwenCoder) on your own server.
147150
148151
#### Local LLMs
149152
To support in the future.

README_zh.md

Lines changed: 83 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,96 @@
1-
<h1 align="center">XiYan MCP服务器</h1>
1+
<h1 align="center">XiYan MCP Server</h1>
22
<p align="center">
33
<a href="https://github.com/XGenerationLab/XiYan-SQL"><img alt="MCP Playwright" src="https://raw.githubusercontent.com/XGenerationLab/XiYan-SQL/main/xiyanGBI.png" height="60"/></a>
44
</p>
55
<p align="center">
6-
<b>一个模型上下文协议MCP服务器,能够通过自然语言查询数据库</b></br>
7-
<sub>由 <a href="https://github.com/XGenerationLab/XiYan-SQL">XiYan-SQL</a> 提供支持,这是开放基准上的文本到SQL的最新技术</sub>
6+
<b>一个模型上下文协议 (MCP) 服务器,支持自然语言查询数据库</b></br>
7+
<sub>由 <a href="https://github.com/XGenerationLab/XiYan-SQL">XiYan-SQL</a> 提供支持,Test-to-SQL公开基准上的SOTA</sub>
88
</p>
99

1010
<p align="center">
1111
💻 <a href="https://github.com/XGenerationLab/xiyan_mcp_server">XiYan-mcp-server</a> |
1212
🌐 <a href="https://github.com/XGenerationLab/XiYan-SQL">XiYan-SQL</a> |
1313
📖 <a href="https://arxiv.org/abs/2411.08599"> Arxiv</a> |
14-
📄 <a href="https://paperswithcode.com/paper/xiyan-sql-a-multi-generator-ensemble">PapersWithCode</a> <br />
15-
<a href="https://smithery.ai/server/@XGenerationLab/xiyan_mcp_server"><img alt="Smithery Installs" src="https://smithery.ai/badge/@XGenerationLab/xiyan_mcp_server" height="20"/></a><br />
16-
<a href="https://github.com/XGenerationLab/xiyan_mcp_server">英文</a> | <a href="https://github.com/XGenerationLab/xiyan_mcp_server/blob/main/README_zh.md"> 中文 </a>
14+
📄 <a href="https://paperswithcode.com/paper/xiyan-sql-a-multi-generator-ensemble">PapersWithCode</a> |
15+
💻 <a href="https://huggingface.co/collections/XGenerationLab/xiyansql-models-67c9844307b49f87436808fc">HuggingFace</a> |
16+
🤖 <a href="https://modelscope.cn/collections/XiYanSQL-Models-4483337b614241">ModelScope</a> |
17+
🌕 <a href="https://bailian.console.aliyun.com/xiyan">析言GBI</a>
18+
<br />
19+
<a href="https://pepy.tech/projects/xiyan-mcp-server"><img src="https://static.pepy.tech/badge/xiyan-mcp-server" alt="PyPI 下载量"></a>
20+
<a href="https://smithery.ai/server/@XGenerationLab/xiyan_mcp_server"><img alt="Smithery 安装量" src="https://smithery.ai/badge/@XGenerationLab/xiyan_mcp_server" height="20"/></a>
21+
<a href="https://github.com/XGenerationLab/xiyan_mcp_server" target="_blank">
22+
<img src="https://img.shields.io/github/stars/XGenerationLab/xiyan_mcp_server?style=social" alt="GitHub stars" />
23+
</a>
24+
<br />
25+
<a href="https://github.com/XGenerationLab/xiyan_mcp_server">English</a> | <a href="https://github.com/XGenerationLab/xiyan_mcp_server/blob/main/README_zh.md"> 中文 </a><br />
26+
<a href="https://github.com/XGenerationLab/xiyan_mcp_server/blob/main/imgs/dinggroup_out.png">钉钉群</a>|
27+
<a href="https://weibo.com/u/2540915670" target="_blank">在微博上关注我</a>
1728
</p>
1829

19-
2030
## 目录
2131

2232
- [功能](#features)
2333
- [工具预览](#tool-preview)
2434
- [安装](#installation)
25-
- [通过pip安装](#installing-from-pip)
26-
- [通过Smithery.ai安装](#installing-from-smitheryai)
35+
- [通过 pip 安装](#installing-from-pip)
36+
- [通过 Smithery.ai 安装](#installing-from-smitheryai)
2737
- [配置](#configuration)
28-
- [LLM配置](#llm-configuration)
29-
- [通用LLMs](#general-llms)
30-
- [文本到SQL的最新技术模型](#text-to-sql-sota-model)
31-
- [本地LLMs](#local-llms)
38+
- [LLM 配置](#llm-configuration)
39+
- [通用 LLM](#general-llms)
40+
- [文本到 SQL SOTA 模型](#text-to-sql-sota-model)
41+
- [本地 LLM](#local-llms)
3242
- [数据库配置](#database-configuration)
3343
- [启动](#launch)
34-
- [Claude桌面](#claude-desktop)
44+
- [Claude 桌面](#claude-desktop)
45+
- [Goose](#goose)
3546
- [引用](#citation)
3647

37-
3848
## 功能
39-
- 🌐 通过 [XiYanSQL](https://github.com/XGenerationLab/XiYan-SQL) 使用自然语言获取数据
40-
- 🖱️ 列出可用的MySQL表作为资源
41-
- 🔧 阅读表内容
49+
- 🌐 通过 [XiYanSQL](https://github.com/XGenerationLab/XiYan-SQL) 以自然语言提取数据
50+
- 🖱️ 列出可用的 MySQL 表作为资源
51+
- 🔧 读取表内容
4252

4353
## 工具预览
44-
- 工具 ``get_data_via_natural_language`` 提供了一个自然语言接口,用于从数据库中检索数据。该服务器将输入的自然语言转换为SQL,并调用数据库返回查询结果。
54+
- 工具 ``get_data_via_natural_language`` 提供从数据库检索数据的自然语言接口。该服务器将输入的自然语言转换为 SQL,并调用数据库返回查询结果。
4555

46-
- 资源 ``mysql://{table_name}`` 允许在指定特定表名时从数据库获取一部分示例数据以供模型参考
47-
- 资源 ``mysql://`` 将列出当前数据库的名称
56+
- ``mysql://{table_name}`` 资源允许在指定特定的表名时,从数据库获取一部分样本数据以供模型参考
57+
- ``mysql://`` 资源将列出当前数据库的名称
4858

4959
## 安装
50-
### 通过pip安装
60+
### 通过 pip 安装
5161

52-
需要Python 3.11或更高版本
53-
您可以通过pip安装服务器,它将安装最新版本。
62+
需要 Python 3.11 及以上版本
63+
您可以通过 pip 安装服务器,它将安装最新版本。
5464

5565
```bash
5666
pip install xiyan-mcp-server
5767
```
5868

59-
之后您可以通过以下命令直接运行服务器
69+
之后您可以直接运行服务器
6070
```bash
6171
python -m xiyan_mcp_server
6272
```
63-
但在您完成以下配置之前,它不会提供任何功能。
64-
您将获得一个yml文件。之后您可以通过以下命令运行服务器:
73+
但是在您完成后续配置之前,它不会提供任何功能。
74+
您将获得一个 yml 文件。之后您可以通过以下命令运行服务器:
6575
```yaml
6676
env YML=path/to/yml python -m xiyan_mcp_server
6777
```
6878

69-
### 通过Smithery.ai安装
70-
请参阅 [@XGenerationLab/xiyan_mcp_server](https://smithery.ai/server/@XGenerationLab/xiyan_mcp_server)
79+
### 通过 Smithery.ai 安装
80+
请参见 [@XGenerationLab/xiyan_mcp_server](https://smithery.ai/server/@XGenerationLab/xiyan_mcp_server)
7181

72-
未完全测试
82+
尚未全面测试
7383

7484
## 配置
7585

76-
您需要一个yml配置文件来配置服务器
77-
在config_demo.yml中提供了默认配置文件,内容如下:
86+
您需要一个 yml 配置文件来配置服务器
87+
在 config_demo.yml 中提供了一个默认配置文件,内容如下:
7888

7989
```yaml
8090
model:
81-
name: "pre-xiyan_multi_dialect_v3"
91+
name: "pre-xiyansql-qwencoder-32b"
8292
key: ""
83-
url: "https://poc-dashscope.aliyuncs.com/compatible-mode/v1"
93+
url: "https://pre-xiyan-stream.biz.aliyun.com/service/api/xiyan-sql"
8494

8595
database:
8696
host: "localhost"
@@ -90,48 +100,58 @@ database:
90100
database: ""
91101
```
92102
93-
### LLM配置
94-
``Name``是要使用的模型名称``key``是模型的API密钥``url``是模型的API网址。我们支持以下模型。
95-
#### 通用LLMs
96-
如果您想使用通用LLMs,例如gpt3.5,您可以直接配置如下:
103+
### LLM 配置
104+
``Name`` 是要使用的模型的名称``key`` 是模型的 API 密钥``url`` 是模型的 API 地址。我们支持以下模型。
105+
#### 通用 LLM
106+
如果您想使用通用 LLM,比如 gpt3.5,您可以直接配置如下:
97107
```yaml
98108
model:
99109
name: "gpt-3.5-turbo"
100-
key: "YOUR KEY"
101-
url: "https://api.openai.com/v1/chat/completions"
110+
key: "您的密钥"
111+
url: "https://api.openai.com/v1"
102112
database:
103113
```
104114
105-
如果您想使用阿里巴巴的Qwen,例如Qwen-max,
115+
如果您想使用阿里巴巴的 Qwen,例如 Qwen-max,您可以使用以下配置。
106116
```yaml
107117
model:
108118
name: "qwen-max"
109-
key: "YOUR KEY"
119+
key: "您的密钥"
110120
url: "https://dashscope.aliyuncs.com/compatible-mode/v1"
111121
database:
112122
```
123+
#### 文本到 SQL SOTA 模型
124+
最后,我们推荐使用 XiYanSQL-qwencoder-32B (https://github.com/XGenerationLab/XiYanSQL-QwenCoder),这是文本到 SQL 的 SOTA 模型,见 [Bird benchmark](https://bird-bench.github.io/)。
125+
我们在阿里云 DashScope 上部署了该模型,因此您需要设置以下环境变量:
126+
请发送您的电子邮件以获取 ``key``。 ( godot.lzl@alibaba-inc.com )
127+
在电子邮件中,请附上以下信息:
128+
```yaml
129+
name: "您的姓名",
130+
email: "您的电子邮件",
131+
organization: "您所在的学校或公司或组织"
132+
```
133+
我们将根据您的电子邮件发送给您一个 ``key``。您可以将该 ``key`` 填写在 yml 文件中。
134+
``key`` 将在一个月或 200 查询或其他法律限制下过期。
113135
114-
#### 文本到SQL的最新技术模型
115-
最后,我们推荐XiYanSQL-qwencoder-32B (https://github.com/XGenerationLab/XiYanSQL-QwenCoder),这是文本到SQL的最新模型。
116-
我们在阿里巴巴云DashScope上部署了该模型,因此您需要设置以下环境变量:
117-
请与我们联系以获取 ``key``。 ( godot.lzl@alibaba-inc.com )
118136
```yaml
119137
model:
120-
name: "pre-xiyan_multi_dialect_v3"
121-
key: "KEY"
122-
url: "https://poc-dashscope.aliyuncs.com/compatible-mode/v1"
138+
name: "pre-xiyansql-qwencoder-32b"
139+
key: "密钥"
140+
url: "https://pre-xiyan-stream.biz.aliyun.com/service/api/xiyan-sql"
123141
database:
124142
```
125143
126-
或者,您也可以在自己的服务器上部署模型(XiYanSQL-qwencoder-32B)。
144+
注意:该模型服务仅供试用,如果您需要在生产环境中使用,请与我们联系。
145+
146+
或者,您也可以在自己的服务器上部署模型 [XiYanSQL-qwencoder-32B](https://github.com/XGenerationLab/XiYanSQL-QwenCoder)。
127147
128-
#### 本地LLMs
129-
未来将提供支持
148+
#### 本地 LLM
149+
未来将支持
130150
131151
### 数据库配置
132-
``host``, ``port``, ``user``, ``password``, ``database`` 是MySQL数据库的连接信息
152+
``host``, ``port``, ``user``, ``password``, ``database`` 是 MySQL 数据库的连接信息
133153
134-
您可以使用本地或任何远程数据库。现在我们支持MySQL(更多方言即将推出)。
154+
您可以使用本地或任何远程数据库。现在我们支持 MySQL(更多方言将在不久的将来支持)。
135155
136156
```yaml
137157
database:
@@ -143,8 +163,8 @@ database:
143163
```
144164
145165
## 启动
146-
### Claude desktop
147-
在您的claude桌面配置文件中添加以下内容
166+
### Claude 桌面
167+
在您的 Claude 桌面配置文件中添加以下内容
148168
```json
149169
{
150170
"mcpServers": {
@@ -161,9 +181,15 @@ database:
161181
}
162182
}
163183
```
184+
### Goose
185+
在配置中添加以下命令。
186+
187+
```yaml
188+
env YML=path/to/yml python -m xiyan_mcp_server
189+
```
164190

165191
## 引用
166-
如果您觉得我们的工作有帮助,欢迎引用我们的文章
192+
如果您觉得我们的工作对您有帮助,请随时引用我们
167193
```bib
168194
@article{xiyansql,
169195
title={A Preview of XiYan-SQL: A Multi-Generator Ensemble Framework for Text-to-SQL},

imgs/dinggroup_out.png

-20.2 KB
Loading

0 commit comments

Comments
 (0)