{"id":13714359,"url":"https://github.com/hktalent/ChatGPT-API","last_synced_at":"2025-05-07T01:33:33.054Z","repository":{"id":81889159,"uuid":"579614070","full_name":"hktalent/ChatGPT-API","owner":"hktalent","description":"OpenAI ChatGPT, GPT-3, ChatGPT-API for go,ChatGPT in bash shell command line","archived":false,"fork":false,"pushed_at":"2023-01-01T10:25:01.000Z","size":10,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-03T23:30:32.878Z","etag":null,"topics":["bash","chatgpt","go","golang"],"latest_commit_sha":null,"homepage":"https://ChatGPT.51pwn.com","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/hktalent.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-18T09:37:11.000Z","updated_at":"2024-02-19T03:06:00.000Z","dependencies_parsed_at":"2023-03-11T04:16:23.503Z","dependency_job_id":null,"html_url":"https://github.com/hktalent/ChatGPT-API","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hktalent%2FChatGPT-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hktalent%2FChatGPT-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hktalent%2FChatGPT-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hktalent%2FChatGPT-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hktalent","download_url":"https://codeload.github.com/hktalent/ChatGPT-API/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224551236,"owners_count":17330109,"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":["bash","chatgpt","go","golang"],"created_at":"2024-08-02T23:01:57.880Z","updated_at":"2024-11-14T01:31:03.701Z","avatar_url":"https://github.com/hktalent.png","language":"Go","readme":"# ChatGPT-API\n\n# How use\n\n```\ncurl -XPOST -v -H \"user-agent: Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0\" 'https://51pwn.com/chatGPT?q=介绍支持matrix协议、开源客户端聊天软件'\n```\n\n#### download from release\nhttps://github.com/hktalent/ChatGPT-API/releases\n\n```\nwget -c https://github.com/hktalent/ChatGPT-API/releases/download/0.0.3/ChatGPT_0.0.3_macOS_amd64.zip\nunzip -x ChatGPT_0.0.3_macOS_amd64.zip\n./ChatGPT -i -k [your key]\n\n```\n\u003cimg width=\"700\" alt=\"Screenshot 2022-12-18 at 18 10 56\" src=\"https://user-images.githubusercontent.com/18223385/208293150-c7a18250-6ce5-41aa-99de-cd105e95eaf1.png\"\u003e\n\n\u003cimg src=https://user-images.githubusercontent.com/18223385/208293119-45384470-56ec-4e53-ab0a-67bf524a81bf.gif width=500\u003e\n\n# Example\n```go\npackage main\n\nimport (\n\t\"bufio\"\n\t\"flag\"\n\t\"fmt\"\n\tgtp \"github.com/hktalent/ChatGPT-API\"\n\t\"os\"\n\t\"strings\"\n)\n\nfunc doOne(q, k string) {\n\tif got, err := gtp.Completions(q, k); nil == err {\n\t\tfmt.Println(got)\n\t} else if nil != err {\n\t\tfmt.Println(\"gtp.Completions is err:\", err)\n\t}\n}\n\nfunc main() {\n\tkey := flag.String(\"k\", \"\", \"your ChatGPT-API token key\")\n\tinteract := flag.Bool(\"i\", false, \"interact\")\n\tq := flag.String(\"q\", \"\", \"your question\")\n\tflag.Parse()\n\tif *key != \"\" {\n\t\tif *interact {\n\t\t\tbuf := bufio.NewScanner(os.Stdin)\n\t\t\tfor buf.Scan() {\n\t\t\t\ts := buf.Text()\n\t\t\t\tx1 := strings.TrimSpace(strings.ToLower(s))\n\t\t\t\tif x1 == \"exit\" || x1 == \"quit\" || x1 == \"q\" || x1 == \"x\" {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tif \"\" != s {\n\t\t\t\t\tdoOne(s, *key)\n\t\t\t\t}\n\t\t\t\tif nil != buf.Err() {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t} else if \"\" != *q {\n\t\t\tdoOne(*q, *key)\n\t\t}\n\t}\n}\n\n\n```\n","funding_links":[],"categories":["Repositories"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhktalent%2FChatGPT-API","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhktalent%2FChatGPT-API","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhktalent%2FChatGPT-API/lists"}