Skip to content

Commit 065d46d

Browse files
update readme
1 parent 5c88401 commit 065d46d

File tree

2 files changed

+28
-34
lines changed

2 files changed

+28
-34
lines changed

Dockerfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,9 @@ FROM python:3.11-slim
44
# 设置工作目录
55
WORKDIR /app
66

7-
# 复制requirements.txt文件并安装依赖
87
#COPY requirements.txt .
98
RUN pip install xiyan-mcp-server
10-
# 复制应用代码
11-
#COPY . .
129

13-
# 暴露端口(如果需要)
14-
# EXPOSE 5000
1510

1611
# 运行应用
1712
CMD ["python", "-m", "xiyan_mcp_server"]

README.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
🤖 <a href="https://modelscope.cn/collections/XiYanSQL-Models-4483337b614241" >ModelScope</a> |
1717
🌕 <a href="https://bailian.console.aliyun.com/xiyan">析言GBI</a>
1818
<br />
19+
<a href="https://arxiv.org/abs/2411.08599"><img src="imgs/Paper-Arxiv-orange.svg" ></a>
1920
<a href="https://opensource.org/licenses/Apache-2.0">
2021
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License: Apache 2.0" />
2122
</a>
@@ -88,7 +89,7 @@ Another mode is local mode, which is more secure. It does not require an API key
8889
### Installing from pip
8990

9091
Python 3.11+ is required.
91-
you can install the server through pip, and it will install the latest verion
92+
You can install the server through pip, and it will install the latest version:
9293

9394
```bash
9495
pip install xiyan-mcp-server
@@ -111,8 +112,8 @@ Not fully tested.
111112

112113
## Configuration
113114

114-
You need a yml config file to configure the server.
115-
a default config file is provided in config_demo.yml which looks like this:
115+
You need a YAML config file to configure the server.
116+
A default config file is provided in config_demo.yml which looks like this:
116117

117118
```yaml
118119
model:
@@ -139,7 +140,7 @@ database:
139140
| url | the endpoint of the service provider (e.g."https://api.openai.com/v1") | https://api-inference.modelscope.cn/v1/ | https://xiyan-stream.biz.aliyun.com/service/api/xiyan-sql | http://localhost:5090 |
140141
141142
#### General LLMs
142-
if you want to use the general LLMs, e.g. gpt3.5, you can directly config like this:
143+
If you want to use the general LLMs, e.g. gpt3.5, you can directly config like this:
143144
```yaml
144145
model:
145146
name: "gpt-3.5-turbo"
@@ -148,7 +149,7 @@ model:
148149
database:
149150
```
150151
151-
if you want to use Qwen from alibaba, e.g. Qwen-max, you can use following config.
152+
If you want to use Qwen from Alibaba, e.g. Qwen-max, you can use following config:
152153
```yaml
153154
model:
154155
name: "qwen-max"
@@ -201,27 +202,27 @@ Note: this model service is just for trial, if you need to use it in production,
201202
Alternatively, you can also deploy the model [XiYanSQL-qwencoder-32B](https://github.com/XGenerationLab/XiYanSQL-QwenCoder) on your own server.
202203
203204
#### Local Model
204-
Note: local model is slow (about 12 seconds per query on my macbook).
205-
If your need stable and fast service, we still recommend to use the modelscope version.
205+
Note: the local model is slow (about 12 seconds per query on my macbook).
206+
If you need a stable and fast service, we still recommend to use the modelscope version.
206207
207-
To run xiyan_mcp_server on local mode, you need
208+
To run xiyan_mcp_server in local mode, you need
208209
1) a PC/Mac with at least 16GB RAM
209210
2) 6GB disk space
210211
211-
step1: Install additional python packages
212+
Step 1: Install additional Python packages
212213
```bash
213214
pip install flask modelscope torch==2.2.2 accelerate>=0.26.0 numpy=2.2.3
214215
```
215216

216-
step2: (optional) manully download the model
217-
We recommand [xiyansql-qwencoder-3b](https://www.modelscope.cn/models/XGenerationLab/XiYanSQL-QwenCoder-3B-2502/).
218-
You can manully download the model by
217+
Step 2: (optional) manually download the model
218+
We recommend [xiyansql-qwencoder-3b](https://www.modelscope.cn/models/XGenerationLab/XiYanSQL-QwenCoder-3B-2502/).
219+
You can manually download the model by
219220
```bash
220221
modelscope download --model XGenerationLab/XiYanSQL-QwenCoder-3B-2502
221222
```
222223
It will take you 6GB disk space.
223224

224-
step4: download the script and run server. src/xiyan_mcp_server/local_xiyan_server.py
225+
Step 3: download the script and run server. src/xiyan_mcp_server/local_xiyan_server.py
225226

226227

227228

@@ -230,7 +231,7 @@ python local_xiyan_server.py
230231
```
231232
The server will be running on http://localhost:5090/
232233

