xiaogpt 2.92__tar.gz → 3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {xiaogpt-2.92 → xiaogpt-3.0}/PKG-INFO +43 -31
  2. {xiaogpt-2.92 → xiaogpt-3.0}/README.md +21 -6
  3. {xiaogpt-2.92 → xiaogpt-3.0}/pyproject.toml +22 -25
  4. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/cli.py +6 -1
  5. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/config.py +10 -1
  6. {xiaogpt-2.92 → xiaogpt-3.0}/LICENSE +0 -0
  7. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/__init__.py +0 -0
  8. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/__main__.py +0 -0
  9. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/bot/__init__.py +0 -0
  10. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/bot/base_bot.py +0 -0
  11. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/bot/chatgptapi_bot.py +0 -0
  12. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/bot/doubao_bot.py +0 -0
  13. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/bot/gemini_bot.py +0 -0
  14. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/bot/glm_bot.py +0 -0
  15. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/bot/langchain_bot.py +0 -0
  16. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/bot/llama_bot.py +0 -0
  17. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/bot/moonshot_bot.py +0 -0
  18. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/bot/qwen_bot.py +0 -0
  19. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/bot/yi_bot.py +0 -0
  20. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/langchain/callbacks.py +0 -0
  21. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/langchain/chain.py +0 -0
  22. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/langchain/examples/email/mail_box.py +0 -0
  23. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/langchain/examples/email/mail_summary_tools.py +0 -0
  24. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/tts/__init__.py +0 -0
  25. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/tts/base.py +0 -0
  26. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/tts/mi.py +0 -0
  27. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/tts/tetos.py +0 -0
  28. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/utils.py +0 -0
  29. {xiaogpt-2.92 → xiaogpt-3.0}/xiaogpt/xiaogpt.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xiaogpt
3
- Version: 2.92
3
+ Version: 3.0
4
4
  Summary: Play ChatGPT or other LLM with xiaomi AI speaker
5
5
  Author-Email: yihong0618 <zouzou0208@gmail.com>
6
6
  License: MIT
@@ -26,7 +26,8 @@ Requires-Dist: groq>=0.5.0
26
26
  Requires-Dist: pyyaml>=6.0.1
27
27
  Requires-Dist: langchain-community>=0.0.38
28
28
  Requires-Dist: lingua-language-detector>=2.0.2; python_version < "3.13"
29
- Requires-Dist: aiohttp==3.9.5; extra == "locked"
29
+ Requires-Dist: aiohappyeyeballs==2.4.0; extra == "locked"
30
+ Requires-Dist: aiohttp==3.10.5; extra == "locked"
30
31
  Requires-Dist: aiosignal==1.3.1; extra == "locked"
31
32
  Requires-Dist: annotated-types==0.6.0; extra == "locked"
32
33
  Requires-Dist: anyio==4.3.0; extra == "locked"
@@ -39,72 +40,69 @@ Requires-Dist: certifi==2024.2.2; extra == "locked"
39
40
  Requires-Dist: charset-normalizer==3.3.2; extra == "locked"
40
41
  Requires-Dist: click==8.1.7; extra == "locked"
41
42
  Requires-Dist: colorama==0.4.6; platform_system == "Windows" and extra == "locked"
42
- Requires-Dist: dashscope==1.20.3; extra == "locked"
43
+ Requires-Dist: dashscope==1.20.10; extra == "locked"
43
44
  Requires-Dist: dataclasses-json==0.6.3; extra == "locked"
44
45
  Requires-Dist: distro==1.9.0; extra == "locked"
45
46
  Requires-Dist: edge-tts==6.1.10; extra == "locked"
46
- Requires-Dist: et-xmlfile==1.1.0; python_version ~= "3.8" and python_full_version != "3.9.7" and extra == "locked"
47
47
  Requires-Dist: exceptiongroup==1.2.0; python_version < "3.11" and extra == "locked"
48
48
  Requires-Dist: frozenlist==1.4.1; extra == "locked"
49
- Requires-Dist: google-ai-generativelanguage==0.6.6; extra == "locked"
49
+ Requires-Dist: google-ai-generativelanguage==0.6.9; extra == "locked"
50
50
  Requires-Dist: google-api-core==2.15.0; extra == "locked"
