openchat-ui
- 0. 什么是 Chatbot UI
- 1. Github 地址
- 2. 本地部署
- 3. (参考)配置文件说明
0. 什么是 Chatbot UI
Chatbot UI 是一个用于 AI 模型的开源聊天 UI。适用于 OpenChat 模型。
画面效果展示如下,
1. Github 地址
https://github.com/imoneoi/openchat-ui
2. 本地部署
安装 nvm,
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
激活 nvm,
sudo su -
安装 node,
nvm install v18.12.1
克隆代码,
git clone https://github.com/mckaywrigley/chatbot-ui.git; cd chatbot-ui
安装依赖项,
npm i
创建配置文件,
vi .env.local---
OPENAI_API_HOST=https://api.openai.com
OPENAI_API_KEY=sk-abcdesnjRtux1QsaOpnkVybdFTynlzp105uj17ZQ4rxzFxyz # 示例,此 key 无效
NEXT_PUBLIC_DEFAULT_TEMPERATURE=0.7
---
启动应用,
npm run dev
访问应用,使用浏览器打开 http://localhost:3000/,
3. (参考)配置文件说明
Environment Variable | Default value | Description |
---|---|---|
OPENAI_API_KEY | The default API key used for authentication with OpenAI | |
OPENAI_API_HOST | https://api.openai.com | The base url, for Azure use https://<endpoint>.openai.azure.com |
OPENAI_API_TYPE | openai | The API type, options are openai or azure |
OPENAI_API_VERSION | 2023-03-15-preview | Only applicable for Azure OpenAI |
AZURE_DEPLOYMENT_ID | Needed when Azure OpenAI, Ref Azure OpenAI API | |
OPENAI_ORGANIZATION | Your OpenAI organization ID | |
DEFAULT_MODEL | gpt-3.5-turbo | The default model to use on new conversations, for Azure use gpt-35-turbo |
NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT | see here | The default system prompt to use on new conversations |
NEXT_PUBLIC_DEFAULT_TEMPERATURE | 1 | The default temperature to use on new conversations |
GOOGLE_API_KEY | See [Custom Search JSON API documentation][GCSE] | |
GOOGLE_CSE_ID | See [Custom Search JSON API documentation][GCSE] |
完结!