Skip to content

Commit

Permalink
perf: auto load icons (#688)
Browse files Browse the repository at this point in the history
* perf: icon

* perf: icon

* doc

* perf: simple edit ui

* doc

* doc

* doc

* doc
  • Loading branch information
c121914yu committed Jan 3, 2024
1 parent 2fc6e92 commit c2abbb5
Show file tree
Hide file tree
Showing 246 changed files with 2,184 additions and 1,375 deletions.
Binary file added docSite/assets/imgs/sealos_price.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions docSite/content/docs/commercial/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ FastGPT 商业版软件根据不同的部署方式,分为 4 类收费模式。
| Sealos全托管 | 1. 有效期内免费升级。<br>2. 免运维服务&数据库。<br>3. 赠送 10000 元 Sealos 云资源额度。 | 半天 | 3000元起/月(3个月起)<br>或<br>30000元起/年 |
| 自有服务器-单机版 | 1. 6个版本的升级服务。 | 14天内 | 60000元/套(不限时长) |
| 自有服务器-Sealos版 | 1. 6个版本的升级服务。 | 14天内 | 150000元/套(不限时长)|

{{< /table >}}

{{% alert icon="🤖 " context="success" %}}
6个版本的升级服务不是指只能用 6 个版本,而是指依赖 FastGPT 团队提供的升级服务。大部分时候,建议自行升级,也不麻烦。
{{% /alert %}}


## 技术支持

Expand Down Expand Up @@ -84,4 +87,11 @@ FastGPT 商业版软件根据不同的部署方式,分为 4 类收费模式。

2. 二次开发如何操作?

可自行修改开源版代码进行二次开发,不支持修改商业版镜像。
可自行修改开源版代码进行二次开发,不支持修改商业版镜像。


## Sealos 费用

Sealos 云服务属于按量计费,下面是它的价格表:

![](/imgs/sealos_price.png)
28 changes: 17 additions & 11 deletions docSite/content/docs/development/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ weight: 708
{
"model": "gpt-3.5-turbo-1106",
"name": "GPT35-1106",
"price": 0, // 除以 100000 后等于1个token的价格
"inputPrice": 0, // 输入价格。 xx元/1k tokens
"outputPrice": 0, // 输出价格。 xx元/1k tokens
"maxContext": 16000, // 最大上下文长度
"maxResponse": 4000, // 最大回复长度
"quoteMaxToken": 2000, // 最大引用内容长度
Expand All @@ -192,7 +193,8 @@ weight: 708
"name": "GPT35-16k",
"maxContext": 16000,
"maxResponse": 16000,
"price": 0,
"inputPrice": 0,
"outputPrice": 0,
"quoteMaxToken": 8000,
"maxTemperature": 1.2,
"censor": false,
Expand All @@ -204,7 +206,8 @@ weight: 708
"name": "GPT4-8k",
"maxContext": 8000,
"maxResponse": 8000,
"price": 0,
"inputPrice": 0,
"outputPrice": 0,
"quoteMaxToken": 4000,
"maxTemperature": 1.2,
"censor": false,
Expand All @@ -216,7 +219,8 @@ weight: 708
"name": "GPT4-Vision",
"maxContext": 128000,
"maxResponse": 4000,
"price": 0,
"inputPrice": 0,
"outputPrice": 0,
"quoteMaxToken": 100000,
"maxTemperature": 1.2,
"censor": false,
Expand All @@ -239,7 +243,8 @@ weight: 708
"name": "GPT35-1106",
"maxContext": 16000,
"maxResponse": 4000,
"price": 0,
"inputPrice": 0,
"outputPrice": 0,
"toolChoice": true, // 是否支持openai的 toolChoice, 不支持的模型需要设置为 false,会走提示词生成
"functionPrompt": ""
},
Expand All @@ -248,7 +253,7 @@ weight: 708
"name": "GPT4-8k",
"maxContext": 8000,
"maxResponse": 8000,
"price": 0,
"inputPrice": 0,
"toolChoice": true,
"functionPrompt": ""
}
Expand All @@ -259,7 +264,7 @@ weight: 708
"name": "GPT35-1106",
"maxContext": 16000,
"maxResponse": 4000,
"price": 0,
"outputPrice": 0,
"toolChoice": true,
"functionPrompt": ""
}
Expand All @@ -270,14 +275,15 @@ weight: 708
"name": "GPT35-1106",
"maxContext": 1600,
"maxResponse": 4000,
"price": 0
"inputPrice": 0,
"outputPrice": 0,
}
],
"vectorModels": [ // 向量模型
{
"model": "text-embedding-ada-002",
"name": "Embedding-2",
"price": 0.2,
"inputPrice": 0,
"defaultToken": 700,
"maxToken": 3000
}
Expand All @@ -287,7 +293,7 @@ weight: 708
{
"model": "tts-1",
"name": "OpenAI TTS1",
"price": 0,
"inputPrice": 0,
"baseUrl": "",
"key": "",
"voices": [
Expand All @@ -303,7 +309,7 @@ weight: 708
"whisperModel": {
"model": "whisper-1",
"name": "Whisper1",
"price": 0
"inputPrice": 0
}
}
```
Expand Down
14 changes: 9 additions & 5 deletions docSite/content/docs/development/qa.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ OneAPI 中没有配置该模型渠道。

### 如何更新?

执行下面命令会自动拉取最新镜像,一般情况下不需要执行额外操作。
1. 查看[更新文档](/docs/development/upgrading/intro/),确认要升级的版本,避免跨版本升级。
2. 修改镜像 tag 到指定版本
3. 执行下面命令会自动拉取镜像:

```bash
docker-compose pull
docker-compose up -d
```
```bash
docker-compose pull
docker-compose up -d
```

4. 执行初始化脚本(如果有)

### 如何自定义配置文件?

Expand Down
81 changes: 10 additions & 71 deletions docSite/content/docs/development/sealos.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,17 @@ FastGPT 商业版共包含了3个应用(fastgpt, fastgpt-plus, fastgpt-admin
例如,目前是4.5 版本,要升级到4.5.1,就先把镜像版本改成v4.5.1,执行一下升级脚本,等待完成后再继续升级。如果目标版本不需要执行初始化,则可以跳过。

升级步骤:
1. 打开sealos的应用管理
2. 有3个应用 fastgpt , fastgpt-plugin 和 fastgpt-admin
3. 点击对应应用右边3个点,变更。或者点详情后右上角的变更。
4. 修改镜像名栏

1. 查看[更新文档](/docs/development/upgrading/intro/),确认要升级的版本,避免跨版本升级。
2. 打开 sealos 的应用管理
3. 有2个应用 fastgpt , fastgpt-pro
4. 点击对应应用右边3个点,变更。或者点详情后右上角的变更。
5. 修改镜像的版本号

![](/imgs/onsealos2.png)

5. 点击变更/重启,会自动拉取最新镜像进行更新
6. 执行对应版本的初始化脚本
6. 点击变更/重启,会自动拉取最新镜像进行更新
7. 执行对应版本的初始化脚本(如果有)

### 如何获取 FastGPT 访问链接

Expand All @@ -88,34 +91,6 @@ FastGPT 商业版共包含了3个应用(fastgpt, fastgpt-plus, fastgpt-admin

[配置文件参考](https://doc.fastgpt.in/docs/development/configuration/)

FeConfig 参考下面(目前未做可视化)
```
"FeConfig": {
"show_emptyChat": false, // 是否展示聊天时空白的内容
"show_register": true, // 展示注册按键
"show_appStore": false, // 应用市场(暂时不可用)
"show_contact": false, // 联系方式(目前不可配置,直接false)
"show_git": false, // 展示 github
"show_doc": false, // 展示文档
"show_pay": true, // 展示支付
"show_openai_account": false, // 用户可自定义 openai key
"show_promotion": false, // 邀请好友机制
"docUrl": "https://doc.fastgpt.in", // 文档基本地址
"systemTitle": "FastGPT", // 系统的 title
"googleClientVerKey": "", // 谷歌 v3 校验前端凭证
"isPlus": true, // 直接设置 true
"oauth": { // oauth登录
"github": "",
"google": ""
},
"limit": {
"exportLimitMinutes": 0 // 导出间隔限制
},
"scripts": [
]
}
```

### 修改站点名称以及 favicon
修改应用的环境变量,增加

Expand All @@ -134,6 +109,7 @@ SYSTEM_FAVICON 可以是一个网络地址
新增一个挂载文件,文件名为:/app/projects/app/public/icon/logo.svg ,值为 svg 对应的值。

![](/imgs/onsealos7.png)

![](/imgs/onsealos8.png)

### 管理后台
Expand All @@ -148,45 +124,8 @@ SYSTEM_FAVICON 可以是一个网络地址
"license": "",
"system": {
"title": "" // 系统名称
},
"censor": {
"BAIDU_TEXT_CENSOR_CLIENTID": "", // 百度文本安全校验
"BAIDU_TEXT_CENSOR_CLIENTSECRET": "" // 百度文本安全校验
},
"auth": {
"googleServiceVerKey": "", // 谷歌 v3 校验
"github": { // github oauth
"clientId": "",
"secret": ""
},
"google": { // google oauth
"clientId": "",
"secret": ""
},
"email": { // 注册邮箱配置
"service": "qq",
"user": "",
"pass": ""
},
"phone": { // 阿里短信配置
"SNED_PHONE_ACCESSKEYID": "",
"SNED_PHONE_ACCESSSECRET": "",
"SNED_PHONE_SIGNNAME": "",
"SNED_PHONE_TEMPLATE": ""
}
},
"pay": { // 微信支付配置
"wx": {
"WX_APPID": "",
"WX_MCHID": "",
"WX_V3_CODE": "",
"WX_NOTIFY_URL": "",
"WX_SERIAL_NO": "",
"WX_PRIVATE_KEY": ""
}
}
}
```

### One API 使用
Expand Down
7 changes: 3 additions & 4 deletions docSite/content/docs/development/upgrading/466.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
---
title: 'V4.6.6-alpha(需要改配置文件)'
title: 'V4.6.6(需要改配置文件)'
description: 'FastGPT V4.6.6'
icon: 'upgrade'
draft: false
toc: true
weight: 830
---

**版本仍在开发中……**

## 配置文件变更

为了减少代码重复度,我们对配置文件做了一些修改:[点击查看最新的配置文件](/docs/development/configuration/)
Expand All @@ -18,4 +16,5 @@ weight: 830
1. 新增 - 搜索方式:分离向量语义检索,全文检索和重排,通过 RRF 进行排序合并。
2. 优化 - 问题分类提示词,id引导。测试国产商用 api 模型(百度阿里智谱讯飞)使用 Prompt 模式均可分类。
3. UI 优化,未来将逐步替换新的UI设计。
4. 查看 [FastGPT 2024 RoadMap](https://github.com/labring/FastGPT?tab=readme-ov-file#-%E5%9C%A8%E7%BA%BF%E4%BD%BF%E7%94%A8)
4. 优化代码:Icon 抽离和自动化获取。
5. 查看 [FastGPT 2024 RoadMap](https://github.com/labring/FastGPT?tab=readme-ov-file#-%E5%9C%A8%E7%BA%BF%E4%BD%BF%E7%94%A8)
8 changes: 4 additions & 4 deletions docSite/content/docs/use-cases/datasetEngine.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ FastGPT 采用了 `PostgresSQL` 的 `PG Vector` 插件作为向量检索器,

|| 集合 | 数据 |
| --- | --- | --- |
| ![](/imgs/datasetEngine1.png) | ![](/imgs/datasetEngine2.png) | ![](/imgs/datasetEngine3.png) |
| ![](/imgs/datasetEngine1.jpg) | ![](/imgs/datasetEngine2.jpg) | ![](/imgs/datasetEngine3.jpg) |

### 导入数据方案1 - 直接分段导入

选择文件导入时,可以选择直接分段方案。直接分段会利用`句子分词器`对文本进行一定长度拆分,最终分割中多组的`q`。如果使用了直接分段方案,我们建议在`应用`设置`引用提示词`时,使用`通用模板`即可,无需选择`问答模板`

| 交互 | 结果 |
| --- | --- |
| ![](/imgs/datasetEngine4.png) | ![](/imgs/datasetEngine5.png) |
| ![](/imgs/datasetEngine4.jpg) | ![](/imgs/datasetEngine5.jpg) |


### 导入数据方案2 - QA导入
Expand All @@ -66,15 +66,15 @@ FastGPT 采用了 `PostgresSQL` 的 `PG Vector` 插件作为向量检索器,

| 交互 | 结果 |
| --- | --- |
| ![](/imgs/datasetEngine6.png) | ![](/imgs/datasetEngine7.png) |
| ![](/imgs/datasetEngine6.jpg) | ![](/imgs/datasetEngine7.jpg) |

### 导入数据方案3 - 手动录入

在 FastGPT 中,你可以在任何一个`集合`中点击右上角的`插入`手动录入知识点,或者使用`标注`功能手动录入。被搜索的内容为`q`,补充内容(可选)为`a`

| | | |
| --- | --- | --- |
| ![](/imgs/datasetEngine8.png) | ![](/imgs/datasetEngine9.png) | ![](/imgs/datasetEngine10.png) |
| ![](/imgs/datasetEngine8.jpg) | ![](/imgs/datasetEngine9.jpg) | ![](/imgs/datasetEngine10.jpg) |

### 导入数据方案4 - CSV录入

Expand Down
2 changes: 1 addition & 1 deletion docSite/content/docs/use-cases/onwechat.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ weight: 504
密钥需要自己保管好,一旦关闭就无法再复制密钥,只能创建新密钥再复制。
{{% /alert %}}

![](/imgs/fastgpt-api.png)
![](/imgs/fastgpt-api.jpg)


## 3. 创建 docker-compose.yml 文件
Expand Down
2 changes: 1 addition & 1 deletion docSite/content/docs/use-cases/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ weight: 505
密钥需要自己保管好,一旦关闭就无法再复制密钥,只能创建新密钥再复制。
{{% /alert %}}

![](/imgs/fastgpt-api.png)
![](/imgs/fastgpt-api.jpg)

{{% alert icon="🍅" context="success" %}}
Tips: 安全起见,你可以设置一个额度或者过期时间,放置 key 被滥用。
Expand Down
2 changes: 1 addition & 1 deletion docSite/content/docs/workflow/examples/google_search.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ weight: 402

| | |
| --------------------- | --------------------- |
| ![](/imgs/google_search_1.png) | ![](/imgs/google_search_2.png) |
| ![](/imgs/google_search_1.jpg) | ![](/imgs/google_search_2.jpg) |


如上图,利用 HTTP 模块,你可以外接一个搜索引擎作为AI回复的参考资料。这里以调用 Google Search API 为例。注意:本文主要是为了介绍 HTTP 模型,具体的搜索效果需要依赖提示词和搜索引擎,尤其是【搜索引擎】,简单的搜索引擎无法获取更详细的内容,这部分可能需要更多的调试。
Expand Down
10 changes: 5 additions & 5 deletions docSite/content/docs/workflow/examples/lab_appointment.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ weight: 403

| | |
| --------------------- | --------------------- |
| ![](/imgs/demo-appointment1.png) | ![](/imgs/demo-appointment2.png) |
| ![](/imgs/demo-appointment3.png) | ![](/imgs/demo-appointment4.png) |
| ![](/imgs/demo-appointment1.jpg) | ![](/imgs/demo-appointment2.jpg) |
| ![](/imgs/demo-appointment3.jpg) | ![](/imgs/demo-appointment4.jpg) |



Expand All @@ -26,7 +26,7 @@ weight: 403

## 2. 问题分类

![](/imgs/demo-appointment5.png)
![](/imgs/demo-appointment5.jpg)

如上图,用户问题作为对话的起点,流入【问题分类模块】,根据用户问题的内容,判断用户是询问实验室相关问题、预约实验室或其他问题。如果用户询问的是非实验问题,会直接拒绝回复内容。再根据问题是属于询问实验室相关/预约类问题,执行不同的流程。

Expand All @@ -43,7 +43,7 @@ weight: 403

| | | |
| --------------------- | --------------------- |--------------------- |
| ![](/imgs/demo-appointment6.png) | ![](/imgs/demo-appointment7.png) | ![](/imgs/demo-appointment8.png) |
| ![](/imgs/demo-appointment6.jpg) | ![](/imgs/demo-appointment7.jpg) | ![](/imgs/demo-appointment8.jpg) |

内容提取是 LLM 带来的十分重要的能力,可以从自然语言中提取出结构化的数据,从而方便进行逻辑处理。

Expand All @@ -57,7 +57,7 @@ weight: 403

HTTP 模块允许你调用任意 GET/POST 类型的 HTTP 接口,从而实现一些复杂的业务逻辑。这里我们调用了一个预约实验室的接口,传入的是信息提取模块的结果和预约行为。

![](/imgs/demo-appointment9.png)
![](/imgs/demo-appointment9.jpg)

具体的入参结构可以参考[HTTP模块](/docs/workflow/modules/http/),实在不行在接口里多打印 Debug。

Expand Down
Loading

0 comments on commit c2abbb5

Please sign in to comment.