Skip to content

Commit 5ed01bd

Browse files
committed
fix: drop gpt3 and bard and fix a bug
1 parent 4448113 commit 5ed01bd

14 files changed

+21
-422
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,4 @@ config/
135135
*.mp3
136136
.pdm-python
137137
.pdm-build/
138+
chatgpt.sh

README.md

+1-14
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ Play ChatGPT and other LLM with Xiaomi AI Speaker
1212

1313
## 支持的 AI 类型
1414

15-
- GPT3
1615
- ChatGPT
1716
- New Bing
1817
- [ChatGLM](http://open.bigmodel.cn/)
1918
- [Gemini](https://makersuite.google.com/app/apikey)
20-
- [Bard](https://github.com/dsdanielpark/Bard-API)
2119
- [通义千问](https://help.aliyun.com/zh/dashscope/developer-reference/api-details)
2220

2321
## 获取小米音响DID
@@ -71,7 +69,6 @@ export MI_DID=xxxx
7169
- 使用 `--account ${account} --password ${password}`
7270
- 如果有能力可以自行替换唤醒词,也可以去掉唤醒词
7371
- 使用 `--use_chatgpt_api` 的 api 那样可以更流畅的对话,速度特别快,达到了对话的体验, [openai api](https://platform.openai.com/account/api-keys), 命令 `--use_chatgpt_api`
74-
- 使用 gpt-3 的 api 那样可以更流畅的对话,速度快, 请 google 如何用 [openai api](https://platform.openai.com/account/api-keys) 命令 --use_gpt3
7572
- 如果你遇到了墙需要用 Cloudflare Workers 替换 api_base 请使用 `--api_base ${url}` 来替换。 **请注意,此处你输入的api应该是'`https://xxxx/v1`'的字样,域名需要用引号包裹**
7673
- 可以跟小爱说 `开始持续对话` 自动进入持续对话状态,`结束持续对话` 结束持续对话状态。
7774
- 可以使用 `--tts edge` 来获取更好的 tts 能力
@@ -92,9 +89,6 @@ xiaogpt --hardware LX06 --account ${your_xiaomi_account} --password ${your_passw
9289
xiaogpt --hardware LX06 --mute_xiaoai --use_chatgpt_api
9390
# 使用流式响应,获得更快的响应
9491
xiaogpt --hardware LX06 --mute_xiaoai --stream
95-
# 如果你想使用 gpt3 ai
96-
export OPENAI_API_KEY=${your_api_key}
97-
xiaogpt --hardware LX06 --mute_xiaoai --use_gpt3
9892
# 如果你想使用 google 的 gemini
9993
xiaogpt --hardware LX06 --mute_xiaoai --use_gemini --gemini_key ${gemini_key}
10094
# 如果你想使用阿里的通义千问
@@ -120,13 +114,8 @@ python3 xiaogpt.py --hardware LX06 --account ${your_xiaomi_account} --password $
120114
python3 xiaogpt.py --hardware LX06 --mute_xiaoai
121115
# 使用流式响应,获得更快的响应
122116
python3 xiaogpt.py --hardware LX06 --mute_xiaoai --stream
123-
# 如果你想使用 gpt3 ai
124-
export OPENAI_API_KEY=${your_api_key}
125-
python3 xiaogpt.py --hardware LX06 --mute_xiaoai --use_gpt3
126117
# 如果你想使用 ChatGLM api
127118
python3 xiaogpt.py --hardware LX06 --mute_xiaoai --use_glm --glm_key ${glm_key}
128-
# 如果你想使用 google 的 bard
129-
python3 xiaogpt.py --hardware LX06 --mute_xiaoai --use_bard --bard_token ${bard_token}
130119
# 如果你想使用 google 的 gemini
131120
python3 xiaogpt.py --hardware LX06 --mute_xiaoai --use_gemini --gemini_key ${gemini_key}
132121
# 如果你想使用阿里的通义千问
@@ -171,7 +160,6 @@ python3 xiaogpt.py
171160

172161
具体参数作用请参考 [Open AI API 文档](https://platform.openai.com/docs/api-reference/chat/create)
173162
ChatGLM [文档](http://open.bigmodel.cn/doc/api#chatglm_130b)
174-
Bard-API [参考](https://github.com/dsdanielpark/Bard-API)
175163

176164
## 配置项说明
177165

@@ -185,13 +173,12 @@ Bard-API [参考](https://github.com/dsdanielpark/Bard-API)
185173
| glm_key | chatglm 的 apikey | | |
186174
| gemini_key | gemini 的 apikey [参考](https://makersuite.google.com/app/apikey) | | |
187175
| qwen_key | qwen 的 apikey [参考](https://help.aliyun.com/zh/dashscope/developer-reference/api-details) | | |
188-
| bard_token | bard 的 token 参考 [Bard-API](https://github.com/dsdanielpark/Bard-API) | | |
189176
| cookie | 小爱账户cookie (如果用上面密码登录可以不填) | | |
190177
| mi_did | 设备did | | |
191178
| use_command | 使用 MI command 与小爱交互 | `false` | |
192179
| mute_xiaoai | 快速停掉小爱自己的回答 | `true` | |
193180
| verbose | 是否打印详细日志 | `false` | |
194-
| bot | 使用的 bot 类型,目前支持gpt3,chatgptapi和newbing | `chatgptapi` | |
181+
| bot | 使用的 bot 类型,目前支持 chatgptapi,newbing, qwen, gemini | `chatgptapi` | |
195182
| tts | 使用的 TTS 类型 | `mi` | `edge``openai``azure` |
196183
| tts_voice | TTS 的嗓音 | `zh-CN-XiaoxiaoNeural`(edge), `alloy`(openai), `zh-CN-XiaoxiaoMultilingualNeural`(azure) | |
197184
| prompt | 自定义prompt | `请用100字以内回答` | |

0 commit comments

Comments
 (0)