图龙网络科技

问答社区

原创作者: 图龙网络科技 发布时间: 2023-09-23 279.26K 人阅读

面向所有人的开源AI聊天应用Chatbot UI

太极混元 发布于 5个月前 分类:CHATGPT

Updating更新中
在你的本地 Chatbot UI 仓库根目录下的终端中,运行:
npm run update
如果运行托管实例,你还需要运行:

npm run db-push
将最新的迁移应用到您的生产数据库。

Local Quickstart本地快速入门
按照以下步骤在本地运行你自己的Chatbot UI实例。
您可以观看完整的视频教程 这里 。
1. Clone the Repo

git clone https://github.com/mckaywrigley/chatbot-ui.git
2. Install Dependencies
在本地 Chatbot UI 仓库的根目录中打开终端并运行:
npm install
3. Install Supabase & Run Locally

Why Supabase?为什么选择 Supabase?
此前,我们使用本地浏览器存储来保存数据。然而,由于以下几个原因,这并不是一个理想的解决方案:
Security issues安全问题
Limited storage存储空间有限
Limits multi-modal use cases
限制多模态使用场景
我们现在使用Supabase,因为它易于使用、开源、基于Postgres,并且为托管实例提供免费层级。
未来我们将支持其他提供商,为您提供更多选择。
1. Install Docker1. 安装 Docker
您需要安装 Docker 才能在本地运行 Supabase。可以免费[在此处](here)下载。
2. Install Supabase CLI
2. 安装Supabase CLI

MacOS/Linux

brew install supabase/tap/supabase
Windows

scoop bucket add supabase https://github.com/supabase/scoop-bucket.git
scoop install supabase
3. Start Supabase3. 启动Supabase
在你的本地 Chatbot UI 仓库根目录下的终端中,运行:
supabase start
4. Fill in Secrets
1. 环境变量
在你的本地 Chatbot UI 仓库根目录下的终端中,运行:
cp .env.local.example .env.local
通过运行以下命令获取所需值:
supabase status
注意:使用 from 中的
现在转到您的 文件并填写值。
若环境变量已设置,则会禁用用户设置中的输入项。
2. SQL Setup2. SQL 设置
在第一个迁移文件中,你需要用上面获得的值替换以下2个值:
project_url (line 53): http://supabase_kong_chatbotui:8000 (default) can remain unchanged if you don't change your project_id in the config.toml file
(第53行): (默认) 如果您不更改 文件中的 ,则可以保持不变
service_role_key (line 54): You got this value from running supabase status
(第54行):您通过运行获取了该值
这样可以避免存储文件未被正确删除的问题。
5. Install Ollama (optional for local models)
按照此处的说明操作。
6. Run app locally
在你的本地 Chatbot UI 仓库根目录下的终端中,运行:
npm run chat
您的本地 Chatbot UI 实例现在应该运行在 http://localhost:3000。请确保使用兼容的 Node 版本(即 v18)。
You can view your backend GUI at http://localhost:54323/project/default/editor.
您可以在 http://localhost:54323/project/default/editor 查看后端GUI界面。

0个回复

  • 龙族们都在等待回复

提供中小企业建站高端正版精品系统

图龙网络 开发市场