51
51
  Requires-Dist: google-api-core[grpc]==2.15.0; extra == "locked"
52
52
  Requires-Dist: google-api-python-client==2.125.0; extra == "locked"
53
53
  Requires-Dist: google-auth==2.26.1; extra == "locked"
54
54
  Requires-Dist: google-auth-httplib2==0.2.0; extra == "locked"
55
55
  Requires-Dist: google-cloud-texttospeech==2.16.3; extra == "locked"
56
- Requires-Dist: google-generativeai==0.7.2; extra == "locked"
56
+ Requires-Dist: google-generativeai==0.8.1; extra == "locked"
57
57
  Requires-Dist: google-search-results==2.4.2; extra == "locked"
58
58
  Requires-Dist: googleapis-common-protos==1.62.0; extra == "locked"
59
59
  Requires-Dist: 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") and extra == "locked"
60
- Requires-Dist: groq==0.9.0; extra == "locked"
60
+ Requires-Dist: groq==0.11.0; extra == "locked"
61
61
  Requires-Dist: grpcio==1.60.0; extra == "locked"
62
62
  Requires-Dist: grpcio-status==1.60.0; extra == "locked"
63
63
  Requires-Dist: h11==0.14.0; extra == "locked"
64
64
  Requires-Dist: httpcore==1.0.5; extra == "locked"
65
65
  Requires-Dist: httplib2==0.22.0; extra == "locked"
66
- Requires-Dist: httpx==0.27.0; extra == "locked"
67
- Requires-Dist: httpx[socks]==0.27.0; extra == "locked"
66
+ Requires-Dist: httpx==0.27.2; extra == "locked"
67
+ Requires-Dist: httpx[socks]==0.27.2; extra == "locked"
68
68
  Requires-Dist: idna==3.7; extra == "locked"
69
+ Requires-Dist: jiter==0.5.0; extra == "locked"
69
70
  Requires-Dist: jsonpatch==1.33; extra == "locked"
70
71
  Requires-Dist: jsonpointer==2.4; extra == "locked"
71
- Requires-Dist: langchain==0.2.10; extra == "locked"
72
- Requires-Dist: langchain-community==0.2.9; extra == "locked"
73
- Requires-Dist: langchain-core==0.2.22; extra == "locked"
74
- Requires-Dist: langchain-text-splitters==0.2.0; extra == "locked"
75
- Requires-Dist: langsmith==0.1.84; extra == "locked"
72
+ Requires-Dist: langchain==0.3.0; extra == "locked"
73
+ Requires-Dist: langchain-community==0.3.0; extra == "locked"
74
+ Requires-Dist: langchain-core==0.3.0; extra == "locked"
75
+ Requires-Dist: langchain-text-splitters==0.3.0; extra == "locked"
76
+ Requires-Dist: langsmith==0.1.120; extra == "locked"
76
77
  Requires-Dist: lingua-language-detector==2.0.2; python_version < "3.13" and extra == "locked"
77
78
  Requires-Dist: markdown-it-py==3.0.0; extra == "locked"
78
79
  Requires-Dist: marshmallow==3.20.1; extra == "locked"
79
80
  Requires-Dist: mdurl==0.1.2; extra == "locked"
80
- Requires-Dist: miservice-fork==2.7.0; extra == "locked"
81
+ Requires-Dist: miservice-fork==2.7.1; extra == "locked"
81
82
  Requires-Dist: multidict==6.0.5; extra == "locked"
82
83
  Requires-Dist: mutagen==1.47.0; extra == "locked"
83
84
  Requires-Dist: mypy-extensions==1.0.0; extra == "locked"
84
85
  Requires-Dist: numexpr==2.10.1; extra == "locked"
85
86
  Requires-Dist: numpy==1.26.3; extra == "locked"
86
- Requires-Dist: openai==1.36.1; extra == "locked"
87
- Requires-Dist: openpyxl==3.1.5; python_version ~= "3.8" and python_full_version != "3.9.7" and extra == "locked"
87
+ Requires-Dist: openai==1.45.0; extra == "locked"
88
88
  Requires-Dist: orjson==3.10.0; extra == "locked"
