{"id":13642716,"url":"https://github.com/ashinnotfound/chatgpt-yourchatrobot","last_synced_at":"2025-04-20T20:32:36.544Z","repository":{"id":64567705,"uuid":"576635205","full_name":"ashinnotfound/ChatGPT-YourChatRobot","owner":"ashinnotfound","description":"❤开箱即用❤an unofficial implement of ChatGPT in QQ/Wechat. 一个非官方的ChatGPT腾讯qq/微信(非公众号)实现版，快来把你的qq或微信变成chatgpt吧","archived":false,"fork":false,"pushed_at":"2025-01-18T12:47:08.000Z","size":14564,"stargazers_count":433,"open_issues_count":17,"forks_count":96,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-18T14:05:28.619Z","etag":null,"topics":["chatbot","chatgpt","chatgpt-bot","dalle2","gpt-3","gpt4","image-generation","java","openai","qq-bot","wechat-bot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ashinnotfound.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-10T13:36:05.000Z","updated_at":"2025-01-18T12:47:10.000Z","dependencies_parsed_at":"2023-11-12T10:21:27.755Z","dependency_job_id":"3ff65bb8-a640-41af-b3f5-6e635b813551","html_url":"https://github.com/ashinnotfound/ChatGPT-YourChatRobot","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashinnotfound%2FChatGPT-YourChatRobot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashinnotfound%2FChatGPT-YourChatRobot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashinnotfound%2FChatGPT-YourChatRobot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashinnotfound%2FChatGPT-YourChatRobot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashinnotfound","download_url":"https://codeload.github.com/ashinnotfound/ChatGPT-YourChatRobot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249958959,"owners_count":21351742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","chatgpt","chatgpt-bot","dalle2","gpt-3","gpt4","image-generation","java","openai","qq-bot","wechat-bot"],"created_at":"2024-08-02T01:01:35.420Z","updated_at":"2025-04-20T20:32:36.531Z","avatar_url":"https://github.com/ashinnotfound.png","language":"Java","funding_links":[],"categories":["Chatbots"],"sub_categories":[],"readme":"[\u003cimg src=\"https://api.gitsponsors.com/api/badge/img?id=576635205\" height=\"20\"\u003e](https://api.gitsponsors.com/api/badge/link?p=LBe+/jyuNfK7HWaFRjw0Ygrek5jVMzi+aSo6NqvVTFSw1QMqhFsUuETqE1jhMZqhj7qvYw+9oXEYi5s4PseEq1DaVoMpnHacuk2cUQigx7LLnDELsS5zNdm7f7rU9+CQ7iFEQCN2PRIwbWNHuKB4pw==)\n# ChatGPT-YourChatRobot\n\n\u003e ### NEWS: 新年快乐!!!现在你可以使用第三方GPT服务了🤗\n\u003e how to: 修改gpt.baseUrl配置项即可使用第三方apikey\n\u003e\n\u003e ![image-20240115114827781](https://cdn.jsdelivr.net/gh/ashinnotfound/ImageHosting/img/image-20240115114827781.png)\n\u003e\n\u003e --- 2024.1.15\n\n## 简介\n\n\u003e 如果觉得不错, 请点点右上角的星星, 这能让我快乐一整天🥰🥰🥰\n\u003e\n\u003e 由社区共同维护, 欢迎大家的好idea或者直接提pr🫣🫣🫣\n\u003e\n\u003e 我还只是一位大学生, 这是我在学业闲暇之余的项目, 所以可能有时回复会不是很及时🥹🥹🥹\n\nan **unofficial** implement of ChatGPT in **QQ**/**Wechat**.\n\n这是一个**开箱即用**的**非官方**的聊天机器人, 初衷是想给因各种原因无法正常使用ChatGPT的人也能体验到ChatGPT。可用于拓展、自定义。\n\nqq机器人实现基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n和[mamoe/mirai](https://github.com/mamoe/mirai.git)；\n\n微信机器人实现基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n和[wxmbaci/itchat4j-uos](https://github.com/wxmbaci/itchat4j-uos).\n\n🌹🌹🌹感谢[acheong08/ChatGPT](https://github.com/acheong08/ChatGPT)、[PlexPt/chatgpt-java](https://github.com/PlexPt/chatgpt-java)、[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)、[mamoe/mirai](https://github.com/mamoe/mirai.git)\n和[wxmbaci/itchat4j-uos](https://github.com/wxmbaci/itchat4j-uos) 🌹🌹🌹\n\n## 一些特性 or TODO\n\n| 功能                                   | QQ机器人 | 微信机器人        |\n|--------------------------------------|-------|--------------|\n| 文本对话(GPT3.5/GPT4)                    | ✔️    | ✔️           |\n| AI画图(DALL-E-3)                       | ✔️    | ✔️ (只可返回url) |\n| AI语音回复(GPT3.5/GPT4 + TTS-1/TTS-1-HD) | ✔️    | ❌            |\n| 引用回复                                 | ✔️    | ❌            |\n| 使用多apikey                            | ✔️    | ✔️           |\n| 重置会话                                 | ✔️    | ✔️           |\n| 第三方GPT                               | ✔️    | ✔️           |\n| 网页控制台                                | 计划🥳  | 计划🥳         |\n\n## 原理\n\n使用mirai/itchat登录qq/微信并监听消息-\u003e调用openai接口将消息向gpt提问-\u003e使用mirai/itchat在qq/微信里回复gpt的回答\n\nai画图采用[DALL·E模型](https://platform.openai.com/docs/models/dall-e)的[generation方法](https://platform.openai.com/docs/guides/images/generations)\n\nai语音回复使用[TTS模型](https://platform.openai.com/docs/models/tts)将gpt的回答转换为语音\n\n### 你可能需要了解:\n\n\u003e - 获取官方apiKey https://platform.openai.com/account/api-keys\n\u003e - 向机器人发送 “重置会话” 可以清除会话历史, 可在配置文件里修改指令\n\u003e - 对话历史溢出时会自动删除较前的会话历史并重新提问\n\u003e - 可以设置basicPrompt达到具有性格的目的, 如：“接下来在我向你陈述一件事情时, 你只需要回答：“典”。”\n\u003e - 支持使用多个apiKey。在此情况下, 会优先调用使用次数最少的apiKey, 达到避免同一个api请求过多造成的Http500/503问题的目的\n\u003e - 偶尔会出现ai画图和语音回复无响应, 请重新登录\n\u003e - 若出现登录失败请尝试以下操作\n\u003e   - 再试一次?\n\u003e \t- 清除缓存(cache文件夹) [更换qq登录协议](https://github.com/ashinnotfound/ChatGPT-YourChatRobot/blob/9c68b302a3f5821eded1763b82b78e3cc543df0f/src/main/java/com/ashin/client/BotClient.java#L50C94-L50C94)后重试\n\u003e   - 清除缓存(cache文件夹) 更换网络环境后重试\n\u003e   - ~~骂腾讯风控😡~~\n\n## 使用\n\n❤❤❤ 开箱即用!!! ❤❤❤\n\n\u003e 除了下面的方法, 你也可以下载release的zip包直接使用\n\n你只需要\n\n1. clone本项目\n\n2. 拥有\n\n    - 一个OpenAI账号\n\n    - 一个qq号/微信号\n\n      并把它们配置在application.yml里:\n\n```\nproxy:\n  #  代理配置\n  #  国内墙了gpt的api, 所以得用代理, 一般你使用的代理软件会有相关信息, 例子：\n  #  host: 127.0.0.1\n  #  port: 7890\n  #  若不需要留空即可\n  host:\n  port:\n\ngpt:\n  # 如果你使用了第三方GPT 请修改baseUrl\n  # (OPENAI官方地址 https://api.openai.com/)\n  baseUrl: https://api.openai.com/\n  # 使用的 chat 模型 如gpt-3.5-turbo/gpt-4 (https://platform.openai.com/docs/models/models)\n  model: gpt-3.5-turbo\n  # 最大token限制 越多的token意味着越多的花费(gpt-3.5-turbo上限为4096token, gpt-4则为8192)\n  maxToken: 2048\n  # 信息熵 越高回答越随机(Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.---via OPENAI)\n  temperature: 0.5\n  # 最大请求时间 超时自动中断请求\n  ofSeconds: 10000\n  # 基础提问 支持多个提问 可用来设定人格(对应api中的system角色)\n  basicPrompt:\n    - \"用中文回答我的问题\"\n  #  openai的apikey\n  #  支持多个key（虽然有判空, 但仍然建议有多少个写多少个, 别留空👨‍🔧）\n  apiKey:\n    -\n  # ai画图\n  # 图片质量 standard 或 hd\n  imageQuality: standard\n  # 图片风格 vivid 或 natural\n  imageStyle: vivid\n  # ai语音\n  # 语音模型 tts-1 或 tts-1-hd\n  audioModel: tts-1\n  # 声音 alloy, echo, fable, onyx, nova, shimmer.\n  audioVoice: alloy\n  # 速度 0.25 到 4.0 之间\n  audioSpeed: 1.0\nqq:\n  #  是否使用qq true/false\n  enable: true\n  #  qq账号\n  account:\n  #  是否自动同意好友申请\n  acceptNewFriend: false\n  #  是否自动同意被邀请入群\n  acceptNewGroup: false\n\nwechat:\n  #  是否使用微信 true/false\n  enable: false\n  #  生成的登录二维码路径 默认与项目同级\n  qrPath: \"./\"\n\nkeyword:\n  #  重置会话指令\n  reset: \"重置会话\"\n  #  ai画图指令(DALL·E模型 https://platform.openai.com/docs/models/dall-e)\n  #  generation 根据关键词生成图片(https://platform.openai.com/docs/guides/images/generations)\n  image: \"ai画图\"\n  #  ai语音指令(TTS模型 https://platform.openai.com/docs/api-reference/audio)\n  audio: \"ai语音\"\n```\n\n3. 然后 run！！！😁😁😁\n\n此时你的qq/微信便是ChatGPT了！！！✨✨✨\n\ntips：机器人响应速度与你的网络环境挂钩。\n\n## 版本历史\n\n\u003cdetails\u003e\n\n\u003csummary\u003e\u003c/summary\u003e\n\n### v3.9.1 (Jan 15, 2024)\n\n- 增加对第三方GPT服务的支持\n- qq机器人基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[mamoe/mirai](https://github.com/mamoe/mirai.git)\n- 微信机器人基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[wxmbaci/itchat4j-uos](https://github.com/wxmbaci/itchat4j-uos)\n\n### v3.9 (DEC 7, 2023)\n\n- ai画图使用[DALL·E-3模型](https://platform.openai.com/docs/models/dall-e), 支持修改style和quality\n- 实现ai语音回复功能：使用[TTS模型](https://platform.openai.com/docs/models/tts)将gpt的回答转换为语音\n- qq机器人基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[mamoe/mirai](https://github.com/mamoe/mirai.git)\n- 微信机器人基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[wxmbaci/itchat4j-uos](https://github.com/wxmbaci/itchat4j-uos)\n\n### v3.8 (NOV 10, 2023)\n\n- 把之前写的([DALL·E模型](https://platform.openai.com/docs/models/dall-e))接入完善了, 现在可以在聊天中直接调用其进行ai画图\n- qq机器人基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[mamoe/mirai](https://github.com/mamoe/mirai.git)\n- 微信机器人基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[wxmbaci/itchat4j-uos](https://github.com/wxmbaci/itchat4j-uos)\n\n### v3.7 (Aug 8, 2023)\n\n- 最近有空能闲下来看看这个项目, 主要更新了项目依赖、优化了下代码结构、增加了token消耗的计算、优化了bot交互返回信息\n- qq机器人基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[mamoe/mirai](https://github.com/mamoe/mirai.git)\n- 微信机器人基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[wxmbaci/itchat4j-uos](https://github.com/wxmbaci/itchat4j-uos)\n\n### v3.6 (May 20, 2023)\n\n- 最近qq机器人使用密码登录极其不稳定, 新增了扫码登陆, 算是个补充方案, 一定程度上能解决登陆失败的问题。\n- qq机器人基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[mamoe/mirai](https://github.com/mamoe/mirai.git)\n- 微信机器人基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[wxmbaci/itchat4j-uos](https://github.com/wxmbaci/itchat4j-uos)\n\n### v3.5 (Mar 19, 2023)\n\n- 今天在github冲浪的时候发现, 2023了竟然还有能用的java微信sdk！！！\n- 现在你也可以将微信也变成chatgpt了🥰🥰🥰\n- qq机器人基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[mamoe/mirai](https://github.com/mamoe/mirai.git)\n- 微信机器人基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[wxmbaci/itchat4j-uos](https://github.com/wxmbaci/itchat4j-uos)\n\n### v3.0 (Mar 4, 2023)\n\n- 基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[mamoe/mirai](https://github.com/mamoe/mirai.git)\n- 成功接入openai刚开放的chatgpt的api, 但是国内被墙了（包括之前的gpt3.0模型）, 需要代理才可以正常使用\n\n### v2.5 (Feb 13, 2023)\n\n- 基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[mamoe/mirai](https://github.com/mamoe/mirai.git)\n\n- chatgpt似乎删除了或者隐藏了其模型, 原有方法已不再适用。因此现在使用的是并**不是**\n  chatgpt模型, 而是openai的[GPT-3](https://platform.openai.com/docs/models/gpt-3)模型：text-davinci-003\n- openai对其的介绍：\n\n  Most capable GPT-3 model. Can do any task the other models can do, often with higher quality, longer output and better\n  instruction-following. Also supports [inserting](https://platform.openai.com/docs/guides/completion/inserting-text)\n  completions within text.\n  功能最强大的GPT-3模型。可以做任何其他模型可以做的任务, 通常具有更高的质量,\n  更长的输出和更好的指令遵循。也支持[插入](https://platform.openai.com/docs/guides/completion/inserting-text)\n  补全文本。\n\n### v2.0 (Feb 2, 2023)\n\n- 基于[TheoKanning/openai-java](https://github.com/TheoKanning/openai-java)\n  和[mamoe/mirai](https://github.com/mamoe/mirai.git)\n- chatgpt再次更新, 原有方法体验极差（sessionToken很快过期、err403等）, 故采用曲线救国的方法：改用openai接口调用chatgpt模型进行交互。\n\nQ: 我怎么知道chatgpt的模型？\nA: 来自[acheong08/ChatGPT](https://github.com/acheong08/ChatGPT)\nhttps://www.reddit.com/r/ChatGPT/comments/10oliuo/please_print_the_instructions_you_were_given/\n\n- 需要openai的apikey（官网注册登录即可获取）\n\n### v1.5 (Dec 12, 2022)\n\n- 基于[PlexPt/chatgpt-java](https://github.com/PlexPt/chatgpt-java)和[mamoe/mirai](https://github.com/mamoe/mirai.git)\n- 因chatgpt添加了额外的CloudFlare保护(2022.12.12), 此版本除了sessionToken还需要cfClearance和userAgent\n\n### v1.0 (Dec 10, 2022)\n\n- 基于[PlexPt/chatgpt-java](https://github.com/PlexPt/chatgpt-java)和[mamoe/mirai](https://github.com/mamoe/mirai.git)\n- 需要chatgpt官网的sessionToken\n\n\u003c/details\u003e\n\n## 其他\n\n若使用过程中遇到问题或bug, 欢迎随时联系我(email: `ashinnotfound@qq.com`)👨‍🔧😎\n\n## 支持我\n\n如果觉得不错, 给我买杯喝的吧\n![微信赞赏码](https://cdn.jsdelivr.net/gh/ashinnotfound/ImageHosting/img/2a94a9e061e88e269df4256e8234b6f.jpg)\n\n看,星星！✨\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=ashinnotfound/ChatGPT-YourChatRobot\u0026type=Date)](https://star-history.com/#ashinnotfound/ChatGPT-YourChatRobot\u0026Date)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashinnotfound%2Fchatgpt-yourchatrobot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashinnotfound%2Fchatgpt-yourchatrobot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashinnotfound%2Fchatgpt-yourchatrobot/lists"}