Skip to content

Commit 1983c20

Browse files
authored
fix: use pdm-build-locked instead of pinning dependencies in pyproject.toml (#478)
Signed-off-by: Frost Ming <[email protected]>
1 parent 8d7dc78 commit 1983c20

File tree

4 files changed

+56
-30
lines changed

4 files changed

+56
-30
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ set MI_DID=xxxx
2929
```
3030

3131
- 如果获取did报错时,请更换一下无线网络,有很大概率解决问题。
32-
32+
3333
### Linux(使用 export 设置环境变量)
3434
```sh
3535
# 1、安装模块
@@ -59,7 +59,7 @@ export MI_DID=xxxx
5959

6060
## 使用
6161

62-
- `pip install -U --force-reinstall xiaogpt`
62+
- `pip install -U --force-reinstall xiaogpt[locked]`
6363
- 参考我 fork 的 [MiService](https://github.com/yihong0618/MiService) 项目 README 并在本地 terminal 跑 `micli list` 拿到你音响的 DID 成功 **别忘了设置 export MI_DID=xxx** 这个 MI_DID 用
6464
- run `xiaogpt --hardware ${your_hardware} --use_chatgpt_api` hardware 你看小爱屁股上有型号,输入进来,如果在屁股上找不到或者型号不对,可以用 `micli mina` 找到型号
6565
- 跑起来之后就可以问小爱同学问题了,“帮我"开头的问题,会发送一份给 ChatGPT 然后小爱同学用 tts 回答
@@ -178,7 +178,7 @@ ChatGLM [文档](http://open.bigmodel.cn/doc/api#chatglm_130b)
178178
| use_command | 使用 MI command 与小爱交互 | `false` | |
179179
| mute_xiaoai | 快速停掉小爱自己的回答 | `true` | |
180180
| verbose | 是否打印详细日志 | `false` | |
181-
| bot | 使用的 bot 类型,目前支持 chatgptapi,newbing, qwen, gemini | `chatgptapi` | |
181+
| bot | 使用的 bot 类型,目前支持 chatgptapi,newbing, qwen, gemini | `chatgptapi` | |
182182
| tts | 使用的 TTS 类型 | `mi` | `edge``openai``azure` |
183183
| tts_voice | TTS 的嗓音 | `zh-CN-XiaoxiaoNeural`(edge), `alloy`(openai), `zh-CN-XiaoxiaoMultilingualNeural`(azure) | |
184184
| prompt | 自定义prompt | `请用100字以内回答` | |

pdm.lock

+43-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+6-7
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,20 @@ dependencies = [
1616
"openai>=1",
1717
"aiohttp",
1818
"rich",
19-
"zhipuai==2.0.1",
20-
"httpx==0.24.1",
19+
"zhipuai>=2.0.1",
20+
"httpx[socks]",
2121
"edge-tts>=6.1.3",
2222
"EdgeGPT==0.1.26",
2323
"langchain>=0.0.343",
2424
"beautifulsoup4>=4.12.0",
2525
"google-search-results>=2.4.2",
2626
"google-generativeai",
2727
"numexpr>=2.8.6",
28-
"dashscope==1.10.0",
29-
"httpcore==0.15.0",
30-
"idna==3.7",
28+
"dashscope>=1.10.0",
3129
"azure-cognitiveservices-speech>=1.37.0",
3230
]
3331
license = {text = "MIT"}
34-
dynamic = ["version"]
32+
dynamic = ["version", "optional-dependencies"]
3533

3634
[project.urls]
3735
Homepage = "https://github.com/yihong0618/xiaogpt"
@@ -47,11 +45,12 @@ source = "scm"
4745

4846
[tool.pdm.build]
4947
includes = ["xiaogpt/"]
48+
locked = true
5049

5150
[[tool.pdm.autoexport]]
5251
filename = "requirements.txt"
5352
without-hashes = true
5453

5554
[build-system]
56-
requires = ["pdm-backend>=2.0.0"]
55+
requires = ["pdm-backend>=2.0.0", "pdm-build-locked"]
5756
build-backend = "pdm.backend"

requirements.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ googleapis-common-protos==1.62.0
3232
greenlet==3.0.3; platform_machine == "win32" or platform_machine == "WIN32" or platform_machine == "AMD64" or platform_machine == "amd64" or platform_machine == "x86_64" or platform_machine == "ppc64le" or platform_machine == "aarch64"
3333
grpcio==1.60.0
3434
grpcio-status==1.60.0
35-
h11==0.12.0
36-
httpcore==0.15.0
35+
h11==0.14.0
36+
httpcore==1.0.5
3737
httplib2==0.22.0
38-
httpx==0.24.1
38+
httpx==0.27.0
3939
idna==3.7
4040
jsonpatch==1.33
4141
jsonpointer==2.4
@@ -72,6 +72,7 @@ requests==2.31.0
7272
rich==13.7.1
7373
rsa==4.9
7474
sniffio==1.3.0
75+
socksio==1.0.0
7576
soupsieve==2.5
7677
sqlalchemy==2.0.25
7778
tenacity==8.2.3

0 commit comments

Comments
 (0)