89
89
  Requires-Dist: ormsgpack==1.5.0; extra == "locked"
90
90
  Requires-Dist: packaging==23.2; extra == "locked"
91
- Requires-Dist: pandas==2.2.2; python_version ~= "3.8" and python_full_version != "3.9.7" and extra == "locked"
92
91
  Requires-Dist: proto-plus==1.23.0; extra == "locked"
93
92
  Requires-Dist: protobuf==4.25.1; extra == "locked"
94
93
  Requires-Dist: pyasn1==0.5.1; extra == "locked"
95
94
  Requires-Dist: pyasn1-modules==0.3.0; extra == "locked"
96
95
  Requires-Dist: pydantic==2.8.2; extra == "locked"
97
96
  Requires-Dist: pydantic-core==2.20.1; extra == "locked"
97
+ Requires-Dist: pydantic-settings==2.5.2; extra == "locked"
98
98
  Requires-Dist: pygments==2.17.2; extra == "locked"
99
99
  Requires-Dist: pyjwt==2.8.0; extra == "locked"
100
100
  Requires-Dist: pyparsing==3.1.2; python_version > "3.0" and extra == "locked"
101
- Requires-Dist: python-dateutil==2.9.0.post0; python_version ~= "3.8" and python_full_version != "3.9.7" and extra == "locked"
102
- Requires-Dist: pytz==2024.1; python_version ~= "3.8" and python_full_version != "3.9.7" and extra == "locked"
103
- Requires-Dist: pyyaml==6.0.1; extra == "locked"
101
+ Requires-Dist: python-dotenv==1.0.1; extra == "locked"
102
+ Requires-Dist: pyyaml==6.0.2; extra == "locked"
104
103
  Requires-Dist: requests==2.31.0; extra == "locked"
105
- Requires-Dist: rich==13.7.1; extra == "locked"
104
+ Requires-Dist: rich==13.8.1; extra == "locked"
106
105
  Requires-Dist: rsa==4.9; extra == "locked"
107
- Requires-Dist: six==1.16.0; python_version ~= "3.8" and python_full_version != "3.9.7" and extra == "locked"
108
106
  Requires-Dist: sniffio==1.3.0; extra == "locked"
109
107
  Requires-Dist: socksio==1.0.0; extra == "locked"
110
108
  Requires-Dist: soupsieve==2.5; extra == "locked"
@@ -114,13 +112,12 @@ Requires-Dist: tetos==0.3.1; extra == "locked"
114
112
  Requires-Dist: tqdm==4.66.1; extra == "locked"
115
113
  Requires-Dist: typing-extensions==4.12.2; extra == "locked"
116
114
  Requires-Dist: typing-inspect==0.9.0; extra == "locked"
117
- Requires-Dist: tzdata==2024.1; python_version ~= "3.8" and python_full_version != "3.9.7" and extra == "locked"
118
115
  Requires-Dist: uritemplate==4.1.1; extra == "locked"
119
116
  Requires-Dist: urllib3==2.1.0; extra == "locked"
120
117
  Requires-Dist: websocket-client==1.8.0; extra == "locked"
121
118
  Requires-Dist: websockets==12.0; extra == "locked"
122
119
  Requires-Dist: yarl==1.9.4; extra == "locked"
123
- Requires-Dist: zhipuai==2.1.2; extra == "locked"
120
+ Requires-Dist: zhipuai==2.1.5.20230904; extra == "locked"
124
121
  Provides-Extra: locked
125
122
  Description-Content-Type: text/markdown
126
123
 
@@ -187,6 +184,7 @@ Play ChatGPT and other LLM with Xiaomi AI Speaker
187
184
  - `--use_moonshot_api` and other models please refer below
188
185
  - 可以跟小爱说 `开始持续对话` 自动进入持续对话状态,`结束持续对话` 结束持续对话状态。
189
186
  - 可以使用 `--tts edge` 来获取更好的 tts 能力
