xiaogpt 2.62__tar.gz → 2.63__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 (27) hide show
  1. {xiaogpt-2.62 → xiaogpt-2.63}/PKG-INFO +12 -8
  2. {xiaogpt-2.62 → xiaogpt-2.63}/README.md +8 -4
  3. {xiaogpt-2.62 → xiaogpt-2.63}/pyproject.toml +4 -4
  4. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/cli.py +14 -2
  5. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/config.py +2 -0
  6. {xiaogpt-2.62 → xiaogpt-2.63}/LICENSE +0 -0
  7. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/__init__.py +0 -0
  8. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/__main__.py +0 -0
  9. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/bot/__init__.py +0 -0
  10. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/bot/base_bot.py +0 -0
  11. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/bot/chatgptapi_bot.py +0 -0
  12. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/bot/doubao_bot.py +0 -0
  13. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/bot/gemini_bot.py +0 -0
  14. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/bot/glm_bot.py +0 -0
  15. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/bot/langchain_bot.py +0 -0
  16. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/bot/newbing_bot.py +0 -0
  17. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/bot/qwen_bot.py +0 -0
  18. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/langchain/callbacks.py +0 -0
  19. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/langchain/chain.py +0 -0
  20. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/langchain/examples/email/mail_box.py +0 -0
  21. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/langchain/examples/email/mail_summary_tools.py +0 -0
  22. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/tts/__init__.py +0 -0
  23. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/tts/base.py +0 -0
  24. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/tts/mi.py +0 -0
  25. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/tts/tetos.py +0 -0
  26. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/utils.py +0 -0
  27. {xiaogpt-2.62 → xiaogpt-2.63}/xiaogpt/xiaogpt.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xiaogpt
3
- Version: 2.62
3
+ Version: 2.63
4
4
  Summary: Play ChatGPT or other LLM with xiaomi AI speaker
5
5
  Author-Email: yihong0618 <zouzou0208@gmail.com>
6
6
  License: MIT
@@ -37,7 +37,7 @@ Requires-Dist: certifi==2024.2.2; extra == "locked"
37
37
  Requires-Dist: charset-normalizer==3.3.2; extra == "locked"
38
38
  Requires-Dist: click==8.1.7; extra == "locked"
39
39
  Requires-Dist: colorama==0.4.6; platform_system == "Windows" and extra == "locked"
40
- Requires-Dist: dashscope==1.17.0; extra == "locked"
40
+ Requires-Dist: dashscope==1.17.1; extra == "locked"
41
41
  Requires-Dist: dataclasses-json==0.6.3; extra == "locked"
42
42
  Requires-Dist: distro==1.9.0; extra == "locked"
43
43
  Requires-Dist: edge-tts==6.1.10; extra == "locked"
@@ -51,7 +51,7 @@ Requires-Dist: google-api-python-client==2.125.0; extra == "locked"
51
51
  Requires-Dist: google-auth==2.26.1; extra == "locked"
52
52
  Requires-Dist: google-auth-httplib2==0.2.0; extra == "locked"
53
53
  Requires-Dist: google-cloud-texttospeech==2.16.3; extra == "locked"
54
- Requires-Dist: google-generativeai==0.5.1; extra == "locked"
54
+ Requires-Dist: google-generativeai==0.5.2; extra == "locked"
55
55
  Requires-Dist: google-search-results==2.4.2; extra == "locked"
56
56
  Requires-Dist: googleapis-common-protos==1.62.0; extra == "locked"
57
57
  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"
@@ -79,7 +79,7 @@ Requires-Dist: mutagen==1.47.0; extra == "locked"
79
79
  Requires-Dist: mypy-extensions==1.0.0; extra == "locked"
80
80
  Requires-Dist: numexpr==2.10.0; extra == "locked"
81
81
  Requires-Dist: numpy==1.26.3; extra == "locked"
82
- Requires-Dist: openai==1.21.2; extra == "locked"
82
+ Requires-Dist: openai==1.23.2; extra == "locked"
83
83
  Requires-Dist: orjson==3.10.0; extra == "locked"
84
84
  Requires-Dist: packaging==23.2; extra == "locked"
85
85
  Requires-Dist: prompt-toolkit==3.0.43; extra == "locked"
@@ -133,6 +133,7 @@ Play ChatGPT and other LLM with Xiaomi AI Speaker
133
133
  - New Bing
134
134
  - [ChatGLM](http://open.bigmodel.cn/)
135
135
  - [Gemini](https://makersuite.google.com/app/apikey)
136
+ - [Doubao](https://console.volcengine.com/iam/keymanage/)
136
137
  - [通义千问](https://help.aliyun.com/zh/dashscope/developer-reference/api-details)
137
138
 
138
139
  ## 获取小米音响DID
@@ -195,6 +196,8 @@ xiaogpt --hardware LX06 --mute_xiaoai --use_gemini --gemini_key ${gemini_key}
195
196
  python3 xiaogpt.py --hardware LX06 --mute_xiaoai --use_gemini --gemini_key ${gemini_key} --gemini_api_domain ${gemini_api_domain}
196
197
  # 如果你想使用阿里的通义千问
197
198
  xiaogpt --hardware LX06 --mute_xiaoai --use_qwen --qen_key ${qwen_key}
199
+ # 如果你想使用豆包
200
+ xiaogpt --hardware LX06 --mute_xiaoai --use_doubao --stream --volc_access_key xxxx --volc_secret_key xxx
198
201
  # 如果你想用 edge-tts
199
202
  xiaogpt --hardware LX06 --cookie ${cookie} --use_chatgpt_api --tts edge
200
203
  # 如果你想使用 LangChain + SerpApi 实现上网检索或其他本地服务(目前仅支持 stream 模式)
@@ -224,6 +227,8 @@ python3 xiaogpt.py --hardware LX06 --mute_xiaoai --use_gemini --gemini_key ${ge
224
227
  python3 xiaogpt.py --hardware LX06 --mute_xiaoai --use_gemini --gemini_key ${gemini_key} --gemini_api_domain ${gemini_api_domain}
225
228
  # 如果你想使用阿里的通义千问
226
229
  python3 xiaogpt.py --hardware LX06 --mute_xiaoai --use_qwen --qen_key ${qwen_key}
230
+ # 如果你想使用豆包
231
+ python3 xiaogpt.py --hardware LX06 --mute_xiaoai --use_doubao --stream --volc_access_key xxxx --volc_secret_key xxx
227
232
  # 如果你想使用 LangChain+SerpApi 实现上网检索或其他本地服务(目前仅支持 stream 模式)
228
233
  export OPENAI_API_KEY=${your_api_key}
229
234
  export SERPAPI_API_KEY=${your_serpapi_key}
@@ -375,7 +380,7 @@ docker build --build-arg PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
375
380
 
376
381
  ### 第三方 TTS
377
382
 
378
- 我们目前支持是三种第三方 TTS:edge/openai/azure
383
+ 我们目前支持是三种第三方 TTS:edge/openai/azure/volc/baidu/google
379
384
 
380
385
  [edge-tts](https://github.com/rany2/edge-tts) 提供了类似微软tts的能力
381
386
  [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 的能力
@@ -388,17 +393,16 @@ docker build --build-arg PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
388
393
  ```json
389
394
  {
390
395
  "tts": "edge",
391
- "tts_voice": "zh-CN-XiaoxiaoNeural"
392
396
  }
393
397
  ```
394
398
 
395
- 查看更多语言支持, 从中选择一个
399
+ For edge 查看更多语言支持, 从中选择一个
396
400
 
397
401
  ```shell
398
402
  edge-tts --list-voices
399
403
  ```
400
404
 
401
- #### 在容器中使用 edge-tts/azure-tts/openai-tts
405
+ #### 在容器中使用 edge-tts/azure-tts/openai-tts/volc/google/baidu
402
406
 
403
407
  由于 Edge TTS 启动了一个本地的 HTTP 服务,所以需要将容器的端口映射到宿主机上,并且指定本地机器的 hostname:
404
408
 
@@ -16,6 +16,7 @@ Play ChatGPT and other LLM with Xiaomi AI Speaker
16
16
  - New Bing
17
17
  - [ChatGLM](http://open.bigmodel.cn/)
18
18
  - [Gemini](https://makersuite.google.com/app/apikey)
19
+ - [Doubao](https://console.volcengine.com/iam/keymanage/)
19
20
  - [通义千问](https://help.aliyun.com/zh/dashscope/developer-reference/api-details)
20
21
 
21
22
  ## 获取小米音响DID
@@ -78,6 +79,8 @@ xiaogpt --hardware LX06 --mute_xiaoai --use_gemini --gemini_key ${gemini_key}
78
79
  python3 xiaogpt.py --hardware LX06 --mute_xiaoai --use_gemini --gemini_key ${gemini_key} --gemini_api_domain ${gemini_api_domain}
79
80
  # 如果你想使用阿里的通义千问
80
81
  xiaogpt --hardware LX06 --mute_xiaoai --use_qwen --qen_key ${qwen_key}
82
+ # 如果你想使用豆包
83
+ xiaogpt --hardware LX06 --mute_xiaoai --use_doubao --stream --volc_access_key xxxx --volc_secret_key xxx
81
84
  # 如果你想用 edge-tts
82
85
  xiaogpt --hardware LX06 --cookie ${cookie} --use_chatgpt_api --tts edge
83
86
  # 如果你想使用 LangChain + SerpApi 实现上网检索或其他本地服务(目前仅支持 stream 模式)
@@ -107,6 +110,8 @@ python3 xiaogpt.py --hardware LX06 --mute_xiaoai --use_gemini --gemini_key ${ge
107
110
  python3 xiaogpt.py --hardware LX06 --mute_xiaoai --use_gemini --gemini_key ${gemini_key} --gemini_api_domain ${gemini_api_domain}
108
111
  # 如果你想使用阿里的通义千问
109
112
  python3 xiaogpt.py --hardware LX06 --mute_xiaoai --use_qwen --qen_key ${qwen_key}
113
+ # 如果你想使用豆包
114
+ python3 xiaogpt.py --hardware LX06 --mute_xiaoai --use_doubao --stream --volc_access_key xxxx --volc_secret_key xxx
110
115
  # 如果你想使用 LangChain+SerpApi 实现上网检索或其他本地服务(目前仅支持 stream 模式)
111
116
  export OPENAI_API_KEY=${your_api_key}
112
117
  export SERPAPI_API_KEY=${your_serpapi_key}
@@ -258,7 +263,7 @@ docker build --build-arg PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
258
263
 
259
264
  ### 第三方 TTS
260
265
 
261
- 我们目前支持是三种第三方 TTS:edge/openai/azure
266
+ 我们目前支持是三种第三方 TTS:edge/openai/azure/volc/baidu/google
262
267
 
263
268
  [edge-tts](https://github.com/rany2/edge-tts) 提供了类似微软tts的能力
264
269
  [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 的能力
@@ -271,17 +276,16 @@ docker build --build-arg PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple
271
276
  ```json
272
277
  {
273
278
  "tts": "edge",
274
- "tts_voice": "zh-CN-XiaoxiaoNeural"
275
279
  }
276
280
  ```
277
281
 
278
- 查看更多语言支持, 从中选择一个
282
+ For edge 查看更多语言支持, 从中选择一个
279
283
 
280
284
  ```shell
281
285
  edge-tts --list-voices
282
286
  ```
283
287
 
284
- #### 在容器中使用 edge-tts/azure-tts/openai-tts
288
+ #### 在容器中使用 edge-tts/azure-tts/openai-tts/volc/google/baidu
285
289
 
286
290
  由于 Edge TTS 启动了一个本地的 HTTP 服务,所以需要将容器的端口映射到宿主机上,并且指定本地机器的 hostname:
287
291
 
@@ -28,7 +28,7 @@ dependencies = [
28
28
  "tetos>=0.1.1",
29
29
  ]
30
30
  dynamic = []
31
- version = "2.62"
31
+ version = "2.63"
32
32
 
33
33
  [project.license]
34
34
  text = "MIT"
@@ -55,7 +55,7 @@ locked = [
55
55
  "charset-normalizer==3.3.2",
56
56
  "click==8.1.7",
57
57
  "colorama==0.4.6 ; platform_system == \"Windows\"",
58
- "dashscope==1.17.0",
58
+ "dashscope==1.17.1",
59
59
  "dataclasses-json==0.6.3",
60
60
  "distro==1.9.0",
61
61
  "edge-tts==6.1.10",
@@ -69,7 +69,7 @@ locked = [
69
69
  "google-auth==2.26.1",
70
70
  "google-auth-httplib2==0.2.0",
71
71
  "google-cloud-texttospeech==2.16.3",
72
- "google-generativeai==0.5.1",
72
+ "google-generativeai==0.5.2",
73
73
  "google-search-results==2.4.2",
74
74
  "googleapis-common-protos==1.62.0",
75
75
  "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\"",
@@ -97,7 +97,7 @@ locked = [
97
97
  "mypy-extensions==1.0.0",
98
98
  "numexpr==2.10.0",
99
99
  "numpy==1.26.3",
100
- "openai==1.21.2",
100
+ "openai==1.23.2",
101
101
  "orjson==3.10.0",
102
102
  "packaging==23.2",
103
103
  "prompt-toolkit==3.0.43",
@@ -83,8 +83,12 @@ def main():
83
83
  default=None,
84
84
  help="try to mute xiaoai answer",
85
85
  )
86
- parser.add_argument("--volc-access-key", help="Volcengine access key")
87
- parser.add_argument("--volc-secret-key", help="Volcengine secret key")
86
+ parser.add_argument(
87
+ "--volc_access_key", dest="volc_access_key", help="Volcengine access key"
88
+ )
89
+ parser.add_argument(
90
+ "--volc_secret_key", dest="volc_secret_key", help="Volcengine secret key"
91
+ )
88
92
  parser.add_argument(
89
93
  "--verbose",
90
94
  dest="verbose",
@@ -140,6 +144,13 @@ def main():
140
144
  const="gemini",
141
145
  help="if use gemini",
142
146
  )
147
+ bot_group.add_argument(
148
+ "--use_doubao",
149
+ dest="bot",
150
+ action="store_const",
151
+ const="doubao",
152
+ help="if use doubao",
153
+ )
143
154
  parser.add_argument(
144
155
  "--bing_cookie_path",
145
156
  dest="bing_cookie_path",
@@ -156,6 +167,7 @@ def main():
156
167
  "gemini",
157
168
  "langchain",
158
169
  "qwen",
170
+ "doubao",
159
171
  ],
160
172
  )
161
173
  parser.add_argument(
@@ -153,6 +153,8 @@ class Config:
153
153
  key, value = "bot", "gemini"
154
154
  elif key == "use_qwen":
155
155
  key, value = "bot", "qwen"
156
+ elif key == "use_doubao":
157
+ key, value = "bot", "doubao"
156
158
  elif key == "use_langchain":
157
159
  key, value = "bot", "langchain"
158
160
  elif key == "enable_edge_tts":
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