{"id":13676743,"url":"https://github.com/Kengxxiao/Himari.ChatGPT","last_synced_at":"2025-04-29T07:33:17.427Z","repository":{"id":92279019,"uuid":"575045982","full_name":"Kengxxiao/Himari.ChatGPT","owner":"Kengxxiao","description":"使用ChatGPT的QQ机器人的简单实现","archived":false,"fork":false,"pushed_at":"2022-12-09T12:14:18.000Z","size":22,"stargazers_count":13,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-11T18:43:21.650Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kengxxiao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-12-06T16:26:01.000Z","updated_at":"2024-05-10T10:48:08.000Z","dependencies_parsed_at":"2023-06-08T06:30:44.276Z","dependency_job_id":null,"html_url":"https://github.com/Kengxxiao/Himari.ChatGPT","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kengxxiao%2FHimari.ChatGPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kengxxiao%2FHimari.ChatGPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kengxxiao%2FHimari.ChatGPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kengxxiao%2FHimari.ChatGPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kengxxiao","download_url":"https://codeload.github.com/Kengxxiao/Himari.ChatGPT/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251456058,"owners_count":21592285,"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":[],"created_at":"2024-08-02T13:00:32.121Z","updated_at":"2025-04-29T07:33:12.408Z","avatar_url":"https://github.com/Kengxxiao.png","language":"C#","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Himari.ChatGPT\n调用OpenAI ChatGPT WebAPI进行聊天的OneBot应用，是Himari Bot的一部分。\n\n## 环境要求\n[.NET 6](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)及以上  \n\n## 启动方式\n在Windows下，您可以直接或使用cmd或Powershell启动编译后的exe。  \n在Linux下，您可以使用```dotnet Himari.ChatGPT.dll```指令启动。\n\n## 配置文件\n您需要在启动目录下建立名为```himari.chatgpt.json```的配置文件。\n```json\n{\n\t\"OAIUsername\": \"\",\n\t\"OAIPassword\": \"\",\n\t\"OAIAccessToken\": \"\",\n\t\"AccessToken\": \"\",\n\t\"BindIp\": \"127.0.0.1\",\n\t\"BindPort\": 8085\n}\n```\n\n```OAIUsername```为您OpenAI账号的用户名。  \n```OAIPassword```为您OpenAI账号的密码。  \n```OAIAccessToken```为您选择使用AccessToken登录时需要填写的参数，如果您填写了用户名和密码，则该参数不生效。\n```AccessToken```默认为空，使用OneBot标准的鉴权，如go-cqhttp中的AccessToken。  \n```BindIp```和```BindPort```为WebSocket服务绑定的IP和端口。  \n\n## AccessToken登录\n如果您是使用Google等平台登入到Open AI的，您需要使用此种登录方式。  \n您需要在浏览器中登录到ChatGPT主页（即可以输入文本的页面）。  \n按下```F12```打开浏览器控制台，点击上方的```控制台```选项，随后输入  \n```javascript\nfetch(\"https://chat.openai.com/api/auth/session\").then(resp =\u003e resp.json()).then(json =\u003e console.log(json.accessToken))\n````\n等待一段时间后，将返回的结果填写入```OAIAccessToken```中。\n\n## 指令\n```/chat \u003c对话内容\u003e```  \n例如：使用```/chat 你好```   \n返回内容为：```你好，我是 Assistant，一个由 OpenAI 训练的语言模型。我能回答一些问题，帮助你了解更多信息。有什么可以为您效劳的吗？```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKengxxiao%2FHimari.ChatGPT","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKengxxiao%2FHimari.ChatGPT","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKengxxiao%2FHimari.ChatGPT/lists"}