187
+ - 可以使用 `--tts fish --fish_api_key <your-fish-key> --fish_voice_key <fish-voice>` 来获取 [fish-audio](https://fish.audio/) 能力(如何获取 fish voice 见下)
190
188
  - 可以使用 `--tts openai` 来获取 openai tts 能力
191
189
  - 可以使用 `--tts azure --azure_tts_speech_key <your-speech-key>` 来获取 Azure TTS 能力
192
190
  - 可以使用 `--use_langchain` 替代 `--use_chatgpt_api` 来调用 LangChain(默认 chatgpt)服务,实现上网检索、数学运算..
@@ -216,11 +214,7 @@ xiaogpt --hardware LX06 --mute_xiaoai --use_moonshot_api --moonshot_api_key ${m
216
214
  xiaogpt --hardware LX06 --mute_xiaoai --use_llama --llama_api_key ${llama_api_key}
217
215
  # 如果你想使用 01
218
216
  xiaogpt --hardware LX06 --mute_xiaoai --use_yi_api --ti_api_key ${yi_api_key}
219
- # 如果你想使用豆包
220
-
221
-
222
-
223
-
217
+ # 如果你想使用 LangChain+SerpApi 实现上网检索或其他本地服务(目前仅支持 stream 模式)
224
218
  export OPENAI_API_KEY=${your_api_key}
225
219
  export SERPAPI_API_KEY=${your_serpapi_key}
226
220
  xiaogpt --hardware Lx06 --use_langchain --mute_xiaoai --stream --openai_key ${your_api_key} --serpapi_api_key ${your_serpapi_key}
@@ -407,6 +401,7 @@ docker build --build-arg PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
407
401
  [edge-tts](https://github.com/rany2/edge-tts) 提供了类似微软tts的能力
408
402
  [azure-tts](https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/9-more-realistic-ai-voices-for-conversations-now-generally/ba-p/4099471) 提供了微软 azure tts 的能力
409
403
  [openai-tts](https://platform.openai.com/docs/guides/text-to-speech) 提供了类似 openai tts 的能力
404
+ [fish-tts](https://fish.audio/) 提供了 fish tts 的能力
410
405
 
411
406
  #### Usage
412
407
 
@@ -422,7 +417,24 @@ For edge 查看更多语言支持, 从中选择一个
422
417
  edge-tts --list-voices
423
418
  ```
424
419
 
425
- #### 在容器中使用 edge-tts/azure-tts/openai-tts/volc/google/baidu
420
+ #### 如果你想使用 [fish-tts](https://fish.audio/)
421
+
422
+ 1. 注册 https://fish.audio/zh-CN/go-api/ 拿到 api key
423
+ 2. 选择你想要的声音自建声音或者使用热门声音 https://fish.audio/zh-CN/text-to-speech/?modelId=e80ea225770f42f79d50aa98be3cedfc 其中 `e80ea225770f42f79d50aa98be3cedfc` 就声音的 key id
424
+ 3. python3 xiaogpt.py --hardware LX06 --account xxxx --password xxxxx --use_chatgpt_api --mute_xiaoai --stream --tts fish --fish_api_key xxxxx --fish_voice_key xxxxx
425
+ 4. 或者在 xiao_config.yaml 中配置
426
+
427
+ ```yaml
428
+ tts: fish
429
+ # TTS 参数字典,参考 https://github.com/frostming/tetos 获取可用参数
430
+ tts_options: {
431
+ "api_key": "xxxxx",
432
+ "voice": "xxxxxx"
433
+ }
434
+
435
+ ```
436
+
437
+ #### 在容器中使用 edge-tts/azure-tts/openai-tts/volc/google/baidu/fish
426
438
 
427
439
  由于 Edge TTS 启动了一个本地的 HTTP 服务,所以需要将容器的端口映射到宿主机上,并且指定本地机器的 hostname:
428
440
 
@@ -61,6 +61,7 @@ Play ChatGPT and other LLM with Xiaomi AI Speaker
61
61
  - `--use_moonshot_api` and other models please refer below
62
62
  - 可以跟小爱说 `开始持续对话` 自动进入持续对话状态,`结束持续对话` 结束持续对话状态。
63
63
  - 可以使用 `--tts edge` 来获取更好的 tts 能力
64
+ - 可以使用 `--tts fish --fish_api_key <your-fish-key> --fish_voice_key <fish-voice>` 来获取 [fish-audio](https://fish.audio/) 能力(如何获取 fish voice 见下)
64
65
  - 可以使用 `--tts openai` 来获取 openai tts 能力
65
66
  - 可以使用 `--tts azure --azure_tts_speech_key <your-speech-key>` 来获取 Azure TTS 能力
66
67
  - 可以使用 `--use_langchain` 替代 `--use_chatgpt_api` 来调用 LangChain(默认 chatgpt)服务,实现上网检索、数学运算..
@@ -90,11 +91,7 @@ xiaogpt --hardware LX06 --mute_xiaoai --use_moonshot_api --moonshot_api_key ${m
90
91
  xiaogpt --hardware LX06 --mute_xiaoai --use_llama --llama_api_key ${llama_api_key}
91
92
  # 如果你想使用 01
92
93
  xiaogpt --hardware LX06 --mute_xiaoai --use_yi_api --ti_api_key ${yi_api_key}
93
- # 如果你想使用豆包
94
-
95
-
96
-
97
-
94
+ # 如果你想使用 LangChain+SerpApi 实现上网检索或其他本地服务(目前仅支持 stream 模式)
98
95
  export OPENAI_API_KEY=${your_api_key}
99
96
  export SERPAPI_API_KEY=${your_serpapi_key}
100
97
  xiaogpt --hardware Lx06 --use_langchain --mute_xiaoai --stream --openai_key ${your_api_key} --serpapi_api_key ${your_serpapi_key}
@@ -281,6 +278,7 @@ docker build --build-arg PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
281
278
  [edge-tts](https://github.com/rany2/edge-tts) 提供了类似微软tts的能力
282
279
  [azure-tts](https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/9-more-realistic-ai-voices-for-conversations-now-generally/ba-p/4099471) 提供了微软 azure tts 的能力
283
280
  [openai-tts](https://platform.openai.com/docs/guides/text-to-speech) 提供了类似 openai tts 的能力
281
+ [fish-tts](https://fish.audio/) 提供了 fish tts 的能力
284
282
 
285
283
  #### Usage
286
284
 
@@ -296,7 +294,24 @@ For edge 查看更多语言支持, 从中选择一个
296
294
  edge-tts --list-voices
297
295
  ```
298
296
 
299
- #### 在容器中使用 edge-tts/azure-tts/openai-tts/volc/google/baidu
297
+ #### 如果你想使用 [fish-tts](https://fish.audio/)
298
+
299
+ 1. 注册 https://fish.audio/zh-CN/go-api/ 拿到 api key
300
+ 2. 选择你想要的声音自建声音或者使用热门声音 https://fish.audio/zh-CN/text-to-speech/?modelId=e80ea225770f42f79d50aa98be3cedfc 其中 `e80ea225770f42f79d50aa98be3cedfc` 就声音的 key id
301
+ 3. python3 xiaogpt.py --hardware LX06 --account xxxx --password xxxxx --use_chatgpt_api --mute_xiaoai --stream --tts fish --fish_api_key xxxxx --fish_voice_key xxxxx
302
+ 4. 或者在 xiao_config.yaml 中配置
303
+
304
+ ```yaml
305
+ tts: fish
306
+ # TTS 参数字典,参考 https://github.com/frostming/tetos 获取可用参数
307
+ tts_options: {
308
+ "api_key": "xxxxx",
309
+ "voice": "xxxxxx"
310
+ }
311
+
312
+ ```
313
+
314
+ #### 在容器中使用 edge-tts/azure-tts/openai-tts/volc/google/baidu/fish
300
315
 
301
316
  由于 Edge TTS 启动了一个本地的 HTTP 服务,所以需要将容器的端口映射到宿主机上,并且指定本地机器的 hostname:
302
317
 
@@ -31,7 +31,7 @@ dependencies = [
31
31
  "lingua-language-detector>=2.0.2; python_version < \"3.13\"",
32
32
  ]
33
33
  dynamic = []
34
- version = "2.92"
34
+ version = "3.0"
35
35
 
36
36
  [project.license]
37
37
  text = "MIT"
@@ -44,7 +44,8 @@ xiaogpt = "xiaogpt.cli:main"
44
44
 
45
45
  [project.optional-dependencies]
46
46
  locked = [
47
- "aiohttp==3.9.5",
47
+ "aiohappyeyeballs==2.4.0",
48
+ "aiohttp==3.10.5",
48
49
  "aiosignal==1.3.1",
49
50
  "annotated-types==0.6.0",
50
51
  "anyio==4.3.0",
@@ -57,72 +58,69 @@ locked = [
57
58
  "charset-normalizer==3.3.2",
58
59
  "click==8.1.7",
59
60
  "colorama==0.4.6 ; platform_system == \"Windows\"",
60
- "dashscope==1.20.3",
61
+ "dashscope==1.20.10",
61
62
  "dataclasses-json==0.6.3",
62
63
  "distro==1.9.0",
63
64
  "edge-tts==6.1.10",
64
- "et-xmlfile==1.1.0 ; python_version ~= \"3.8\" and python_full_version != \"3.9.7\"",
65
65
  "exceptiongroup==1.2.0 ; python_version < \"3.11\"",
66
66
  "frozenlist==1.4.1",
67
- "google-ai-generativelanguage==0.6.6",
67
+ "google-ai-generativelanguage==0.6.9",
68
68
  "google-api-core==2.15.0",
69
69
  "google-api-core[grpc]==2.15.0",
70
70
  "google-api-python-client==2.125.0",
71
71
  "google-auth==2.26.1",
72
72
  "google-auth-httplib2==0.2.0",
73
73
  "google-cloud-texttospeech==2.16.3",
74
- "google-generativeai==0.7.2",
74
+ "google-generativeai==0.8.1",
75
75
  "google-search-results==2.4.2",
76
76
  "googleapis-common-protos==1.62.0",
77
77
  "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\"",
78
- "groq==0.9.0",
78
+ "groq==0.11.0",
79
79
  "grpcio==1.60.0",
80
80
  "grpcio-status==1.60.0",
81
81
  "h11==0.14.0",
82
82
  "httpcore==1.0.5",
83
83
  "httplib2==0.22.0",
84
- "httpx==0.27.0",
85
- "httpx[socks]==0.27.0",
84
+ "httpx==0.27.2",
85
+ "httpx[socks]==0.27.2",
86
86
  "idna==3.7",
87
+ "jiter==0.5.0",
87
88
  "jsonpatch==1.33",
88
89
  "jsonpointer==2.4",
89
- "langchain==0.2.10",
90
- "langchain-community==0.2.9",
91
- "langchain-core==0.2.22",
92
- "langchain-text-splitters==0.2.0",
93
- "langsmith==0.1.84",
90
+ "langchain==0.3.0",
91
+ "langchain-community==0.3.0",
92
+ "langchain-core==0.3.0",
93
+ "langchain-text-splitters==0.3.0",
94
+ "langsmith==0.1.120",
94
95
  "lingua-language-detector==2.0.2 ; python_version < \"3.13\"",
95
96
  "markdown-it-py==3.0.0",
96
97
  "marshmallow==3.20.1",
97
98
  "mdurl==0.1.2",
98
- "miservice-fork==2.7.0",
99
+ "miservice-fork==2.7.1",
99
100
  "multidict==6.0.5",
100
101
  "mutagen==1.47.0",
101
102
  "mypy-extensions==1.0.0",
102
103
  "numexpr==2.10.1",
103
104
  "numpy==1.26.3",
104
- "openai==1.36.1",
105
- "openpyxl==3.1.5 ; python_version ~= \"3.8\" and python_full_version != \"3.9.7\"",
105
+ "openai==1.45.0",
106
106
  "orjson==3.10.0",
107
107
  "ormsgpack==1.5.0",
108
108
  "packaging==23.2",
109
- "pandas==2.2.2 ; python_version ~= \"3.8\" and python_full_version != \"3.9.7\"",
110
109
  "proto-plus==1.23.0",
111
110
  "protobuf==4.25.1",
112
111
  "pyasn1==0.5.1",
113
112
  "pyasn1-modules==0.3.0",
114
113
  "pydantic==2.8.2",
115
114
  "pydantic-core==2.20.1",
115
+ "pydantic-settings==2.5.2",
116
116
  "pygments==2.17.2",
117
117
  "pyjwt==2.8.0",
118
118
  "pyparsing==3.1.2 ; python_version > \"3.0\"",
119
- "python-dateutil==2.9.0.post0 ; python_version ~= \"3.8\" and python_full_version != \"3.9.7\"",
120
- "pytz==2024.1 ; python_version ~= \"3.8\" and python_full_version != \"3.9.7\"",
121
- "pyyaml==6.0.1",
119
+ "python-dotenv==1.0.1",
120
+ "pyyaml==6.0.2",
122
121
  "requests==2.31.0",
123
- "rich==13.7.1",
122
+ "rich==13.8.1",
124
123
  "rsa==4.9",
125
- "six==1.16.0 ; python_version ~= \"3.8\" and python_full_version != \"3.9.7\"",
126
124
  "sniffio==1.3.0",
127
125
  "socksio==1.0.0",
128
126
  "soupsieve==2.5",
@@ -132,13 +130,12 @@ locked = [
132
130
  "tqdm==4.66.1",
133
131
  "typing-extensions==4.12.2",
134
132
  "typing-inspect==0.9.0",
135
- "tzdata==2024.1 ; python_version ~= \"3.8\" and python_full_version != \"3.9.7\"",
136
133
  "uritemplate==4.1.1",
137
134
  "urllib3==2.1.0",
138
135
  "websocket-client==1.8.0",
139
136
  "websockets==12.0",
140
137
  "yarl==1.9.4",
141
- "zhipuai==2.1.2",
138
+ "zhipuai==2.1.5.20230904",
142
139
  ]
143
140
 
144
141
  [tool.pdm]
@@ -104,6 +104,11 @@ def main():
104
104
  parser.add_argument(
105
105
  "--volc_secret_key", dest="volc_secret_key", help="Volcengine secret key"
106
106
  )
107
+ # for fish tts
108
+ parser.add_argument("--fish_api_key", dest="fish_api_key", help="fish api key")
109
+ parser.add_argument(
110
+ "--fish_voice_key", dest="fish_voice_key", help="fish voice key"
111
+ )
107
112
  parser.add_argument(
108
113
  "--verbose",
109
114
  dest="verbose",
@@ -114,7 +119,7 @@ def main():
114
119
  parser.add_argument(
115
120
  "--tts",
116
121
  help="TTS provider",
117
- choices=["mi", "edge", "openai", "azure", "google", "baidu", "volc"],
122
+ choices=["mi", "edge", "openai", "azure", "google", "baidu", "volc", "fish"],
118
123
  )
119
124
  bot_group = parser.add_mutually_exclusive_group()
120
125
  bot_group.add_argument(
@@ -82,7 +82,7 @@ class Config:
82
82
  end_conversation: str = "结束持续对话"
83
83
  stream: bool = False
84
84
  tts: Literal[
85
- "mi", "edge", "azure", "openai", "baidu", "google", "volc", "minimax"
85
+ "mi", "edge", "azure", "openai", "baidu", "google", "volc", "minimax", "fish"
86
86
  ] = "mi"
87
87
  tts_options: dict[str, Any] = field(default_factory=dict)
88
88
  gpt_options: dict[str, Any] = field(default_factory=dict)
@@ -128,6 +128,15 @@ class Config:
128
128
  config.setdefault("tts_options", {}).setdefault(
129
129
  "secret_key", config.get("volc_secret_key")
130
130
  )
131
+ elif config.get("tts") == "fish":
132
+ print("fish")
133
+ config.setdefault("tts_options", {}).setdefault(
134
+ "api_key", config.get("fish_api_key")
135
+ )
136
+ if voice := config.get("fish_voice_key"):
137
+ print("fish voice")
138
+ config.setdefault("tts_options", {}).setdefault("voice", voice)
139
+
131
140
  return cls(**config)
132
141
 
133
142
  @classmethod
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes