{"id":21376589,"url":"https://github.com/phyuany/chatgpt-ai","last_synced_at":"2025-07-13T10:31:08.905Z","repository":{"id":145238509,"uuid":"604426861","full_name":"phyuany/ChatGPT-AI","owner":"phyuany","description":"使用Gin封装的ChartGPT AI 简易问答应用","archived":false,"fork":false,"pushed_at":"2023-03-31T14:34:15.000Z","size":493,"stargazers_count":23,"open_issues_count":0,"forks_count":19,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T09:01:34.700Z","etag":null,"topics":["chatgpt-api","chatgpt3"],"latest_commit_sha":null,"homepage":"","language":"Go","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/phyuany.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}},"created_at":"2023-02-21T03:09:28.000Z","updated_at":"2024-11-10T16:27:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"af0eaeab-81df-43ff-b1b2-a838f65edb8c","html_url":"https://github.com/phyuany/ChatGPT-AI","commit_stats":null,"previous_names":["zigfan/chatgpt-ai","ucodingfan/chatgpt-ai","phyxyz/chatgpt-ai","phyuany/chatgpt-ai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phyuany/ChatGPT-AI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phyuany%2FChatGPT-AI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phyuany%2FChatGPT-AI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phyuany%2FChatGPT-AI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phyuany%2FChatGPT-AI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phyuany","download_url":"https://codeload.github.com/phyuany/ChatGPT-AI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phyuany%2FChatGPT-AI/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265128209,"owners_count":23715621,"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":["chatgpt-api","chatgpt3"],"created_at":"2024-11-22T09:16:35.344Z","updated_at":"2025-07-13T10:31:08.614Z","avatar_url":"https://github.com/phyuany.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChatGPT AI 在线智能工具\n\n## 一、概述\n\n### 1.1 项目简介\n\n使用`golang`封装了`ChatGPT`的`AI`接口，后续有时间会继续完善。\n\n项目示例地址：**由于开放后，大量访问会导致作者的OpenAI账号消耗殆尽，所以不再提供示例地址**\n\n运行效果如下：\n\n![效果图](./demo.png)\n\n### 1.2 如何运行\n\n首先确保你的电脑上已经安装了`golang`环境，然后执行以下命令：\n\n```bash\n# 下载项目\ngit clone https://github.com/jikerdev/ChatGPT-AI.git ai\n# 安装依赖\ncd ai\ngo get\n# 添加环境变量\nexport GPT3_API_KEY=\"此处填写真实的OPENAI API KEY\"\n# 运行\ngo run main.go routes.go\n```\n\n## 二、接口列表\n\n### 2.1 `/completions`\n\n\u003e 传入一个问题，ChatGPT返回回答内容\n\n- 请求方式：`GET`\n\n- 本地接口示例: \u003chttp://localhost/completions?token=此处填写问题\u003e\n\n#### 2.1.1 请求参数\n\n| 参数名 |   备注   |     示例值     |\n| ------ | -------- | -------------- |\n| token  | 关键问题 | 帮我写一首情诗 |\n\n#### 2.1.2 示例\n\n本地请求示例\n\n```text\nGET http://localhost/completions?token=帮我写一首情诗\n```\n\n响应数据头为：`content-type: text/event-stream; charset=utf-8`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphyuany%2Fchatgpt-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphyuany%2Fchatgpt-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphyuany%2Fchatgpt-ai/lists"}