Skip to content

Commit

Permalink
fix: use pdm-build-locked instead of pinning dependencies in pyprojec…
Browse files Browse the repository at this point in the history
…t.toml (#478)

Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming authored Apr 15, 2024
1 parent 8d7dc78 commit 1983c20
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 30 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ set MI_DID=xxxx
```

- 如果获取did报错时,请更换一下无线网络,有很大概率解决问题。

### Linux(使用 export 设置环境变量)
```sh
# 1、安装模块
Expand Down Expand Up @@ -59,7 +59,7 @@ export MI_DID=xxxx

## 使用

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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,20 @@ dependencies = [
"openai>=1",
"aiohttp",
"rich",
"zhipuai==2.0.1",
"httpx==0.24.1",
"zhipuai>=2.0.1",
"httpx[socks]",
"edge-tts>=6.1.3",
"EdgeGPT==0.1.26",
"langchain>=0.0.343",
"beautifulsoup4>=4.12.0",
"google-search-results>=2.4.2",
"google-generativeai",
"numexpr>=2.8.6",
"dashscope==1.10.0",
"httpcore==0.15.0",
"idna==3.7",
"dashscope>=1.10.0",
"azure-cognitiveservices-speech>=1.37.0",
]
license = {text = "MIT"}
dynamic = ["version"]
dynamic = ["version", "optional-dependencies"]

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

[tool.pdm.build]
includes = ["xiaogpt/"]
locked = true

[[tool.pdm.autoexport]]
filename = "requirements.txt"
without-hashes = true

[build-system]
requires = ["pdm-backend>=2.0.0"]
requires = ["pdm-backend>=2.0.0", "pdm-build-locked"]
build-backend = "pdm.backend"
7 changes: 4 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ googleapis-common-protos==1.62.0
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"
grpcio==1.60.0
grpcio-status==1.60.0
h11==0.12.0
httpcore==0.15.0
h11==0.14.0
httpcore==1.0.5
httplib2==0.22.0
httpx==0.24.1
httpx==0.27.0
idna==3.7
jsonpatch==1.33
jsonpointer==2.4
Expand Down Expand Up @@ -72,6 +72,7 @@ requests==2.31.0
rich==13.7.1
rsa==4.9
sniffio==1.3.0
socksio==1.0.0
soupsieve==2.5
sqlalchemy==2.0.25
tenacity==8.2.3
Expand Down

0 comments on commit 1983c20

Please sign in to comment.