{"id":19175980,"url":"https://github.com/connectai-e/chatgpt-severless-proxy","last_synced_at":"2025-10-07T11:32:25.491Z","repository":{"id":165873850,"uuid":"621250707","full_name":"ConnectAI-E/ChatGPT-Severless-Proxy","owner":"ConnectAI-E","description":"利用阿里云函数给openai搭建反向代理，🤹🏻‍♂️支持负载均衡和自定义token","archived":false,"fork":false,"pushed_at":"2023-03-30T14:14:29.000Z","size":26,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-17T03:12:28.069Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/ConnectAI-E.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}},"created_at":"2023-03-30T09:37:45.000Z","updated_at":"2023-11-27T19:08:25.000Z","dependencies_parsed_at":"2023-08-29T22:43:28.063Z","dependency_job_id":"f339ca4d-5ec5-45b8-a2ea-48cf1a32926f","html_url":"https://github.com/ConnectAI-E/ChatGPT-Severless-Proxy","commit_stats":null,"previous_names":["connectai-e/chatgpt-severless-proxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2FChatGPT-Severless-Proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2FChatGPT-Severless-Proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2FChatGPT-Severless-Proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ConnectAI-E%2FChatGPT-Severless-Proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ConnectAI-E","download_url":"https://codeload.github.com/ConnectAI-E/ChatGPT-Severless-Proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240254290,"owners_count":19772392,"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-11-09T10:26:46.482Z","updated_at":"2025-10-07T11:32:20.453Z","avatar_url":"https://github.com/ConnectAI-E.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChatGPT-Severless-Proxy\n![GitHub](https://img.shields.io/github/license/leizhenpeng/ChatGPT-Severless-Proxy)\n![GitHub](https://img.shields.io/badge/build-pass-green)  \nA reverse proxy of https://api.openai.com that supports token load-balance and avoids token leakage\n\nopenai api reference\n`https://platform.openai.com/docs/api-reference`\n## Feature\n- simple, clean but efficent code\n- providing an authorization without openai token leakage\n- supproting token load-balance\n- avoiding the limitation of single openai token\n- removing invalid token automatically\n\n## 本地开发\n```nashorn js\ncd code\nmv config.example.yaml config.yaml\n```\n```\nOPENAI_KEY: sk-xxx,sk-xx\nAUTH_TOKEN: xxxxxxx\nPORT: 9000\nTARGET: https://api.openai.com\n```\n\n```\ngo run main.go\n```\n\n## 部署上线\n\n```\ncd ..\ns deploy\n```\n\n\nUse by cURL\n```\ncurl --location 'http://localhost:8080/v1/chat/completions' \\\n--header 'Authorization: Bearer YOUR_AUTHORIZATION' \\\n--header 'Content-Type: application/json' \\\n--data '{\n    \"max_tokens\": 250,\n    \"model\": \"gpt-3.5-turbo\",\n    \"messages\": [\n        {\n            \"role\": \"user\",\n            \"content\": \"Hello!\"\n        }\n    ]\n}'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnectai-e%2Fchatgpt-severless-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconnectai-e%2Fchatgpt-severless-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconnectai-e%2Fchatgpt-severless-proxy/lists"}