Code Monkey home page Code Monkey logo

xiaogpt's Introduction

xiaogpt

PyPI Docker Image Version (latest by date)

yihong0618.1635132234935177216.mp4

Play ChatGPT and other LLM with Xiaomi AI Speaker

image image

支持的 AI 类型

获取小米音响DID

系统和Shell Linux *sh Windows CMD用户 Windows PowerShell用户
1、安装包 pip install miservice_fork pip install miservice_fork pip install miservice_fork
2、设置变量 export MI_USER=xxx
export MI_PASS=xxx
set MI_USER=xxx
set MI_PASS=xxx
$env:MI_USER="xxx"
$env:MI_PASS="xxx"
3、取得MI_DID micli list micli list micli list
4、设置MI_DID export MI_DID=xxx set MI_DID=xxx $env:MI_DID="xxx"
  • 注意不同shell 对环境变量的处理是不同的,尤其是powershell赋值时,可能需要双引号来包括值。
  • 如果获取did报错时,请更换一下无线网络,有很大概率解决问题。

一点原理

不用 root 使用小爱同学和 ChatGPT 交互折腾记

准备

  1. ChatGPT id
  2. 小爱音响
  3. 能正常联网的环境或 proxy
  4. python3.8+

使用

  • pip install -U --force-reinstall xiaogpt[locked]
  • 参考我 fork 的 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 回答
  • 如果上面不可用,可以尝试用手机抓包,https://userprofile.mina.mi.com/device_profile/v2/conversation 找到 cookie 利用 --cookie '${cookie}' cookie 别忘了用单引号包裹
  • 默认用目前 ubus, 如果你的设备不支持 ubus 可以使用 --use_command 来使用 command 来 tts
  • 使用 --mute_xiaoai 选项,可以快速停掉小爱的回答
  • 使用 --account ${account} --password ${password}
  • 如果有能力可以自行替换唤醒词,也可以去掉唤醒词
  • 使用 --use_chatgpt_api 的 api 那样可以更流畅的对话,速度特别快,达到了对话的体验, openai api, 命令 --use_chatgpt_api
  • 如果你遇到了墙需要用 Cloudflare Workers 替换 api_base 请使用 --api_base ${url} 来替换。 请注意,此处你输入的api应该是'https://xxxx/v1'的字样,域名需要用引号包裹
  • --use_moonshot_api and other models please refer below
  • 可以跟小爱说 开始持续对话 自动进入持续对话状态,结束持续对话 结束持续对话状态。
  • 可以使用 --tts edge 来获取更好的 tts 能力
  • 可以使用 --tts openai 来获取 openai tts 能力
  • 可以使用 --tts azure --azure_tts_speech_key <your-speech-key> 来获取 Azure TTS 能力
  • 可以使用 --use_langchain 替代 --use_chatgpt_api 来调用 LangChain(默认 chatgpt)服务,实现上网检索、数学运算..

e.g.

export OPENAI_API_KEY=${your_api_key}
xiaogpt --hardware LX06 --use_chatgpt_api
# or
xiaogpt --hardware LX06 --cookie ${cookie} --use_chatgpt_api
# 如果你想直接输入账号密码
xiaogpt --hardware LX06 --account ${your_xiaomi_account} --password ${your_password} --use_chatgpt_api
# 如果你想 mute 小米的回答
xiaogpt --hardware LX06  --mute_xiaoai --use_chatgpt_api
# 使用流式响应,获得更快的响应
xiaogpt --hardware LX06  --mute_xiaoai --stream
# 如果你想使用 google 的 gemini
xiaogpt --hardware LX06  --mute_xiaoai --use_gemini --gemini_key ${gemini_key}
# 如果你想使用自己的 google gemini 服务
python3 xiaogpt.py --hardware LX06  --mute_xiaoai --use_gemini --gemini_key ${gemini_key} --gemini_api_domain ${gemini_api_domain}
# 如果你想使用阿里的通义千问
xiaogpt --hardware LX06  --mute_xiaoai --use_qwen --qwen_key ${qwen_key}
# 如果你想使用 kimi
xiaogpt --hardware LX06  --mute_xiaoai --use_moonshot_api --moonshot_api_key ${moonshot_api_key}
# 如果你想使用 llama3
xiaogpt --hardware LX06  --mute_xiaoai --use_llama --llama_api_key ${llama_api_key}
# 如果你想使用 01
xiaogpt --hardware LX06  --mute_xiaoai --use_yi_api --ti_api_key ${yi_api_key}
# 如果你想使用豆包




export OPENAI_API_KEY=${your_api_key}
export SERPAPI_API_KEY=${your_serpapi_key}
xiaogpt --hardware Lx06 --use_langchain --mute_xiaoai --stream --openai_key ${your_api_key} --serpapi_api_key ${your_serpapi_key}

使用 git clone 运行

