Skip to content

Commit fd9b629

Browse files
authored
Revert "sub plan page (FlowiseAI#885)" (FlowiseAI#886)
This reverts commit 443ad37.
1 parent 443ad37 commit fd9b629

File tree

246 files changed

+4244
-6249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

246 files changed

+4244
-6249
lines changed

docSite/content/docs/course/data_search.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ FastGPT 采用了`PostgresSQL`的`PG Vector`插件作为向量检索器,索引
5656

5757
### 检索方案
5858

59-
1. 通过`问题优化`实现指代消除和问题扩展,从而增加连续对话的检索能力以及语义丰富度。
59+
1. 通过`问题补全`实现指代消除和问题扩展,从而增加连续对话的检索能力以及语义丰富度。
6060
2. 通过`Concat query`来增加`Rerank`连续对话的时,排序的准确性。
6161
3. 通过`RRF`合并方式,综合多个渠道的检索效果。
6262
4. 通过`Rerank`来二次排序,提高精度。
@@ -97,7 +97,7 @@ FastGPT 采用了`PostgresSQL`的`PG Vector`插件作为向量检索器,索引
9797

9898
#### 结果重排
9999

100-
利用`ReRank`模型对搜索结果进行重排,绝大多数情况下,可以有效提高搜索结果的准确率。不过,重排模型与问题的完整度(主谓语齐全)有一些关系,通常会先走问题优化后再进行搜索-重排。重排后可以得到一个`0-1`的得分,代表着搜索内容与问题的相关度,该分数通常比向量的得分更加精确,可以根据得分进行过滤。
100+
利用`ReRank`模型对搜索结果进行重排,绝大多数情况下,可以有效提高搜索结果的准确率。不过,重排模型与问题的完整度(主谓语齐全)有一些关系,通常会先走问题补全后再进行搜索-重排。重排后可以得到一个`0-1`的得分,代表着搜索内容与问题的相关度,该分数通常比向量的得分更加精确,可以根据得分进行过滤。
101101

102102
FastGPT 会使用 `RRF` 对重排结果、向量搜索结果、全文检索结果进行合并,得到最终的搜索结果。
103103

@@ -115,7 +115,7 @@ FastGPT 会使用 `RRF` 对重排结果、向量搜索结果、全文检索结
115115

116116
该值仅在`语义检索`或使用`结果重排`时生效。
117117

118-
### 问题优化
118+
### 问题补全
119119

120120
#### 背景
121121

@@ -125,7 +125,7 @@ FastGPT 会使用 `RRF` 对重排结果、向量搜索结果、全文检索结
125125

126126
![](/imgs/coreferenceResolution2.jpg)
127127

128-
用户在提问“第二点是什么”的时候,只会去知识库里查找“第二点是什么”,压根查不到内容。实际上需要查询的是“QA结构是什么”。因此我们需要引入一个【问题优化】模块,来对用户当前的问题进行补全,从而使得知识库搜索能够搜索到合适的内容。使用补全后效果如下:
128+
用户在提问“第二点是什么”的时候,只会去知识库里查找“第二点是什么”,压根查不到内容。实际上需要查询的是“QA结构是什么”。因此我们需要引入一个【问题补全】模块,来对用户当前的问题进行补全,从而使得知识库搜索能够搜索到合适的内容。使用补全后效果如下:
129129

130130
![](/imgs/coreferenceResolution3.jpg)
131131

docSite/content/docs/development/configuration.md

+174-11
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,163 @@ weight: 708
1313

1414
这个配置文件中包含了系统级参数、AI 对话的模型、function 模型等……
1515

16-
## 4.6.8+ 版本新配置文件
16+
## 4.6.8 以前版本完整配置参数
17+
18+
**使用时,请务必去除注释!**
19+
20+
以下配置适用于V4.6.6-alpha版本以后
21+
22+
```json
23+
{
24+
"systemEnv": {
25+
"vectorMaxProcess": 15, // 向量生成最大进程,结合数据库性能和 key 来设置
26+
"qaMaxProcess": 15, // QA 生成最大进程,结合数据库性能和 key 来设置
27+
"pgHNSWEfSearch": 100 // pg vector 索引参数,越大精度高但速度慢
28+
},
29+
"chatModels": [ // 对话模型
30+
{
31+
"model": "gpt-3.5-turbo-1106",
32+
"name": "GPT35-1106",
33+
"inputPrice": 0, // 输入价格。 xx元/1k tokens
34+
"outputPrice": 0, // 输出价格。 xx元/1k tokens
35+
"maxContext": 16000, // 最大上下文长度
36+
"maxResponse": 4000, // 最大回复长度
37+
"quoteMaxToken": 2000, // 最大引用内容长度
38+
"maxTemperature": 1.2, // 最大温度值
39+
"censor": false, // 是否开启敏感词过滤(商业版)
40+
"vision": false, // 支持图片输入
41+
"defaultSystemChatPrompt": ""
42+
},
43+
{
44+
"model": "gpt-3.5-turbo-16k",
45+
"name": "GPT35-16k",
46+
"maxContext": 16000,
47+
"maxResponse": 16000,
48+
"inputPrice": 0,
49+
"outputPrice": 0,
50+
"quoteMaxToken": 8000,
51+
"maxTemperature": 1.2,
52+
"censor": false,
53+
"vision": false,
54+
"defaultSystemChatPrompt": ""
55+
},
56+
{
57+
"model": "gpt-4",
58+
"name": "GPT4-8k",
59+
"maxContext": 8000,
60+
"maxResponse": 8000,
61+
"inputPrice": 0,
62+
"outputPrice": 0,
63+
"quoteMaxToken": 4000,
64+
"maxTemperature": 1.2,
65+
"censor": false,
66+
"vision": false,
67+
"defaultSystemChatPrompt": ""
68+
},
69+
{
70+
"model": "gpt-4-vision-preview",
71+
"name": "GPT4-Vision",
72+
"maxContext": 128000,
73+
"maxResponse": 4000,
74+
"inputPrice": 0,
75+
"outputPrice": 0,
76+
"quoteMaxToken": 100000,
77+
"maxTemperature": 1.2,
78+
"censor": false,
79+
"vision": true,
80+
"defaultSystemChatPrompt": ""
81+
}
82+
],
83+
"qaModels": [ // QA 生成模型
84+
{
85+
"model": "gpt-3.5-turbo-16k",
86+
"name": "GPT35-16k",
87+
"maxContext": 16000,
88+
"maxResponse": 16000,
89+
"inputPrice": 0,
90+
"outputPrice": 0
91+
}
92+
],
93+
"cqModels": [ // 问题分类模型
94+
{
95+
"model": "gpt-3.5-turbo-1106",
96+
"name": "GPT35-1106",
97+
"maxContext": 16000,
98+
"maxResponse": 4000,
99+
"inputPrice": 0,
100+
"outputPrice": 0,
101+
"toolChoice": true, // 是否支持openai的 toolChoice, 不支持的模型需要设置为 false,会走提示词生成
102+
"functionPrompt": ""
103+
},
104+
{
105+
"model": "gpt-4",
106+
"name": "GPT4-8k",
107+
"maxContext": 8000,
108+
"maxResponse": 8000,
109+
"inputPrice": 0,
110+
"outputPrice": 0,
111+
"toolChoice": true,
112+
"functionPrompt": ""
113+
}
114+
],
115+
"extractModels": [ // 内容提取模型
116+
{
117+
"model": "gpt-3.5-turbo-1106",
118+
"name": "GPT35-1106",
119+
"maxContext": 16000,
120+
"maxResponse": 4000,
121+
"inputPrice": 0,
122+
"outputPrice": 0,
123+
"toolChoice": true,
124+
"functionPrompt": ""
125+
}
126+
],
127+
"qgModels": [ // 生成下一步指引
128+
{
129+
"model": "gpt-3.5-turbo-1106",
130+
"name": "GPT35-1106",
131+
"maxContext": 1600,
132+
"maxResponse": 4000,
133+
"inputPrice": 0,
134+
"outputPrice": 0
135+
}
136+
],
137+
"vectorModels": [ // 向量模型
138+
{
139+
"model": "text-embedding-ada-002",
140+
"name": "Embedding-2",
141+
"inputPrice": 0,
142+
"defaultToken": 700,
143+
"maxToken": 3000
144+
}
145+
],
146+
"reRankModels": [], // 重排模型,暂时填空数组
147+
"audioSpeechModels": [
148+
{
149+
"model": "tts-1",
150+
"name": "OpenAI TTS1",
151+
"inputPrice": 0,
152+
"baseUrl": "",
153+
"key": "",
154+
"voices": [
155+
{ "label": "Alloy", "value": "alloy", "bufferId": "openai-Alloy" },
156+
{ "label": "Echo", "value": "echo", "bufferId": "openai-Echo" },
157+
{ "label": "Fable", "value": "fable", "bufferId": "openai-Fable" },
158+
{ "label": "Onyx", "value": "onyx", "bufferId": "openai-Onyx" },
159+
{ "label": "Nova", "value": "nova", "bufferId": "openai-Nova" },
160+
{ "label": "Shimmer", "value": "shimmer", "bufferId": "openai-Shimmer" }
161+
]
162+
}
163+
],
164+
"whisperModel": {
165+
"model": "whisper-1",
166+
"name": "Whisper1",
167+
"inputPrice": 0
168+
}
169+
}
170+
```
171+
172+
## 4.6.8 新配置文件
17173

18174
llm模型全部合并
19175

@@ -33,10 +189,11 @@ llm模型全部合并
33189
"maxResponse": 4000, // 最大回复
34190
"quoteMaxToken": 13000, // 最大引用内容
35191
"maxTemperature": 1.2, // 最大温度
36-
"charsPointsPrice": 0,
192+
"inputPrice": 0,
193+
"outputPrice": 0,
37194
"censor": false,
38195
"vision": false, // 是否支持图片输入
39-
"datasetProcess": false, // 是否设置为知识库处理模型(QA),务必保证至少有一个为true,否则知识库会报错
196+
"datasetProcess": false, // 是否设置为知识库处理模型
40197
"toolChoice": true, // 是否支持工具选择
41198
"functionCall": false, // 是否支持函数调用
42199
"customCQPrompt": "", // 自定义文本分类提示词(不支持工具和函数调用的模型
@@ -51,7 +208,8 @@ llm模型全部合并
51208
"maxResponse": 16000,
52209
"quoteMaxToken": 13000,
53210
"maxTemperature": 1.2,
54-
"charsPointsPrice": 0,
211+
"inputPrice": 0,
212+
"outputPrice": 0,
55213
"censor": false,
56214
"vision": false,
57215
"datasetProcess": true,
@@ -69,7 +227,8 @@ llm模型全部合并
69227
"maxResponse": 4000,
70228
"quoteMaxToken": 100000,
71229
"maxTemperature": 1.2,
72-
"charsPointsPrice": 0,
230+
"inputPrice": 0,
231+
"outputPrice": 0,
73232
"censor": false,
74233
"vision": false,
75234
"datasetProcess": false,
@@ -87,9 +246,10 @@ llm模型全部合并
87246
"maxResponse": 4000,
88247
"quoteMaxToken": 100000,
89248
"maxTemperature": 1.2,
90-
"charsPointsPrice": 0,
249+
"inputPrice": 0,
250+
"outputPrice": 0,
91251
"censor": false,
92-
"vision": true,
252+
"vision": false,
93253
"datasetProcess": false,
94254
"toolChoice": true,
95255
"functionCall": false,
@@ -103,7 +263,8 @@ llm模型全部合并
103263
{
104264
"model": "text-embedding-ada-002",
105265
"name": "Embedding-2",
106-
"charsPointsPrice": 0,
266+
"inputPrice": 0,
267+
"outputPrice": 0,
107268
"defaultToken": 700,
108269
"maxToken": 3000,
109270
"weight": 100,
@@ -115,7 +276,8 @@ llm模型全部合并
115276
{
116277
"model": "tts-1",
117278
"name": "OpenAI TTS1",
118-
"charsPointsPrice": 0,
279+
"inputPrice": 0,
280+
"outputPrice": 0,
119281
"voices": [
120282
{ "label": "Alloy", "value": "alloy", "bufferId": "openai-Alloy" },
121283
{ "label": "Echo", "value": "echo", "bufferId": "openai-Echo" },
@@ -129,7 +291,8 @@ llm模型全部合并
129291
"whisperModel": {
130292
"model": "whisper-1",
131293
"name": "Whisper1",
132-
"charsPointsPrice": 0
294+
"inputPrice": 0,
295+
"outputPrice": 0
133296
}
134297
}
135298
```
@@ -150,7 +313,7 @@ llm模型全部合并
150313
{
151314
"model": "bge-reranker-base", // 随意
152315
"name": "检索重排-base", // 随意
153-
"charsPointsPrice": 0,
316+
"inputPrice": 0,
154317
"requestUrl": "{{host}}/api/v1/rerank",
155318
"requestAuth": "安全凭证,已自动补 Bearer"
156319
}

docSite/content/docs/development/docker.md

-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ curl -O https://raw.githubusercontent.com/labring/FastGPT/main/projects/app/data
110110
cd 项目目录
111111
# 创建 mongo 密钥
112112
openssl rand -base64 756 > ./mongodb.key
113-
# 600不行可以用chmod 999
114113
chmod 600 ./mongodb.key
115114
chown 999:root ./mongodb.key
116115
# 启动容器

docSite/content/docs/development/one-api.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ CHAT_API_KEY=sk-xxxxxx
116116
"maxResponse": 4000, // 最大回复
117117
"quoteMaxToken": 13000, // 最大引用内容
118118
"maxTemperature": 1.2, // 最大温度
119-
"charsPointsPrice": 0,
119+
"inputPrice": 0,
120+
"outputPrice": 0,
120121
"censor": false,
121122
"vision": false, // 是否支持图片输入
122123
"datasetProcess": false, // 是否设置为知识库处理模型

0 commit comments

Comments
 (0)