docs
BIN
docSite/assets/imgs/oneapi/step1.png
Normal file
After Width: | Height: | Size: 6.0 MiB |
BIN
docSite/assets/imgs/oneapi/step2.png
Normal file
After Width: | Height: | Size: 208 KiB |
BIN
docSite/assets/imgs/oneapi/step3.png
Normal file
After Width: | Height: | Size: 215 KiB |
BIN
docSite/assets/imgs/oneapi/step4.png
Normal file
After Width: | Height: | Size: 247 KiB |
BIN
docSite/assets/imgs/oneapi/step5.png
Normal file
After Width: | Height: | Size: 128 KiB |
BIN
docSite/assets/imgs/oneapi/step6.png
Normal file
After Width: | Height: | Size: 154 KiB |
BIN
docSite/assets/imgs/oneapi/step7.png
Normal file
After Width: | Height: | Size: 155 KiB |
@@ -3,8 +3,8 @@
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"*": [
|
||||
"../../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js/*",
|
||||
"../../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.0+incompatible/js/*"
|
||||
"../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2@v2.21100.20000/package/dist/cjs/popper.js/*",
|
||||
"../../../../.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.0+incompatible/js/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
---
|
||||
weight: 10
|
||||
title: "文档"
|
||||
description: "FastGPT 官方文档"
|
||||
title: '文档'
|
||||
description: 'FastGPT 官方文档'
|
||||
icon: menu_book
|
||||
lead: ""
|
||||
lead: ''
|
||||
draft: false
|
||||
images: []
|
||||
---
|
@@ -150,7 +150,7 @@ docker-compose up -d
|
||||
|
||||
## 访问 FastGPT
|
||||
|
||||
目前可以通过 ` ip:3000`` 直接访问(注意防火墙)。登录用户名为 `root`,密码为刚刚环境变量里设置的 `DEFAULT_ROOT_PSW`。
|
||||
目前可以通过 `ip:3000` 直接访问(注意防火墙)。登录用户名为 `root`,密码为刚刚环境变量里设置的 `DEFAULT_ROOT_PSW`。
|
||||
|
||||
如果需要域名访问,请自行安装并配置 Nginx。
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "部署 one-api,实现多模型支持"
|
||||
description: "通过接入 one-api 来实现对各种大模型的支持"
|
||||
icon: "Api"
|
||||
title: '部署 one-api,实现多模型支持'
|
||||
description: '通过接入 one-api 来实现对各种大模型的支持'
|
||||
icon: 'Api'
|
||||
draft: false
|
||||
toc: true
|
||||
weight: 730
|
||||
@@ -9,17 +9,65 @@ weight: 730
|
||||
|
||||
[one-api](https://github.com/songquanpeng/one-api) 是一个 OpenAI 接口管理 & 分发系统,可以通过标准的 OpenAI API 格式访问所有的大模型,开箱即用。
|
||||
|
||||
FastGPT 可以通过接入 one-api 来实现对各种大模型的支持。部署方法也很简单,直接点击以下按钮即可一键部署 👇
|
||||
FastGPT 可以通过接入 one-api 来实现对各种大模型的支持。部署方法也很简单。
|
||||
|
||||
## MySQL 版本
|
||||
|
||||
MySQL 版本支持多实例,高并发。
|
||||
|
||||
直接点击以下按钮即可一键部署 👇
|
||||
|
||||
[](https://cloud.sealos.io/?openapp=system-fastdeploy%3FtemplateName%3Done-api)
|
||||
|
||||
部署完后会跳转「应用管理」,数据库在另一个应用「数据库」中。需要等待 1~3 分钟数据库运行后才能访问成功。
|
||||
|
||||
配置好 one-api 的模型后,可以直接修改 FastGPT 的环境变量:
|
||||
## SqlLite 版本
|
||||
|
||||
SqlLite 版本不支持多实例,适合个人小流量使用,但是价格非常便宜。
|
||||
|
||||
**1. [点击打开 Sealos 公有云](https://cloud.sealos.io/)**
|
||||
|
||||
**2. 打开 AppLaunchpad(应用管理) 工具**
|
||||
|
||||

|
||||
|
||||
**3. 点击创建新应用**
|
||||
|
||||
**4. 填写对应参数**
|
||||
|
||||
镜像:ghcr.io/songquanpeng/one-api:latest
|
||||
|
||||

|
||||
打开外网访问开关后,Sealos 会自动分配一个可访问的地址,不需要自己配置。
|
||||
|
||||

|
||||
填写完参数后,点击右上角部署即可。
|
||||
|
||||
## 使用步骤
|
||||
|
||||
**1. 登录 one-api**
|
||||
|
||||
打开 【one-api 应用详情】,找到访问地址:
|
||||

|
||||
|
||||
登录 one-api
|
||||

|
||||
|
||||
**2. 创建渠道和令牌**
|
||||
|
||||
在 one-api 中添加对应渠道,直接点击 【添加基础模型】,不要遗漏了向量模型
|
||||

|
||||
|
||||
创建一个令牌
|
||||

|
||||
|
||||
**3. 修改 FastGPT 的环境变量**
|
||||
|
||||
有了 one-api 令牌后,FastGPT 可以通过修改 baseurl 和 key 去请求到 one-api,再由 one-api 去请求不同的模型。修改下面两个环境变量:
|
||||
|
||||
```bash
|
||||
# 下面的地址是 Sealos 提供的,务必写上 v1
|
||||
# 下面的地址是 Sealos 提供的,务必写上 v1, 两个项目都在 sealos 部署时候,https://xxxx.cloud.sealos.io 可以改用内网地址
|
||||
OPENAI_BASE_URL=https://xxxx.cloud.sealos.io/v1
|
||||
# 下面的 key 由 one-api 提供
|
||||
# 下面的 key 是由 one-api 提供的令牌
|
||||
CHAT_API_KEY=sk-xxxxxx
|
||||
```
|
@@ -1,7 +1,7 @@
|
||||
---
|
||||
weight: 750
|
||||
title: "配置说明"
|
||||
description: "FastGPT 配置指南"
|
||||
title: '配置文件'
|
||||
description: 'FastGPT 配置指南'
|
||||
icon: quick_reference_all
|
||||
draft: false
|
||||
images: []
|
||||
|
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: '配置详解'
|
||||
title: '配置文件介绍'
|
||||
description: 'FastGPT 配置参数介绍'
|
||||
icon: 'settings'
|
||||
draft: false
|
||||
@@ -11,12 +11,10 @@ weight: 751
|
||||
|
||||
**开发环境下**,你需要将示例配置文件 `config.json` 复制成 `config.local.json` 文件才会生效。
|
||||
|
||||
**注意: 为了方便介绍,文档介绍里会把注释写到 json 文件,实际运行时候 json 文件不能包含注释。**
|
||||
|
||||
这个配置文件中包含了前端页面定制、系统级参数、AI 对话的模型等……
|
||||
|
||||
{{% alert context="warning" %}}
|
||||
注意:下面的配置介绍仅是局部介绍,你需要完整挂载整个 `config.json`,不能仅挂载一部分。你可以直接在默认的 config.json 基础上根据下面的介绍进行修改。
|
||||
注意:下面的配置介绍仅是局部介绍,你需要完整挂载整个 `config.json`,不能仅挂载一部分。你可以直接在默认的 config.json 基础上根据下面的介绍进行修改。挂载上去的配置文件不能包含注释。
|
||||
{{% /alert %}}
|
||||
|
||||
## 基础字段粗略说明
|
||||
|
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "多模型支持"
|
||||
description: "如何接入除了 GPT 以外的其他大模型"
|
||||
icon: "model_training"
|
||||
title: '多模型支持'
|
||||
description: '快速接入除了 GPT 以外的其他大模型'
|
||||
icon: 'model_training'
|
||||
draft: false
|
||||
toc: true
|
||||
weight: 752
|
||||
@@ -11,11 +11,9 @@ weight: 752
|
||||
|
||||
## 部署 one-api
|
||||
|
||||
首先你需要部署一个 [one-api](/docs/installation/one-api/),并添加对应的【渠道】
|
||||
首先你需要部署一个 [one-api](/docs/installation/one-api/),并添加对应的【渠道】和【令牌】,并修改 FastGPT 环境变量,具体可参考 [快速部署 one-api](/docs/installation/one-api)
|
||||
|
||||

|
||||
|
||||
## 添加 FastGPT 配置
|
||||
## 添加 FastGPT 配置文件
|
||||
|
||||
可以在 `/client/src/data/config.json` 里找到配置文件(本地开发需要复制成 config.local.json),配置文件中有一项是对话模型配置:
|
||||
|
||||
@@ -52,7 +50,7 @@ weight: 752
|
||||
],
|
||||
```
|
||||
|
||||
### 添加新模型
|
||||
### 添加新的对话模型
|
||||
|
||||
以添加文心一言为例:
|
||||
|
||||
@@ -71,4 +69,4 @@ weight: 752
|
||||
]
|
||||
```
|
||||
|
||||
添加完后,重启应用即可在选择文心一言模型进行对话。
|
||||
添加完后,重启 FastGPT 即可在选择文心一言模型进行对话。
|
||||
|
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "联网 GPT"
|
||||
description: "将 FastGPT 外接搜索引擎"
|
||||
icon: "search"
|
||||
title: '联网 GPT'
|
||||
description: '将 FastGPT 外接搜索引擎'
|
||||
icon: 'search'
|
||||
draft: false
|
||||
toc: true
|
||||
weight: 441
|
||||
@@ -11,11 +11,11 @@ weight: 441
|
||||
|
||||

|
||||
|
||||
如上图,利用 HTTP 模块,你可以轻松的外接一个搜索引擎。这里以调用 Google Search API 为例。
|
||||
如上图,利用 HTTP 模块,你可以轻松的外接一个搜索引擎。这里以调用 Google Search API 为例。注意:本文主要是为了介绍 HTTP 模型,具体的搜索效果需要依赖提示词和搜索引擎,这两部分可能需要更多的调试。
|
||||
|
||||
## 注册 Google Search API
|
||||
|
||||
[参考这篇文章](https://zhuanlan.zhihu.com/p/174666017)
|
||||
[参考这篇文章](https://zhuanlan.zhihu.com/p/174666017),每天可以免费使用 100 次。
|
||||
|
||||
## 写一个 Google Search 接口
|
||||
|
||||
|