export OPENAI_API_KEY=${your_api_key}
python3 xiaogpt.py --hardware LX06
# or
python3 xiaogpt.py --hardware LX06 --cookie ${cookie}
# 如果你想直接输入账号密码
python3 xiaogpt.py --hardware LX06 --account ${your_xiaomi_account} --password ${your_password} --use_chatgpt_api
# 如果你想 mute 小米的回答
python3 xiaogpt.py --hardware LX06  --mute_xiaoai
# 使用流式响应,获得更快的响应
python3 xiaogpt.py --hardware LX06  --mute_xiaoai --stream
# 如果你想使用 ChatGLM api
python3 xiaogpt.py --hardware LX06  --mute_xiaoai --use_glm --glm_key ${glm_key}
# 如果你想使用 google 的 gemini
python3 xiaogpt.py --hardware LX06  --mute_xiaoai --use_gemini --gemini_key ${gemini_key}
# 如果你想使用自己的 google gemini 服务
python3 xiaogpt.py --hardware LX06  --mute_xiaoai --use_gemini --gemini_key ${gemini_key} --gemini_api_domain ${gemini_api_domain}
# 如果你想使用阿里的通义千问
python3 xiaogpt.py --hardware LX06  --mute_xiaoai --use_qwen --qwen_key ${qwen_key}
# 如果你想使用 kimi
xiaogpt --hardware LX06  --mute_xiaoai --use_moonshot_api --moonshot_api_key ${moonshot_api_key}
# 如果你想使用 01
xiaogpt --hardware LX06  --mute_xiaoai --use_yi_api --ti_api_key ${yi_api_key}
# 如果你想使用豆包
python3 xiaogpt.py --hardware LX06  --mute_xiaoai --use_doubao --stream --volc_access_key xxxx --volc_secret_key xxx
# 如果你想使用 llama3
python3 xiaogpt.py --hardware LX06  --mute_xiaoai --use_llama --llama_api_key ${llama_api_key}
# 如果你想使用 LangChain+SerpApi 实现上网检索或其他本地服务(目前仅支持 stream 模式)
export OPENAI_API_KEY=${your_api_key}
export SERPAPI_API_KEY=${your_serpapi_key}
python3 xiaogpt.py --hardware Lx06 --use_langchain --mute_xiaoai --stream --openai_key ${your_api_key} --serpapi_api_key ${your_serpapi_key}

config.yaml

如果想通过单一配置文件启动也是可以的, 可以通过 --config 参数指定配置文件, config 文件必须是合法的 Yaml 或 JSON 格式 参数优先级

  • cli args > default > config
python3 xiaogpt.py --config xiao_config.yaml
# or
xiaogpt --config xiao_config.yaml

或者

cp xiao_config.yaml.example xiao_config.yaml
python3 xiaogpt.py

若要指定 OpenAI 的模型参数,如 model, temporature, top_p, 请在 config.yaml 中指定:

gpt_options:
  temperature: 0.9
  top_p: 0.9

具体参数作用请参考 Open AI API 文档。 ChatGLM 文档

配置项说明

参数 说明 默认值 可选值
hardware 设备型号
account 小爱账户
password 小爱账户密码
openai_key openai的apikey
moonshot_api_key moonshot kimi 的 apikey
yi_api_key 01 wanwu 的 apikey
llama_api_key groq 的 llama3 apikey
serpapi_api_key serpapi的key 参考 SerpAPI
glm_key chatglm 的 apikey
gemini_key gemini 的 apikey 参考
gemini_api_domain gemini 的自定义域名 参考
qwen_key qwen 的 apikey 参考
cookie 小爱账户cookie (如果用上面密码登录可以不填)
mi_did 设备did
use_command 使用 MI command 与小爱交互 false
mute_xiaoai 快速停掉小爱自己的回答 true
verbose 是否打印详细日志 false
bot 使用的 bot 类型,目前支持 chatgptapi,newbing, qwen, gemini chatgptapi
tts 使用的 TTS 类型 mi edgeopenaiazurevolcbaidugoogleminimax
tts_options TTS 参数字典,参考 tetos 获取可用参数
prompt 自定义prompt 请用100字以内回答
keyword 自定义请求词列表 ["请"]
change_prompt_keyword 更改提示词触发列表 ["更改提示词"]
start_conversation 开始持续对话关键词 开始持续对话
end_conversation 结束持续对话关键词 结束持续对话
stream 使用流式响应,获得更快的响应 true
proxy 支持 HTTP 代理,传入 http proxy URL ""
gpt_options OpenAI API 的参数字典 {}
deployment_id Azure OpenAI 服务的 deployment ID 参考这个如何找到deployment_id
api_base 如果需要替换默认的api,或者使用Azure OpenAI 服务 例如:https://abc-def.openai.azure.com/
volc_access_key 火山引擎的 access key 请在这里获取
volc_secret_key 火山引擎的 secret key 请在这里获取

