{"id":29718937,"url":"https://github.com/code-wgl/openaiapi","last_synced_at":"2025-07-24T10:36:41.101Z","repository":{"id":179702261,"uuid":"608746084","full_name":"code-wgl/openAiApi","owner":"code-wgl","description":"openAI 调用chatGPT调用","archived":false,"fork":false,"pushed_at":"2023-03-16T05:34:55.000Z","size":176,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T00:48:05.733Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dasiai.cn/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code-wgl.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,"zenodo":null}},"created_at":"2023-03-02T16:47:35.000Z","updated_at":"2023-03-16T05:35:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ed817e1-e38c-42a2-98c7-ecd5ed439a07","html_url":"https://github.com/code-wgl/openAiApi","commit_stats":null,"previous_names":["developer-wgl/openaiapi","code-wgl/openaiapi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/code-wgl/openAiApi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-wgl%2FopenAiApi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-wgl%2FopenAiApi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-wgl%2FopenAiApi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-wgl%2FopenAiApi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-wgl","download_url":"https://codeload.github.com/code-wgl/openAiApi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-wgl%2FopenAiApi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266828724,"owners_count":23991220,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-07-24T10:36:35.810Z","updated_at":"2025-07-24T10:36:41.077Z","avatar_url":"https://github.com/code-wgl.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [DaSiAi.cn](https://www.dasiai.cn/)\n\n其中周报部分来自，感谢开源：[![Weekly Report](./public/screenshot.jpg)](https://weeklyreport.avemaria.fun/zh)\n\n## 这个项目是如何工作的\n这个项目主要使用了 [OpenAI GPT-3.5 API](https://platform.openai.com/docs/introduction) 和 [Vercel Edge functions](https://vercel.com/features/edge-functions)。它根据用户输入构建一个 Prompt，通过 Vercel Edge 函数将其发送到 GPT-3.5 API，然后将响应流传回应用程序。\n\n## 在本地运行\n\n**由于众所周知的原因，OpenAI API 的域名 api.openai.com 已无法在大陆网络环境下访问，本地调试需要自己想办法。如果你有好的想法欢迎提PR**\n\nclone 此 repo，去 [OpenAI](https://beta.openai.com/account/api-keys) 注册一个账号，拿到 API key，放到 `.env` 文件。本地文件 `.env.example` 要改成 `.env`。\n\n\n确保你本地的 npm 命令生效，执行以下命令\n```bash\nnpm install\nnpm run dev\n```\n打开 `http://localhost:3000`\n\n\n## 线上一键部署\n\n用 [Vercel](https://vercel.com?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=vercel-examples) 一键部署:\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/developer-wgl/openAiApi\u0026env=OPENAI_API_KEY,NEXT_PUBLIC_USE_USER_KEY\u0026project-name=dasiai\u0026repo-name=dasiai)\n\n环境变量如下所示：\n```\nOPENAI_API_KEY=xxxxx\nNEXT_PUBLIC_USE_USER_KEY = false  \n```\n\n## Docker 部署\n\n```bash\ndocker run -d -p 3000:3000 --name dasiai-docker -e OPENAI_API_KEY=sk-xxxxx ihxrainbow/dasiai-docker\n```\n\ndocker-compose.yml\n```yaml\nservices:\n  dasiai-docker:\n    container_name: dasiai-docker\n    ports:\n      - '3000:3000'\n    image: ihxrainbow/dasiai-docker\n    environment:\n      # API key\n      - OPENAI_API_KEY=sk-xxxxx\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-wgl%2Fopenaiapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-wgl%2Fopenaiapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-wgl%2Fopenaiapi/lists"}