mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-21 11:30:06 +00:00
docs: update the framework of doc site (#207)
Signed-off-by: Carson Yang <yangchuansheng33@gmail.com>
This commit is contained in:
35
docSite/content/docs/workflow/modules/variable.md
Normal file
35
docSite/content/docs/workflow/modules/variable.md
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
title: "全局变量"
|
||||
description: "FastGPT 全局变量模块介绍"
|
||||
icon: "variables"
|
||||
draft: false
|
||||
toc: true
|
||||
weight: 422
|
||||
---
|
||||
|
||||
## 特点
|
||||
|
||||
- 仅可添加 1 个
|
||||
- 需要手动配置
|
||||
- 对其他模块有影响
|
||||
- 可作为用户引导
|
||||
|
||||
## 说明
|
||||
|
||||
可以在对话前设置一些问题,让用户输入或选择,并将用户输入/选择的结果注入到其他模块中。目前仅会注入到 string 类型的数据里(对应蓝色圆圈的输入)。
|
||||
|
||||
如下图,定义了两个变量:目标语言和下拉框测试(忽略)
|
||||
|
||||
用户在对话前会被要求先填写目标语言,配合用户引导,我们就构建了一个简单的翻译机器人。**目标语言**的 `key:language` 被写入到【AI 对话】模块的限定词里。
|
||||
|
||||

|
||||
|
||||
通过完整对话记录我们可以看到,实际的限定词从:“将我的问题直接翻译成{{language}}” 变成了 “将我的问题直接翻译成英语”,因为 {{language}} 被变量替换了。
|
||||
|
||||

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