mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 05:23:57 +00:00
docs
This commit is contained in:
@@ -59,14 +59,7 @@ const NodeCard = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box minW={minW} bg={'white'} border={theme.borders.md} borderRadius={'md'} boxShadow={'sm'}>
|
||||||
minW={minW}
|
|
||||||
maxW={'430px'}
|
|
||||||
bg={'white'}
|
|
||||||
border={theme.borders.md}
|
|
||||||
borderRadius={'md'}
|
|
||||||
boxShadow={'sm'}
|
|
||||||
>
|
|
||||||
<Flex className="custom-drag-handle" px={4} py={3} alignItems={'center'}>
|
<Flex className="custom-drag-handle" px={4} py={3} alignItems={'center'}>
|
||||||
<Avatar src={logo} borderRadius={'md'} objectFit={'contain'} w={'30px'} h={'30px'} />
|
<Avatar src={logo} borderRadius={'md'} objectFit={'contain'} w={'30px'} h={'30px'} />
|
||||||
<Box ml={3} fontSize={'lg'} color={'myGray.600'}>
|
<Box ml={3} fontSize={'lg'} color={'myGray.600'}>
|
||||||
|
@@ -202,7 +202,7 @@ function filterQuote({
|
|||||||
const quotePrompt =
|
const quotePrompt =
|
||||||
filterQuoteQA.length > 0
|
filterQuoteQA.length > 0
|
||||||
? `下面是知识库内容:
|
? `下面是知识库内容:
|
||||||
${filterQuoteQA.map((item, i) => `${i + 1}. [${item.q}\n${item.a}]`).join('\n')}
|
${filterQuoteQA.map((item) => `{Q:${item.q},A:${item.a}}`).join('\n')}
|
||||||
`
|
`
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ function getChatMessages({
|
|||||||
const limitText = (() => {
|
const limitText = (() => {
|
||||||
if (limitPrompt) return limitPrompt;
|
if (limitPrompt) return limitPrompt;
|
||||||
if (quotePrompt && !limitPrompt) {
|
if (quotePrompt && !limitPrompt) {
|
||||||
return '根据知识库内容回答问题,仅回复知识库提供的内容,不要对知识库内容做补充说明。';
|
return '严格按照知识库提供的内容回答,不要做过多补充。';
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
})();
|
})();
|
||||||
|
1
docSite/docs/flow-modules/modules/contentExtraction.md
Normal file
1
docSite/docs/flow-modules/modules/contentExtraction.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# 内容提取
|
1
docSite/docs/flow-modules/modules/http.md
Normal file
1
docSite/docs/flow-modules/modules/http.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# HTTP 模块
|
@@ -76,6 +76,13 @@ FastGpt V4 后将采用新的交互方式来构建 AI 应用。使用了 Flow
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## 如何连接模块
|
||||||
|
|
||||||
|
1. 为了方便识别不同输入输出的类型,FastGPT 给每个模块的输入输出连接点不同的颜色,你可以把相同颜色的连接点连接起来。其中,灰色代表任意类型,可以随意连接。
|
||||||
|
2. 位于左侧的连接点为输入,右侧的为输出,连接只能将一个输入和输出连接起来,不能输入和输入/输出和输出项链。
|
||||||
|
3. 可以点击连接线中间的 x 来删除连接线。
|
||||||
|
4. 可以左键点击选中连接线
|
||||||
|
|
||||||
## 如何阅读?
|
## 如何阅读?
|
||||||
|
|
||||||
1. 建议从左往右阅读。
|
1. 建议从左往右阅读。
|
||||||
|
@@ -0,0 +1 @@
|
|||||||
|
# 内容提取
|
@@ -0,0 +1 @@
|
|||||||
|
# HTTP 模块
|
@@ -4,12 +4,16 @@ sidebar_position: 2
|
|||||||
|
|
||||||
# 全局变量
|
# 全局变量
|
||||||
|
|
||||||
|
## 特点
|
||||||
|
|
||||||
- 仅可添加 1 个
|
- 仅可添加 1 个
|
||||||
- 手动配置
|
- 手动配置
|
||||||
- 对其他模块有影响
|
- 对其他模块有影响
|
||||||
- 可作为用户引导
|
- 可作为用户引导
|
||||||
|
|
||||||
可以在对话前设置一些问题,让用户输入或选择,并将用户输入/选择的结果注入到其他模块中。目前仅会注入到 string 类型的数据里(对应蓝色的圆圈)。
|
## 说明
|
||||||
|
|
||||||
|
可以在对话前设置一些问题,让用户输入或选择,并将用户输入/选择的结果注入到其他模块中。目前仅会注入到 string 类型的数据里(对应蓝色圆圈的输入)。
|
||||||
|
|
||||||
如下图,定义了两个变量:目标语言和下拉框测试(忽略)
|
如下图,定义了两个变量:目标语言和下拉框测试(忽略)
|
||||||
|
|
||||||
@@ -20,3 +24,9 @@ sidebar_position: 2
|
|||||||
通过完整对话记录我们可以看到,实际的限定词从:“将我的问题直接翻译成{{language}}” 变成了 “将我的问题直接翻译成英语”,因为 {{language}} 被变量替换了。
|
通过完整对话记录我们可以看到,实际的限定词从:“将我的问题直接翻译成{{language}}” 变成了 “将我的问题直接翻译成英语”,因为 {{language}} 被变量替换了。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## 系统级变量
|
||||||
|
|
||||||
|
除了用户自定义设置的变量外,还会有一些系统变量:
|
||||||
|
|
||||||
|
cTime: 当前时间,例如:2023/3/3 20:22
|
||||||
|
Reference in New Issue
Block a user