{"id":18668342,"url":"https://github.com/ninechapter-algorithm/chatbot","last_synced_at":"2026-01-26T23:20:37.001Z","repository":{"id":195731976,"uuid":"693477571","full_name":"ninechapter-algorithm/ChatBot","owner":"ninechapter-algorithm","description":"A ChatBot Project based on Node.js \u0026 Vue.","archived":false,"fork":false,"pushed_at":"2023-09-19T09:08:18.000Z","size":234,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-18T07:39:13.983Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vue","has_issues":false,"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/ninechapter-algorithm.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-09-19T05:32:07.000Z","updated_at":"2025-05-06T15:33:59.000Z","dependencies_parsed_at":"2023-09-19T11:40:06.294Z","dependency_job_id":null,"html_url":"https://github.com/ninechapter-algorithm/ChatBot","commit_stats":null,"previous_names":["ninechapter-algorithm/chatbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ninechapter-algorithm/ChatBot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninechapter-algorithm%2FChatBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninechapter-algorithm%2FChatBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninechapter-algorithm%2FChatBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninechapter-algorithm%2FChatBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ninechapter-algorithm","download_url":"https://codeload.github.com/ninechapter-algorithm/ChatBot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ninechapter-algorithm%2FChatBot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28791166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-11-07T08:42:18.679Z","updated_at":"2026-01-26T23:20:36.985Z","avatar_url":"https://github.com/ninechapter-algorithm.png","language":"Vue","readme":"# ChatBot\n\n\u003e 声明：此项目只发布于 GitHub，免费且作为开源学习使用。如有需要此项目的相关教程，目前仅提供 **前端部分** 的完整搭建过程，可前往 [LintCode - ChatBot：工程化 Vue 前端项目搭建](https://www.lintcode.com/course/110) 获取。\n\n## 前置要求\n\n### 1. Node.js\n\n项目需要 _Node.js_ 的版本为 **`^16 || ^18 || ^19`**，即 `16.x`、`18.x` 或 `19.x` 均可。\n\n### 2. yarn\n\n如果你没有安装过 _yarn_，可以使用 _Corepack_ 来开启：\n\n```bash\ncorepack enable\n```\n\n然后再通过以下命令来更新全局的 _yarn_：\n\n```bash\ncorepack prepare yarn@stable --activate\n```\n\n### 3. 填写环境变量\n\n在使用本项目的 **后端服务** 之前，你需要获取 **OpenAI API Key** 或是 **Access Token**，并在 `/service/.env` 文件中填写本地环境变量，内容可参考 [service/.env.example](https://github.com/ninechapter-algorithm/ChatBot/blob/main/service/.env.example) 文件。\n\n## 后端环境变量\n\n如上文所提，启动后端服务之前需要在 `/service/.env` 文件中配置环境变量，其中 **必须** 包含的字段有：\n\n- `OPENAI_API_KEY`：填写你的 OpenAI API Key\n  - `OPENAI_API_MODEL`：**选填**，用于设置模型，默认为 \"gpt-3.5-turbo\"\n  - `OPENAI_API_BASE_URL`：**选填**，用于设置接口地址，默认为 \"https://api.openai.com\"\n- `OPENAI_ACCESS_TOKEN`：填写你的 OpenAI Access Token\n  - `API_REVERSE_PROXY`：**选填**，用于设置反向代理，默认为 \"https://bypass.churchless.tech/api/conversation\"\n\n需要注意的是，上述的 `OPENAI_API_KEY` 和 `OPENAI_ACCESS_TOKEN` 是 **二选一** 的，当两者同时配置时，**会优先使用 `OPENAI_API_KEY`**。\n\n其它 **可选择进行配置** 的字段有：\n\n- `MAX_REQUEST_PER_HOUR`：每小时最大请求次数，默认无限\n- `TIMEOUT_MS`：超时时长，单位毫秒，默认 100 秒\n- `HTTPS_PROXY`：支持 `http`，`https`, `socks5`\n- `ALL_PROXY`：支持 `http`，`https`, `socks5`\n- Socks 代理相关，选择配置时需要以下四个字段\n  - `SOCKS_PROXY_HOST`\n  - `SOCKS_PROXY_PORT`\n  - `SOCKS_PROXY_USERNAME`\n  - `SOCKS_PROXY_PASSWORD`\n\n## 测试环境运行\n\n### 后端项目\n\n进入 `/service` 目录下，执行 `yarn` 或 `yarn install` 命令来安装依赖。等待依赖安装完毕之后，再执行 `yarn start` 命令即可启动后端项目。\n\n![image.png](https://media-lc.lintcode.com/u_501764/202309/5aeec2b9d3aa46d8946f434107569713/image.png)\n\n\u003e **注意**：为确保能够正常访问 OpenAI，请务必完成配置环境变量再启动项目！\n\n### 前端项目\n\n来到 `/web` 目录下，首先创建 `.env` 文件并配置环境变量，可参考 `.env.example` 文件内容。然后执行 `yarn` 或 `yarn install` 命令来安装项目所需依赖。\n\n等待依赖安装完毕之后，再执行 `yarn dev` 命令即可启动前端项目。\n\n![dev](https://media-lc.lintcode.com/u_501764/202309/e89363c05e2b4c92a2f84aaea368bf24/image.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninechapter-algorithm%2Fchatbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fninechapter-algorithm%2Fchatbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninechapter-algorithm%2Fchatbot/lists"}