注意

  1. 请开启小爱同学的蓝牙
  2. 如果要更改提示词和 PROMPT 在代码最上面自行更改
  3. 目前已知 LX04、X10A 和 L05B L05C 可能需要使用 --use_command,否则可能会出现终端能输出GPT的回复但小爱同学不回答GPT的情况。这几个型号也只支持小爱原本的 tts.
  4. 在wsl使用时, 需要设置代理为 http://wls的ip:port(vpn的代理端口), 否则会出现连接超时的情况, 详情 报错: Error communicating with OpenAI

QA

  1. 用破解么?不用
  2. 你做这玩意也没用啊?确实。。。但是挺好玩的,有用对你来说没用,对我们来说不一定呀
  3. 想把它变得更好?PR Issue always welcome.
  4. 还有问题?提 Issue 哈哈
  5. Exception: Error https://api2.mina.mi.com/admin/v2/device_list?master=0&requestId=app_ios_xxx: Login failed @KJZH001
    这是由于小米风控导致,海外地区无法登录大陆的账户,请尝试cookie登录 无法抓包的可以在本地部署完毕项目后再用户文件夹C:\Users\用户名下面找到.mi.token,然后扔到你无法登录的服务器去
    若是linux则请放到当前用户的home文件夹,此时你可以重新执行先前的命令,不出意外即可正常登录(但cookie可能会过一段时间失效,需要重新获取)
    详情请见 #332

视频教程

https://www.youtube.com/watch?v=K4YA8YwzOOA

Docker

常规用法

X86/ARM Docker Image: yihong0618/xiaogpt

docker run -e OPENAI_API_KEY=<your-openapi-key> yihong0618/xiaogpt <命令行参数>

docker run -e OPENAI_API_KEY=<your-openapi-key> yihong0618/xiaogpt --account=<your-xiaomi-account> --password=<your-xiaomi-password> --hardware=<your-xiaomi-hardware> --use_chatgpt_api

使用配置文件

xiaogpt的配置文件可通过指定volume /config,以及指定参数--config来处理,如

docker run -v <your-config-dir>:/config yihong0618/xiaogpt --config=/config/config.yaml

网络使用 host 模型

docker run -v <your-config-dir>:/config --network=host yihong0618/xiaogpt --config=/config/config.yaml

本地编译Docker Image

 docker build -t xiaogpt .

如果在安装依赖时构建失败或安装缓慢时,可以在构建 Docker 镜像时使用 --build-arg 参数来指定国内源地址:

docker build --build-arg PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple -t xiaogpt .

如果需要在Apple M1/M2上编译x86

 docker buildx build --platform=linux/amd64 -t xiaogpt-x86 .

第三方 TTS

我们目前支持是三种第三方 TTS:edge/openai/azure/volc/baidu/google

edge-tts 提供了类似微软tts的能力 azure-tts 提供了微软 azure tts 的能力 openai-tts 提供了类似 openai tts 的能力

Usage

你可以通过参数 tts, 来启用它

tts: edge

For edge 查看更多语言支持, 从中选择一个

edge-tts --list-voices

在容器中使用 edge-tts/azure-tts/openai-tts/volc/google/baidu

由于 Edge TTS 启动了一个本地的 HTTP 服务,所以需要将容器的端口映射到宿主机上,并且指定本地机器的 hostname:

docker run -v <your-config-dir>:/config -p 9527:9527 -e XIAOGPT_HOSTNAME=<your ip> yihong0618/xiaogpt --config=/config/config.yaml

注意端口必须映射为与容器内一致,XIAOGPT_HOSTNAME 需要设置为宿主机的 IP 地址,否则小爱无法正常播放语音。

推荐的 fork

  • XiaoBot -> Go语言版本的Fork, 带支持不同平台的UI

感谢

赞赏

谢谢就够了

xiaogpt's People

Contributors

848244210 avatar changeforan avatar chigogo avatar cnrock avatar cxjava avatar davidzhixing avatar dependabot[bot] avatar dongjing007 avatar fengxiao2019 avatar frostming avatar hanxi avatar iazrael avatar isanwenyu avatar jtc1246 avatar kjzh001 avatar laipz8200 avatar longbai avatar longlegsp avatar lucareful avatar maple-dawn avatar maxint avatar phillweston avatar pjovy avatar pjq avatar sljeff avatar sswordq avatar tanaer avatar vectorzhao avatar ycjcl868 avatar yihong0618 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xiaogpt's Issues

登录验证失败

请问这个如何解决呢?下午还能登录,密码这块没有动

Exception on login : {'qs': '%3Fsid%3Dmicoapi%26_json%3Dtrue', 'code': 70016, 'description': '登录验证失败', 'securityStatus': 0, '_sign': '58VY7HzpBxBcLsgTGFWDyJ7fEtw=', 'sid': 'micoapi', 'result': 'error', 'captchaUrl': None, 'callback': 'https://api2.mina.mi.com/sts', 'location': '', 'pwd': 0, 'child': 0, 'desc': '登录验证失败'}

micli list 提示登录 ssl证书有误

Cannot connect to host account.xiaomi.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')]

micli list 结果报Login failed

请教一下
跑micli list结果报SSLCertVerificationError,Login failed
查了一下需要关闭VPN,关了VPN直连也无法解决。
请问是什么原因,有什么解决办法吗?