233-
step4: prepare config and run xiyan_mcp_server
234+
Step 4: prepare config and run xiyan_mcp_server
234235
the config.yml should be like:
235236
```yml
236237
model:
@@ -239,7 +240,7 @@ model:
239240
url: "http://127.0.0.1:5090"
240241
```
241242
242-
Til now the local mode is ready.
243+
Till now the local mode is ready.
243244
244245
### Database Configuration
245246
``host``, ``port``, ``user``, ``password``, ``database`` are the connection information of the database.
@@ -257,11 +258,11 @@ database:
257258
database: ""
258259
```
259260
#### PostgreSQL
260-
step1: Install python packages
261+
Step 1: Install Python packages
261262
```bash
262263
pip install psycopg2
263264
```
264-
step2: prepare the config.yml like this:
265+
Step 2: prepare the config.yml like this:
265266
```yaml
266267
database:
267268
dialect: "postgresql"
@@ -274,8 +275,8 @@ database:
274275
275276
Note that ``dialect`` should be ``postgresql`` for postgresql.
276277
## Launch
277-
### Claude desktop
278-
Add this in your claude desktop config file, ref <a href="https://github.com/XGenerationLab/xiyan_mcp_server/blob/main/imgs/claude_desktop.jpg">claude desktop config example</a>
278+
### Claude Desktop
279+
Add this in your Claude Desktop config file, ref <a href="https://github.com/XGenerationLab/xiyan_mcp_server/blob/main/imgs/claude_desktop.jpg">Claude Desktop config example</a>
279280
```json
280281
{
281282
"mcpServers": {
@@ -293,27 +294,27 @@ Add this in your claude desktop config file, ref <a href="https://github.com/XGe
293294
}
294295
```
295296
### Cline
296-
prepare the config like [Claude desktop](#claude-desktop)
297+
Prepare the config like [Claude Desktop](#claude-desktop)
297298

298299
### Goose
299-
Add following command in the config, ref <a href="https://github.com/XGenerationLab/xiyan_mcp_server/blob/main/imgs/goose.jpg">goose config example</a>
300+
Add following command in the config, ref <a href="https://github.com/XGenerationLab/xiyan_mcp_server/blob/main/imgs/goose.jpg">Goose config example</a>
300301

301302
```yaml
302303
env YML=path/to/yml python -m xiyan_mcp_server
303304
```
304305
### Cursor
305-
Use the same command like [Goose](#goose) .
306+
Use the same command like [Goose](#goose).
306307

307308

308309
### Witsy
309-
Add following in command.
310+
Add following in command:
310311
```yaml
311312
python -m xiyan_mcp_server
312313
```
313314
Add an env: key is YML and value is the path to your yml file.
314-
Ref <a href="https://github.com/XGenerationLab/xiyan_mcp_server/blob/main/imgs/witsy.jpg">witsy config example</a>
315-
## It does not work!
316-
contact us:
315+
Ref <a href="https://github.com/XGenerationLab/xiyan_mcp_server/blob/main/imgs/witsy.jpg">Witsy config example</a>
316+
## It Does Not Work!
317+
Contact us:
317318
<a href="https://github.com/XGenerationLab/xiyan_mcp_server/blob/main/imgs/dinggroup_out.png">Ding Group钉钉群</a>|
318319
<a href="https://weibo.com/u/2540915670" target="_blank">Follow me on Weibo</a>
319320

@@ -329,6 +330,4 @@ If you find our work helpful, feel free to give us a cite.
329330
url={https://arxiv.org/abs/2411.08599},
330331
primaryClass={cs.AI}
331332
}
332-
```
333-
334-
333+
```

0 commit comments

Comments
 (0)