这是一个 AI 项目,集成各种开放 AI 的能力。

让每个人都拥有可以使用 AI 的能力。
需要 node >= 18 版本
在根目录下,复制一个.env.example 文件重命名为.env,修改其中的字段:
# Server Port, eg: 3000
SERVER_PORT=3000
# TIMEOUT Time,eg: 2 * 60 * 1000
CHATGPT_REQUEST_TIMEOUT=
# OpenAI API Base URL - https://api.openai.com/docs
# Or self-built service address, eg api2d: https://openai.api2d.net/v1
OPENAI_API_BASE_URL =
# OpenAI API Key - https://platform.openai.com/account/api-keys
# Or self-built service key, eg api2d: fkxxx
OPENAI_API_KEY=
# CUSTOM_PROXY represents an http proxy. If left blank or not passed any value,
# it means that the http proxy is not enabled.
CUSTOM_PROXY=
OPENAI_API_BASE_URL: Indicates the base URL used for chatgpt, which can also use a third-party self-built service address, such as the endpoint of api2d. The default value here is https://api.openai.com/v1.OPENAI_API_KEY: Represents the official OpenAI API key that will be used. Alternatively, you can use a third-party service key, such as api2d.PROXY_ADDRESS: Scientific Internet access proxy configuration, for example: http://xxx.OPENAI_ACCESS_TOKEN: OpenAI's access_token, The field usually use with API_REVERSE_PROXY,Indicates that unofficial APIs will be used to access chatgpt.API_REVERSE_PROXY: Indicates available unofficial reverse proxies. By default it adopts "https://ai.fakeopen.com/api/conversation". For details please refer transitive-bullshit 大佬.CUSTOM_API_URL: Indicates the third party support service url.CUSTOM_COOKIE: Indicates the third party may need cookie info.CUSTOM_PROXY: represents an http proxy. If left blank or not passed any value, it means that the http proxy is not enabled.
Priority:OPENAI_API_KEY>OPENAI_ACCESS_TOKEN>CUSTOM_API_URL。
根目录下安装依赖,使用 pnpm i 安装代码。npm run dev。http://localhost:3000docker image pull cwy829/ai-assistant:0.0.1
下面命令里面 ~/docker-data/.env 需要替换成你的 .env 文件存放的地址,更多关于 .env 的信息参考这里
docker run -d -p 3000:3000 -v ~/docker-data/.env:/ai-assistant/.env --name ai-assistant cwy829/ai-assistant:0.0.1
更多关于 docker 的知识,请查看 文档
在根目录下执行 npm start
npm run dev:fenpm run dev:behttp://localhost:8000Content type
Image
Digest
sha256:d8b216ae8…
Size
77.7 MB
Last updated
about 2 years ago
docker pull cwy829/ai-assistant