Exception on login None: Cannot connect to host account.xiaomi.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')]
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 1103, in create_connection
transport, protocol = await self._create_connection_transport(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 1133, in _create_connection_transport
await waiter
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/sslproto.py", line 534, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/sslproto.py", line 188, in feed_ssldata
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 975, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/miservice/miaccount.py", line 56, in login
resp = await self._serviceLogin(f"serviceLogin?sid={sid}&_json=true")
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/miservice/miaccount.py", line 98, in _serviceLogin
async with self.session.request(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in aenter
self._resp = await self._coro
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request
conn = await self._connector.connect(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect
proto = await self._create_connection(req, traces, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/connector.py", line 901, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
raise last_exc
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/aiohttp/connector.py", line 982, in _wrap_create_connection
raise ClientConnectorCertificateError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host account.xiaomi.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')]
Error https://api.io.mi.com/app/home/device_list: Login failed

这是登录错误?

Running xiaogpt now, 用帮我开头来提问
2023-03-04 20:39:32,002 - miservice - ERROR - login - Exception on login : {'qs': '%3Fsid%3Dmicoapi%26_json%3Dtrue', 'code': 70016, 'description': '登录验证失败', 'securityStatus': 0, '_sign': '58VY7HzpBxBcLsgTGFWDyJ7fEtw=', 'sid': 'micoapi', 'result': 'error', 'captchaUrl': None, 'callback': 'https://api2.mina.mi.com/sts', 'location': '', 'pwd': 0, 'child': 0, 'desc': '登录验证失败'}
Traceback (most recent call last):
File "C:\Users\86173\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\miservice\miaccount.py", line 69, in login
raise Exception(resp)
Exception: {'qs': '%3Fsid%3Dmicoapi%26_json%3Dtrue', 'code': 70016, 'description': '登录验证失败', 'securityStatus': 0, '_sign': '58VY7HzpBxBcLsgTGFWDyJ7fEtw=', 'sid': 'micoapi', 'result': 'error', 'captchaUrl': None, 'callback': 'https://api2.mina.mi.com/sts', 'location': '', 'pwd': 0, 'child': 0, 'desc': '登录验证失败'}
2023-03-04 20:39:32,082 - miservice - ERROR - login - Exception on login : {'qs': '%3Fsid%3Dmicoapi%26_json%3Dtrue', 'code': 70016, 'description': '登录验证失败', 'securityStatus': 0, '_sign': '58VY7HzpBxBcLsgTGFWDyJ7fEtw=', 'sid': 'micoapi', 'result': 'error', 'captchaUrl': None, 'callback': 'https://api2.mina.mi.com/sts', 'location': '', 'pwd': 0, 'child': 0, 'desc': '登录验证失败'}
Traceback (most recent call last):
File "C:\Users\86173\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\miservice\miaccount.py", line 69, in login
raise Exception(resp)
Exception: {'qs': '%3Fsid%3Dmicoapi%26_json%3Dtrue', 'code': 70016, 'description': '登录验证失败', 'securityStatus': 0, '_sign': '58VY7HzpBxBcLsgTGFWDyJ7fEtw=', 'sid': 'micoapi', 'result': 'error', 'captchaUrl': None, 'callback': 'https://api2.mina.mi.com/sts', 'location': '', 'pwd': 0, 'child': 0, 'desc': '登录验证失败'}
Traceback (most recent call last):
File "F:\xiaochat\xiaogpt\xiaogpt.py", line 457, in
asyncio.run(miboy.run_forever())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 649, in run_until_complete
return future.result()
File "F:\xiaochat\xiaogpt\xiaogpt.py", line 288, in run_forever
await self.init_all_data(session)
File "F:\xiaochat\xiaogpt\xiaogpt.py", line 140, in init_all_data
await self._init_data_hardware()
File "F:\xiaochat\xiaogpt\xiaogpt.py", line 164, in _init_data_hardware
hardware_data = await self.mina_service.device_list()
File "C:\Users\86173\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\miservice\minaservice.py", line 27, in device_list
result = await self.mina_request("/admin/v2/device_list?master=" + str(master))
File "C:\Users\86173\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\miservice\minaservice.py", line 22, in mina_request
return await self.account.mi_request(
File "C:\Users\86173\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\miservice\miaccount.py", line 149, in mi_request
raise Exception(f"Error {url}: {resp}")
Exception: Error https://api2.mina.mi.com/admin/v2/device_list?master=0&requestId=app_ios_B6DKLqt9uYivmyIWUhElXVMFgdGZAO: Login failed

是否让小爱同学播放指定音频文件呢?

目前小爱同学可以朗读文字,但是如何播放指定音频呢?
spec如下:

Intelligent_Speaker = 7
  _Text_Content = 1
  _Silent_Execution = 2 # bool
  Sleep_Mode = 3 # bool # rwn
  Audio_Id = 4 # rn
  
  _Wake_Up = 1
  _Play_Radio = 2
  _Play_Text = 3  # in=[1]
  _Execute_Text_Directive = 4  # in=[1, 2]
  _Play_Music = 5

看 spec 里有 Play_Radio 这样的命令,但是该如何输入参数呢?

前面几步都做了,为啥跑不起来?

ython3 xiaogpt.py --hardware LX06
Traceback (most recent call last):
File "/root/xiaomivoice/xiaogpt/xiaogpt.py", line 238, in
asyncio.run(miboy.run_forever())
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/root/xiaomivoice/xiaogpt/xiaogpt.py", line 163, in run_forever
await self.init_all_data(session)
File "/root/xiaomivoice/xiaogpt/xiaogpt.py", line 65, in init_all_data
self.service_token = user_data.get("micoapi")[1]
TypeError: 'NoneType' object is not subscriptable

No module named 'aiohttp'

Hello,

In below evironment there is a chance that 'aiohttp' module is missing and requires to get installed in advance:

(py3) [root@Edge xiaogpt]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
(py3) [root@Edge xiaogpt]# python3 -V
Python 3.10.4
(py3) [root@Edge xiaogpt]#

Issues when 'aiohttp' is not installed:

(py3) [root@Edge xiaogpt]# pip3 install -r requirements.txt
Collecting git+https://github.com/yihong0618/MiService (from -r requirements.txt (line 2))
  Cloning https://github.com/yihong0618/MiService to /tmp/pip-req-build-0u7ehtjb
  Running command git clone --quiet https://github.com/yihong0618/MiService /tmp/pip-req-build-0u7ehtjb
  Resolved https://github.com/yihong0618/MiService to commit c8f245207c25817116086729b924e3c15fd4385c
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-req-build-0u7ehtjb/setup.py", line 15, in <module>
          from miservice import MISERVICE_VERSION
        File "/tmp/pip-req-build-0u7ehtjb/miservice/__init__.py", line 1, in <module>
          from .miaccount import MiAccount, MiTokenStore
        File "/tmp/pip-req-build-0u7ehtjb/miservice/miaccount.py", line 9, in <module>
          from aiohttp import ClientSession
      ModuleNotFoundError: No module named 'aiohttp'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
(py3) [root@Edge xiaogpt]# 

As a resolution I would suggest to add aiohttp in requirements.txt

验证出错:KeyError: 'userId'

用户名密码没问题(用户名尝试了手机号、邮箱、小米ID),但一直这个错误,不知道是不是小米改了这块

➜  xiaogpt git:(main) micli.py list
Exception on login 188825209: 'userId'
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/miservice/miaccount.py", line 71, in login
    self.token['userId'] = resp['userId']
KeyError: 'userId'
Error https://api.io.mi.com/app/home/device_list: Login failed

在使用 chatgpt api 回答英语时,会自动在消息中每个单词间加 , 号。 造成不连续。

比如问“帮我 用英语回答天空为什么是蓝色的”
回答的message 如下。
以下是GPT的回答: ,,The,sky,appears,blue,because,of,the,scattering,of,sunlight,by,the,Earth's,atmosphere.
,As,sunlight,enters,the,Earth's,atmosphere,,the,short-wavelength,blue,light,is,scattered,more,widely,tha
n,the,other,colors,in,the,spectrum,,such,as,red,and,orange.,This,scattering,process,causes,the,blue,l
ight,to,travel,in,multiple,directions,and,reach,our,eyes,from,all,angles,,making,the,sky,appear,blue,
during,the,day.,However,,during,sunrise,and,sunset,,the,longer-wavelength,colors,such,as,red,and,orange
,appear,more,visible,since,they,are,not,scattered,as,much,by,the,atmosphere.,This,is,why,the,sky,cha
nges,color,to,hues,of,reds,and,oranges,during,these,times,of,the,day.

我用armbian有报错

raise last_exc
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 982, in _wrap_create_connection
raise ClientConnectorCertificateError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host account.xiaomi.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:992)')]
Traceback (most recent call last):
File "/root/xiaogpt/xiaogpt.py", line 457, in
asyncio.run(miboy.run_forever())
File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/root/xiaogpt/xiaogpt.py", line 288, in run_forever
await self.init_all_data(session)
File "/root/xiaogpt/xiaogpt.py", line 140, in init_all_data
await self._init_data_hardware()
File "/root/xiaogpt/xiaogpt.py", line 164, in _init_data_hardware
hardware_data = await self.mina_service.device_list()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/miservice/minaservice.py", line 27, in device_list
result = await self.mina_request("/admin/v2/device_list?master=" + str(master))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/miservice/minaservice.py", line 22, in mina_request
return await self.account.mi_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/miservice/miaccount.py", line 149, in mi_request
raise Exception(f"Error {url}: {resp}")
Exception: Error https://api2.mina.mi.com/admin/v2/device_list?master=0&requestId=app_ios_t9Nu8v2RLMCo6aV4D1EzGIgUZxwp7q: Login failed

Exception: we have no hardware: xiaomi.wifispeaker please check

你好,我设置好了openGPT了,可以 回答了。
另外micli list 获取了以下信息
"name": "小米AI音箱",
"model": "xiaomi.wifispeaker.s12",
"did": "151653888"
我摸索出了这些命令:
micli.py 3-1=0 #麦克风禁用,须手动开启
micli.py 5 “内容” 播放声音,不能有空格
micli.py 2=40 设置音量40%
micli.py action '{"did":"设置DID","miid":0,"siid":5,"aiid":5,"in":["天气怎么样", 0]}' 查询询问的内容。
我运行了xiaogpt.py 出现了以下提示。因为我不知道我的小米智能音箱,hardware填 什么 ,它的铭牌上就是一个型号MDZ-25-DA,和一个SN号,是数字型的。
Exception: we have no hardware: xiaomi.wifispeaker.s12 please check
请大神解答一下,小白不太懂。

micli.py在window下如何用的呢

PS F:\xiaochat\m\miservice> .\micli.py
MiService 2.0.1 - XiaoMi Cloud Service

Usage: The following variables must be set:
set MI_USER=
set MI_PASS=
set MI_DID=<Device ID|Name>

Get Props: F:\xiaochat\m\miservice\micli.py <siid[-piid]>[,...]
F:\xiaochat\m\miservice\micli.py 1,1-2,1-3,1-4,2-1,2-2,3
Set Props: F:\xiaochat\m\miservice\micli.py <siid[-piid]=[#]value>[,...]
F:\xiaochat\m\miservice\micli.py 2=#60,2-2=#false,3=test
Do Action: F:\xiaochat\m\miservice\micli.py <siid[-piid]> <arg1|#NA> [...]
F:\xiaochat\m\miservice\micli.py 2 #NA
F:\xiaochat\m\miservice\micli.py 5 Hello
F:\xiaochat\m\miservice\micli.py 5-4 Hello #1

Call MIoT: F:\xiaochat\m\miservice\micli.py <cmd=prop/get|/prop/set|action>
F:\xiaochat\m\miservice\micli.py action '{"did":"267090026","siid":5,"aiid":1,"in":["Hello"]}'

Call MiIO: F:\xiaochat\m\miservice\micli.py /
F:\xiaochat\m\miservice\micli.py /home/device_list '{"getVirtualModel":false,"getHuamiDevices":1}'

Devs List: F:\xiaochat\m\miservice\micli.py list [name=full|name_keyword] [getVirtualModel=false|true] [getHuamiDevices=0|1]
F:\xiaochat\m\miservice\micli.py list Light true 0

MIoT Spec: F:\xiaochat\m\miservice\micli.py spec [model_keyword|type_urn] [format=text|python|json]
F:\xiaochat\m\miservice\micli.py spec
F:\xiaochat\m\miservice\micli.py spec speaker
F:\xiaochat\m\miservice\micli.py spec xiaomi.wifispeaker.lx04
F:\xiaochat\m\miservice\micli.py spec urn:miot-spec-v2:device:speaker:0000A015:xiaomi-lx04:1

MIoT Decode: F:\xiaochat\m\miservice\micli.py decode [gzip]

PS F:\xiaochat\m\miservice> .\micli.py list
Exception on login None: 'NoneType' object has no attribute 'encode'
Traceback (most recent call last):
File "F:\xiaochat\m\miservice\miservice\miaccount.py", line 65, in login
'hash': hashlib.md5(self.password.encode()).hexdigest().upper()
AttributeError: 'NoneType' object has no attribute 'encode'
Error https://api.io.mi.com/app/home/device_list: Login failed
PS F:\xiaochat\m\miservice>

不明白怎么操作,能不能详细说说

  1. 参考 MiService 项目 README 并在本地 terminal 跑 micli list 拿到你音响的 DID 成功 别忘了设置 export MI_DID=xxx 这个 MI_DID 用
  2. 参考 revChatGPT 项目 README 配置 chatGPT 的 config

这两步,不知道怎么操作?怎么拿音响的 DID, MI_DID用来做什么?能不能详细说说

启动就直接退出了

Windows环境,按照视频全部配置完成,执行python3 xiaogpt.py --config xiao_config.json,什么都没有发生,直接退出了。

player_get_status 错误

我看了下MiService,他也没有这个player_get_status/player_pause啊,老哥你是调用的哪个

Windos system `pip install -r .\requirements.txt` error: ModuleNotFoundError: No module named 'aiohttp'

复现情况

❯ pip install -r .\requirements.txt
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting git+https://github.com/yihong0618/MiService (from -r .\requirements.txt (line 3))
  Cloning https://github.com/yihong0618/MiService to e:\appdata\local\temp\pip-req-build-f70ijpqt
  Running command git clone --filter=blob:none --quiet https://github.com/yihong0618/MiService 'E:\AppData\Local\TEMP\pip-req-build-f70ijpqt'
  Resolved https://github.com/yihong0618/MiService to commit c8f245207c25817116086729b924e3c15fd4385c
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "E:\AppData\Local\TEMP\pip-req-build-f70ijpqt\setup.py", line 15, in <module>
          from miservice import MISERVICE_VERSION
        File "E:\AppData\Local\TEMP\pip-req-build-f70ijpqt\miservice\__init__.py", line 1, in <module>
          from .miaccount import MiAccount, MiTokenStore
        File "E:\AppData\Local\TEMP\pip-req-build-f70ijpqt\miservice\miaccount.py", line 9, in <module>
          from aiohttp import ClientSession
      ModuleNotFoundError: No module named 'aiohttp'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

问题原因

MiService这个库存依赖 aiohttp,虽然大佬您在 requirements.txt 中也存在这个库,但是由于 pip 安装机制是无序的,也就是说 install requirements.txt 需要先 aiohttp,然后安装 MiService 这个服务,但是实际上没有按照这种顺序安装

解决方案

  1. 先安装pip install aiohttp
    见 pr: #57

  2. shell 脚本读取requirements.txt安装

#!/bin/bash
for line in $(cat requirements.txt)
do
  pip install $line 
done
  1. 可以考虑更好的包管理工具eg: poetry

在本地 terminal 跑 micli list 怎么搞?

参考 MiService 项目 README 并在本地 terminal 跑 micli list 拿到你音响的 DID 成功 别忘了设置 export MI_DID=xxx 这个 MI_DID 用

这个我已经安装好了,但是我需要在 terminal 中的micli.py所在目录执行 micli.py list 才能行,怎么实现直接输入micli list就可以?
目前一直提示micli找不到。
File "xiaogpt.py", line 54, in _init_all_data
mi_hardware_data = json.loads(subprocess.check_output(["micli", "mina"]))
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'micli'

关于 stop_if_xiaoai_is_playing 逻辑的疑问

  1. 在get_last_timestamp_and_record之前;执行了await self.stop_if_xiaoai_is_playing() 为什么要执行这个stop动作呢?
  2. 另外在执行完gpt任务后,会持续查询 self.get_if_xiaoai_is_playing() 并sleep,这里的作用是?

we have no hardware: S12 please check

操作:配置好MI_USER、MI_PASS和MI_DID之后,执行 python3 xiaogpt.py --hardware S12
现象:提示we have no hardware: S12 please check
排查:

  1. 使用micli的命令,可以正常让小爱同学说话。
  2. 执行命令 micli mina 返回空数组 []
  3. 执行命令 micli list,只返回两个路由器的信息,没有小爱音箱。(MI_DID的值是通过homeassistant 小米插件获取的)
  4. 手动修改脚本_init_data_hardware函数,直接指定 decive_id。执行命令后提示,获取小爱聊天记录接口“越界”(盲猜是从小米服务器读取不到账号下的小爱同学聊天记录)

安装pip install -r requirements.txt 错误

Collecting git+https://github.com/yihong0618/MiService (from -r requirements.txt (line 2))
Cloning https://github.com/yihong0618/MiService to c:\users\86173\appdata\local\temp\pip-req-build-1oka21it
Running command git clone --filter=blob:none --quiet https://github.com/yihong0618/MiService 'C:\Users\86173\AppData\Local\Temp\pip-req-build-1oka21it'
fatal: unable to access 'https://github.com/yihong0618/MiService/': Recv failure: Connection was reset
error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/yihong0618/MiService 'C:\Users\86173\AppData\Local\Temp\pip-req-build-1oka21it' did not run successfully.
│ exit code: 128
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://github.com/yihong0618/MiService 'C:\Users\86173\AppData\Local\Temp\pip-req-build-1oka21it' did not run successfully.
│ exit code: 128
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

[notice] A new release of pip available: 22.3.1 -> 23.0.1
[notice] To update, run: C:\Users\86173\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip

[Error]运行时报错

运行xiaogpt.py时,报错:
/pip/xiaogpt-main# python3 xiaogpt.py --config xiaogptconfig.json
Running xiaogpt now, 用帮我开头来提问
Traceback (most recent call last):
File "xiaogpt.py", line 458, in
asyncio.run(miboy.run_forever())
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "xiaogpt.py", line 289, in run_forever
await self.init_all_data(session)
File "xiaogpt.py", line 141, in init_all_data
await self._init_data_hardware()
File "xiaogpt.py", line 171, in _init_data_hardware
raise Exception(f"we have no hardware: {self.hardware} please check")
Exception: we have no hardware: S12A please check

已经使用micli.py获取了设备信息,也填入了xiaogptconfig.json。设备型号:xiaomi.wifispeaker.s12
{
"hardware": "S12A",
"account": "",
"password": "
",
"openai_key": "***",
"cookie": "",
"use_command": false,
"mute_xiaoai": false,
"verbose": false,
"use_gpt3": false,
"use_chatgpt_api": false
}

Error https://api.io.mi.com/app/home/device_list: Login failed

你好,我用 Yonsm/MiService 获取设备ID时出现了以下错误,请问这该怎么解决呢?

先把账号密码导出了一下(用如下命令,保证账号密码正确):

export MI_USER="A"
export MI_PASS="B"

然后运行获取账号信息的命令,就这样了(在不同Linux机器上都试了一下,还是一样的结果):

[03/02/2023 18:33:47]root@azs-debian-jpeast:~/workspace/MiService$ ./micli.py list
Exception on login 2505813677: 'userId'
Traceback (most recent call last):
  File "/root/workspace/MiService/miservice/miaccount.py", line 71, in login
    self.token['userId'] = resp['userId']
KeyError: 'userId'
Error https://api.io.mi.com/app/home/device_list: Login failed
[03/02/2023 18:33:52]root@azs-debian-jpeast:~/workspace/MiService$

小白提问

这些操作是在哪完成的?如何连接到小爱的terminal输入指令呢?
比如第一个指令PIP 安装的,是在哪完成的呢? 谢谢

关于 conversation_id 的疑问

  1. conversation_id 这是可以自己任意指定一个值吗?还是需要去哪里生成呢?
  2. 如果一直使用相同的 conversation_id,会不会导致会话记录越来越长,消耗的token也越来越多呢?这里建议如何维护呢?定期更换吗,比如用当天的日期作 conversation_id,每天变一个?

chatbot.ask 里的 conversation_id 有问题

        if self.conversation_id:
            data = list(self.chatbot.ask(query))[-1]
        else:
            data = list(self.chatbot.ask(query, conversation_id=self.conversation_id))[
                -1
            ]

这段代码好像有点问题,当conversation_id 非空时,未传入该值作为参数。是因为该chatbot不支持吗?

ask_gpt 耗时接近一分钟,是否有办法优化

问题一:
你好,我本地测试,让小爱同学执行命令:“讲一下愚公移山的故事,请用100字以内回答”
单独看了一下ask_gpt的耗时,看了下需要一分多钟,请问为什么这么久呢?有办法优化吗?

image

问题二:
代码里执行 playing_info = await self.mina_service.player_get_status(self.device_id) 时,报错了,是否符合预期呢?
Exception: Error https://api2.mina.mi.com/remote/ubus: {'code': 101, 'message': 'ubus server or device returned invalid result', 'data': {'device_data': '{"msg":"ROM端未响应","code":3012}', 'reqID': 'app_ios_xUz8X05JCDWlbAt9TG6hMQSy4RmEdP'}}

大佬,昨晚可以正常运行,今天运行提示“未授权的服务id”

小爱音箱是L05C,昨晚可以正常运行,终端有ChatGTP的回答,但小爱没有说出来。
今天运行提示以下错误:

{'code': 21315, 'result': 'error', 'desc': '未授权的服务id', 'description': '未授权的服务id'}
2023-02-26 20:42:03,175 - miservice - ERROR - login - Exception on login : 'qs'
Traceback (most recent call last):
  File "/Users/xxx/gitlab/xiaogpt/venv/lib/python3.10/site-packages/miservice/miaccount.py", line 63, in login
    'qs': resp['qs'],
KeyError: 'qs'
Traceback (most recent call last):
  File "/Users/xxx/gitlab/xiaogpt/xiaogpt.py", line 300, in <module>
    asyncio.run(miboy.run_forever())
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/Users/xxx/gitlab/xiaogpt/xiaogpt.py", line 186, in run_forever
    await self.init_all_data(session)
  File "/Users/xxx/gitlab/xiaogpt/xiaogpt.py", line 73, in init_all_data
    await self._init_data_hardware()
  File "/Users/xxx/gitlab/xiaogpt/xiaogpt.py", line 96, in _init_data_hardware
    hardware_data = await self.mina_service.device_list()
  File "/Users/xxx/gitlab/xiaogpt/venv/lib/python3.10/site-packages/miservice/minaservice.py", line 23, in device_list
    result = await self.mina_request('/admin/v2/device_list?master=' + str(master))
  File "/Users/xxx/gitlab/xiaogpt/venv/lib/python3.10/site-packages/miservice/minaservice.py", line 20, in mina_request
    return await self.account.mi_request('/usr/local/bin/micli.py', 'https://api2.mina.mi.com' + uri, data, headers)
  File "/Users/xxx/gitlab/xiaogpt/venv/lib/python3.10/site-packages/miservice/miaccount.py", line 135, in mi_request
    raise Exception(f"Error {url}: {resp}")
Exception: Error https://api2.mina.mi.com/admin/v2/device_list?master=0&requestId=app_ios_SQIFrmafJepRGlDL3: Login failed

micli listmicli mina都能正常输出,通过--account--password参数传入账号密码也是一样的错误。

使用问题交流

  1. 循环监听mi.com记录是否存在被ban?
  2. 是否存在重复响应,小米自己响应一次,chatgpt再响应一次?
  3. 实现开发者技能是否可行?缺点是需要先进入技能

ChatGPT 被禁

大家有没有遇到这个错误?之前好使的 ChatGPT 账号,现在开 VPN 后出现这个错误
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.