{"repo":"yihong0618/xiaogpt","free":true,"listed":false,"github":"https://github.com/yihong0618/xiaogpt","clone":"git clone https://github.com/yihong0618/xiaogpt.git","description":"Play ChatGPT and other LLM with Xiaomi AI Speaker","language":"Python","stars":6894,"topics":["python","chatgpt","xiaomi","llms"],"license":"MIT","category":"ai-agents","readme_excerpt":"xiaogpt Play ChatGPT and other LLM with Xiaomi AI Speaker 支持的 AI 类型 - ChatGPT - New Bing - ChatGLM - Gemini - Doubao - Moonshot - 01 - Llama3 - 通义千问 获取小米音响 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 回答 - 如果上面不可用，可以尝试用手机抓包， 找到 cookie 利用 --cookie '${cookie}' cookie 别忘了用单引号包裹 - 默认用目前 ubus, 如果你的设备不支持 ubus 可以使用 --use command 来使用 command 来 tts - 使用 --mute xiaoai 选项，可以快速停掉小爱的回答 - 使用 --account ${account} --password ${password} - 如果有能力可以自行替换唤醒词，也可以去掉唤醒词 - 使用 --use chatgpt api 的 api 那样可以更流畅的对话，速度特别快，达到了","default_branch":null,"files":null,"tree":[],"storefront":"/r/yihong0618","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/yihong0618/xiaogpt/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}