{"id":13645671,"url":"https://github.com/xingxin666/chatgpt-nodejs-web","last_synced_at":"2025-04-21T14:32:01.173Z","repository":{"id":184145431,"uuid":"671381630","full_name":"xingxin666/chatgpt-nodejs-web","owner":"xingxin666","description":" chatgpt nodejs服务，集成了ChatGLM、GPT3.5、GPT4、GPT联网、必应、Claude、百度文心一言等模型","archived":false,"fork":false,"pushed_at":"2023-10-10T11:01:36.000Z","size":128,"stargazers_count":57,"open_issues_count":4,"forks_count":12,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-09T18:43:22.173Z","etag":null,"topics":["bard","bing","chatglm","chatgpt","claude","gpt","gpt4","midjourney","openai","wenxinyiyan"],"latest_commit_sha":null,"homepage":"https://ai.jsunc.com/invite?code=SC0266D0E73C","language":"TypeScript","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/xingxin666.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":"2023-07-27T07:33:06.000Z","updated_at":"2024-10-08T18:48:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"a40794dc-8d25-4a59-975c-5d123b9fa665","html_url":"https://github.com/xingxin666/chatgpt-nodejs-web","commit_stats":null,"previous_names":["xingxin666/chatgpt-nodejs-web"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingxin666%2Fchatgpt-nodejs-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingxin666%2Fchatgpt-nodejs-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingxin666%2Fchatgpt-nodejs-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xingxin666%2Fchatgpt-nodejs-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xingxin666","download_url":"https://codeload.github.com/xingxin666/chatgpt-nodejs-web/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250070250,"owners_count":21369842,"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":["bard","bing","chatglm","chatgpt","claude","gpt","gpt4","midjourney","openai","wenxinyiyan"],"created_at":"2024-08-02T01:02:39.431Z","updated_at":"2025-04-21T14:32:00.811Z","avatar_url":"https://github.com/xingxin666.png","language":"TypeScript","funding_links":[],"categories":["Openai"],"sub_categories":[],"readme":"# chatgpt nodejs服务\n本项目集成了GPT3.5、GPT4、GPT联网、必应、Claude、百度文心一言等模型\n\nDemo项目地址 [若愚AI小助手](https://ai.jsunc.com/invite?code=SC0266D0E73C)\n\n![image](https://github.com/xingxin666/chatgpt-nodejs-web/assets/29698324/84dd695a-5867-4c32-835e-61a2a0ab061b)\n\n![image](https://github.com/xingxin666/chatgpt-nodejs-web/assets/29698324/6d78e12b-e709-4d66-ae14-8240791cf7c5)\n\n![image](https://github.com/xingxin666/chatgpt-nodejs-web/assets/29698324/68220fa3-727d-42da-b167-3a92455b3b96)\n\n![image](https://github.com/xingxin666/chatgpt-nodejs-web/assets/29698324/cf219e76-c11e-47cb-9647-9cc0e62d5454)\n\n\n## 前置要求\n\n### Node\n`node` 需要 `^18 版本\n\n```shell\nnode -v\n```\n\n### PNPM\n如果没有安装过 `pnpm`\n```shell\nnpm install pnpm -g\n```\n\n## 开发\n获取openai官方api key，修改.env的相关参数，如 OPENAI_API_KEY\n\n本地开发访问openai需要搭梯子,修改.env的相关参数，如 HTTPS_PROXY=http://127.0.0.1:7890\n\n进入本项目文件夹执行下面命令\n\n```shell\npnpm install\n```\n\n```shell\npnpm start\n```\n\n### 访问\npost 请求例子\n\n\n终端执行下面命令\n\ncurl -X POST -H \"Content-Type: application/json\" -d '{\"prompt\": \"你是谁\",\"modelCode\": \"GPT-3.5\"}' http://localhost:3008/api/chat-process\n\n#### modelCode可选值\nChatGLM2-6B\n\nGPT-3.5\n\nGPT-4\n\nGPT_BROWSER\n\nBING\n\nCLAUDE\n\nERNIE-Bot-turbo\n\n#### 必应参数例子\n{\n    \"prompt\": \"你好\",\"modelCode\": \"BING\", \"options\":{\"conversationId\":\"51D|BingProd|6120AEAD1A506F43373091BE999A7F0C5D096B8A0D2E19392B8391C507D0653A\",\"convStyle\":\"Creative\"}\n}\n\nconversationId：上下文对话id，第一次请求传空，后续传第一次请求返回的conversationId值\n\nconvStyle：对话风格，可传参数 Creative：创造力的，Precise：精确的，Balanced：平衡的，不传默认是Creative\n\n## 生产部署\n复制整个项目文件夹到有 `node` 服务环境的服务器上。\n\n执行本文件夹的 sh start.sh\n\n![image](https://github.com/xingxin666/chatgpt-nodejs-web/assets/29698324/08ca67f6-20ac-43a6-a87f-8bf1b331f323)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxingxin666%2Fchatgpt-nodejs-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxingxin666%2Fchatgpt-nodejs-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxingxin666%2Fchatgpt-nodejs-web/lists"}