From bfac393ab1c6d0e488430bc41eff8afdeefa5ced Mon Sep 17 00:00:00 2001
From: Archer <545436317@qq.com>
Date: Mon, 16 Dec 2024 13:49:31 +0800
Subject: [PATCH] Add question guide config (#3403)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* feat:Prompt task (#3337)
* feat:猜你想问自定义功能
* 修改用户输入框部分,去除冗余代码
* 删除不必要的属性
* 删除多余内容
* 修正了格式问题,并实现获取调试和app最新参数
* 修正了几行代码
* feat:Prompt task (#3337)
* feat:猜你想问自定义功能
* 修改用户输入框部分,去除冗余代码
* 删除不必要的属性
* 删除多余内容
* 修正了格式问题,并实现获取调试和app最新参数
* 修正了几行代码
* perf: question gudide code
* fix: i18n
* hunyuan logo
* fix: cq templates
* perf: create question guide code
* udpate svg
---------
Co-authored-by: Jiangween <145003935+Jiangween@users.noreply.github.com>
---
.../zh-cn/docs/development/configuration.md | 2 +-
.../zh-cn/docs/development/openapi/chat.md | 79 +++++++
.../zh-cn/docs/development/upgrading/4816.md | 13 +-
packages/global/core/ai/prompt/agent.ts | 10 +
packages/global/core/app/constants.ts | 10 +-
packages/global/core/app/type.d.ts | 10 +-
packages/global/core/workflow/utils.ts | 15 +-
.../plugins/src/Doc2X/PDF2text/template.json | 4 +-
packages/plugins/src/bing/template.json | 4 +-
.../src/databaseConnection/template.json | 4 +-
.../src/drawing/baseChart/template.json | 4 +-
packages/plugins/src/google/template.json | 4 +-
packages/plugins/src/wiki/template.json | 4 +-
.../core/ai/functions/createQuestionGuide.ts | 32 +--
packages/service/core/app/schema.ts | 2 +-
.../common/Icon/icons/core/chat/QGFill.svg | 11 +-
.../Textarea/CustomPromptEditor/index.tsx | 158 ++++++++++++++
packages/web/i18n/en/app.json | 4 +
packages/web/i18n/en/common.json | 9 +-
packages/web/i18n/zh-CN/app.json | 4 +
packages/web/i18n/zh-CN/common.json | 9 +-
packages/web/i18n/zh-Hant/app.json | 4 +
packages/web/i18n/zh-Hant/common.json | 9 +-
.../appMarketTemplates/CQ/template.json | 118 +++--------
.../appMarketTemplates/Chinese/template.json | 6 +-
.../TranslateRobot/template.json | 6 +-
.../animalLife/template.json | 6 +-
.../chatGuide/template.json | 68 +-----
.../divination/template.json | 6 +-
.../githubIssue/template.json | 6 +-
.../appMarketTemplates/google/template.json | 6 +-
.../longTranslate/template.json | 6 +-
.../simpleDatasetChat/template.json | 51 +----
.../srt-translate/template.json | 6 +-
.../appMarketTemplates/stock/template.json | 6 +-
.../app/public/imgs/app/nextQuestion-icon.svg | 20 +-
projects/app/public/imgs/app/nextQuestion.svg | 112 +++++-----
projects/app/public/imgs/model/hunyuan.svg | 13 ++
projects/app/public/imgs/model/minimax.svg | 11 +-
.../app/src/components/core/app/QGConfig.tsx | 194 ++++++++++++++++++
.../app/src/components/core/app/QGSwitch.tsx | 22 --
projects/app/src/components/core/app/Tip.tsx | 2 +-
.../chat/ChatContainer/ChatBox/Provider.tsx | 26 ++-
.../core/chat/ChatContainer/ChatBox/index.tsx | 5 +-
.../core/ai/agent/v2/createQuestionGuide.ts | 27 ++-
.../detail/components/SimpleApp/EditForm.tsx | 8 +-
.../components/SimpleApp/useSnapshots.tsx | 4 +-
.../Flow/nodes/NodeSystemConfig.tsx | 18 +-
.../app/src/pages/price/components/Points.tsx | 2 +-
projects/app/src/web/core/app/templates.ts | 12 +-
50 files changed, 775 insertions(+), 397 deletions(-)
create mode 100644 packages/web/components/common/Textarea/CustomPromptEditor/index.tsx
create mode 100644 projects/app/public/imgs/model/hunyuan.svg
create mode 100644 projects/app/src/components/core/app/QGConfig.tsx
delete mode 100644 projects/app/src/components/core/app/QGSwitch.tsx
diff --git a/docSite/content/zh-cn/docs/development/configuration.md b/docSite/content/zh-cn/docs/development/configuration.md
index 06e4e2b79..eb5b6b653 100644
--- a/docSite/content/zh-cn/docs/development/configuration.md
+++ b/docSite/content/zh-cn/docs/development/configuration.md
@@ -201,7 +201,7 @@ weight: 708
- /imgs/model/qwen.svg - 通义千问
- /imgs/model/sparkDesk.svg - 讯飞星火
- /imgs/model/yi.svg - 零一万物
--
+- /imgs/model/hunyuan.svg - 腾讯混元
## 特殊模型
diff --git a/docSite/content/zh-cn/docs/development/openapi/chat.md b/docSite/content/zh-cn/docs/development/openapi/chat.md
index 3af0542cd..b5f1c276d 100644
--- a/docSite/content/zh-cn/docs/development/openapi/chat.md
+++ b/docSite/content/zh-cn/docs/development/openapi/chat.md
@@ -1313,6 +1313,83 @@ curl --location --request POST 'http://localhost:3000/api/core/chat/feedback/upd
## 猜你想问
+**4.8.16 后新版接口**
+
+新版猜你想问,必须包含 appId 和 chatId 的参数才可以进行使用。会自动根据 chatId 去拉取最近 6 轮对话记录作为上下文来引导回答。
+
+{{< tabs tabTotal="3" >}}
+{{< tab tabName="请求示例" >}}
+{{< markdownify >}}
+
+```bash
+curl --location --request POST 'http://localhost:3000/api/core/ai/agent/v2/createQuestionGuide' \
+--header 'Authorization: Bearer {{apikey}}' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+ "appId": "appId",
+ "chatId": "chatId",
+ "questionGuide": {
+ "open": true,
+ "model": "GPT-4o-mini",
+ "customPrompt": "你是一个智能助手,请根据用户的问题生成猜你想问。"
+ }
+}'
+```
+
+{{< /markdownify >}}
+{{< /tab >}}
+
+{{< tab tabName="参数说明" >}}
+{{< markdownify >}}
+
+{{% alert icon=" " context="success" %}}
+
+| 参数名 | 类型 | 必填 | 说明 |
+| --- | --- | --- | --- |
+| appId | string | ✅ | 应用 Id |
+| chatId | string | ✅ | 对话 Id |
+| questionGuide | object | | 自定义配置,不传的话,则会根据 appId,取最新发布版本的配置 |
+
+```ts
+type CreateQuestionGuideParams = OutLinkChatAuthProps & {
+ appId: string;
+ chatId: string;
+ questionGuide?: {
+ open: boolean;
+ model?: string;
+ customPrompt?: string;
+ };
+};
+```
+
+{{% /alert %}}
+
+{{< /markdownify >}}
+{{< /tab >}}
+
+{{< tab tabName="响应示例" >}}
+{{< markdownify >}}
+
+```json
+{
+ "code": 200,
+ "statusText": "",
+ "message": "",
+ "data": [
+ "你对AI有什么看法?",
+ "想了解AI的应用吗?",
+ "你希望AI能做什么?"
+ ]
+}
+```
+{{< /markdownify >}}
+{{< /tab >}}
+{{< /tabs >}}
+
+---
+
+**4.8.16 前旧版接口:**
+
{{< tabs tabTotal="3" >}}
{{< tab tabName="请求示例" >}}
{{< markdownify >}}
@@ -1369,3 +1446,5 @@ curl --location --request POST 'http://localhost:3000/api/core/ai/agent/createQu
+
+
diff --git a/docSite/content/zh-cn/docs/development/upgrading/4816.md b/docSite/content/zh-cn/docs/development/upgrading/4816.md
index 1ad3e672e..12260fb5e 100644
--- a/docSite/content/zh-cn/docs/development/upgrading/4816.md
+++ b/docSite/content/zh-cn/docs/development/upgrading/4816.md
@@ -12,9 +12,10 @@ weight: 808
1.
2. 新增 - 商业版支持 API 知识库和链接集合定时同步。
-3. 优化 - 工作流/简易模式变量初始化代码,去除监听初始化,避免因渲染顺序不一致导致的失败。
-4. 修复 - 无法自动切换默认语言。增加分享链接,强制执行一次切换默认语言。
-5. 修复 - 数组选择器自动兼容 4.8.13 以前的数据。
-6. 修复 - 站点同步知识库,链接同步时未使用选择器。
-7. 修复 - 简易模式转工作流,没有把系统配置项转化。
-8. 修复 - 插件独立运行,变量初始值未赋上。
\ No newline at end of file
+3. 新增 - 猜你想问支持选择模型和自定义提示词。
+4. 优化 - 工作流/简易模式变量初始化代码,去除监听初始化,避免因渲染顺序不一致导致的失败。
+5. 修复 - 无法自动切换默认语言。增加分享链接,强制执行一次切换默认语言。
+6. 修复 - 数组选择器自动兼容 4.8.13 以前的数据。
+7. 修复 - 站点同步知识库,链接同步时未使用选择器。
+8. 修复 - 简易模式转工作流,没有把系统配置项转化。
+9. 修复 - 插件独立运行,变量初始值未赋上。
\ No newline at end of file
diff --git a/packages/global/core/ai/prompt/agent.ts b/packages/global/core/ai/prompt/agent.ts
index ca93dc83d..ea3362ed8 100644
--- a/packages/global/core/ai/prompt/agent.ts
+++ b/packages/global/core/ai/prompt/agent.ts
@@ -65,3 +65,13 @@ export const Prompt_CQJson = `请帮我执行一个“问题分类”任务,
问题:"{{question}}"
类型ID=
`;
+
+export const PROMPT_QUESTION_GUIDE = `You are an AI assistant tasked with predicting the user's next question based on the conversation history. Your goal is to generate 3 potential questions that will guide the user to continue the conversation. When generating these questions, adhere to the following rules:
+
+1. Use the same language as the user's last question in the conversation history.
+2. Keep each question under 20 characters in length.
+
+Analyze the conversation history provided to you and use it as context to generate relevant and engaging follow-up questions. Your predictions should be logical extensions of the current topic or related areas that the user might be interested in exploring further.
+
+Remember to maintain consistency in tone and style with the existing conversation while providing diverse options for the user to choose from. Your goal is to keep the conversation flowing naturally and help the user delve deeper into the subject matter or explore related topics.`;
+export const PROMPT_QUESTION_GUIDE_FOOTER = `Please strictly follow the format rules: \nReturn questions in JSON format: ['Question 1', 'Question 2', 'Question 3']. Your output: `;
diff --git a/packages/global/core/app/constants.ts b/packages/global/core/app/constants.ts
index 62d1f5874..ba9485036 100644
--- a/packages/global/core/app/constants.ts
+++ b/packages/global/core/app/constants.ts
@@ -1,8 +1,10 @@
+import { PROMPT_QUESTION_GUIDE } from '../ai/prompt/agent';
import {
AppTTSConfigType,
AppFileSelectConfigType,
AppWhisperConfigType,
- AppAutoExecuteConfigType
+ AppAutoExecuteConfigType,
+ AppQGConfigType
} from './type';
export enum AppTypeEnum {
@@ -28,6 +30,12 @@ export const defaultWhisperConfig: AppWhisperConfigType = {
autoTTSResponse: false
};
+export const defaultQGConfig: AppQGConfigType = {
+ open: false,
+ model: 'gpt-4o-mini',
+ customPrompt: PROMPT_QUESTION_GUIDE
+};
+
export const defaultChatInputGuideConfig = {
open: false,
textList: [],
diff --git a/packages/global/core/app/type.d.ts b/packages/global/core/app/type.d.ts
index b735a1e30..c10ab9ddc 100644
--- a/packages/global/core/app/type.d.ts
+++ b/packages/global/core/app/type.d.ts
@@ -97,7 +97,7 @@ export type AppChatConfigType = {
welcomeText?: string;
variables?: VariableItemType[];
autoExecute?: AppAutoExecuteConfigType;
- questionGuide?: boolean;
+ questionGuide?: AppQGConfigType;
ttsConfig?: AppTTSConfigType;
whisperConfig?: AppWhisperConfigType;
scheduledTriggerConfig?: AppScheduledTriggerConfigType;
@@ -148,6 +148,14 @@ export type AppWhisperConfigType = {
autoSend: boolean;
autoTTSResponse: boolean;
};
+
+// question guide
+export type AppQGConfigType = {
+ open: boolean;
+ model?: string;
+ customPrompt?: string;
+};
+
// question guide text
export type ChatInputGuideConfigType = {
open: boolean;
diff --git a/packages/global/core/workflow/utils.ts b/packages/global/core/workflow/utils.ts
index 3e082c235..06307c403 100644
--- a/packages/global/core/workflow/utils.ts
+++ b/packages/global/core/workflow/utils.ts
@@ -26,12 +26,14 @@ import type {
AppScheduledTriggerConfigType,
ChatInputGuideConfigType,
AppChatConfigType,
- AppAutoExecuteConfigType
+ AppAutoExecuteConfigType,
+ AppQGConfigType
} from '../app/type';
import { EditorVariablePickerType } from '../../../web/components/common/Textarea/PromptEditor/type';
import {
defaultAutoExecuteConfig,
defaultChatInputGuideConfig,
+ defaultQGConfig,
defaultTTSConfig,
defaultWhisperConfig
} from '../app/constants';
@@ -76,9 +78,14 @@ export const splitGuideModule = (guideModules?: StoreNodeItemType) => {
const variables: VariableItemType[] =
guideModules?.inputs.find((item) => item.key === NodeInputKeyEnum.variables)?.value ?? [];
- const questionGuide: boolean =
- !!guideModules?.inputs?.find((item) => item.key === NodeInputKeyEnum.questionGuide)?.value ??
- false;
+ // Adapt old version
+ const questionGuideVal = guideModules?.inputs?.find(
+ (item) => item.key === NodeInputKeyEnum.questionGuide
+ )?.value;
+ const questionGuide: AppQGConfigType =
+ typeof questionGuideVal === 'boolean'
+ ? { ...defaultQGConfig, open: questionGuideVal }
+ : questionGuideVal ?? defaultQGConfig;
const ttsConfig: AppTTSConfigType =
guideModules?.inputs?.find((item) => item.key === NodeInputKeyEnum.tts)?.value ??
diff --git a/packages/plugins/src/Doc2X/PDF2text/template.json b/packages/plugins/src/Doc2X/PDF2text/template.json
index 9a84c51a6..8d2368967 100644
--- a/packages/plugins/src/Doc2X/PDF2text/template.json
+++ b/packages/plugins/src/Doc2X/PDF2text/template.json
@@ -439,7 +439,9 @@
}
],
"chatConfig": {
- "questionGuide": false,
+ "questionGuide": {
+ "open": false
+ },
"ttsConfig": {
"type": "web"
},
diff --git a/packages/plugins/src/bing/template.json b/packages/plugins/src/bing/template.json
index 65780248c..0cb410b49 100644
--- a/packages/plugins/src/bing/template.json
+++ b/packages/plugins/src/bing/template.json
@@ -489,7 +489,9 @@
"chatConfig": {
"welcomeText": "",
"variables": [],
- "questionGuide": false,
+ "questionGuide": {
+ "open": false
+ },
"ttsConfig": {
"type": "web"
},
diff --git a/packages/plugins/src/databaseConnection/template.json b/packages/plugins/src/databaseConnection/template.json
index 6aaa4cbf3..97caec65e 100644
--- a/packages/plugins/src/databaseConnection/template.json
+++ b/packages/plugins/src/databaseConnection/template.json
@@ -666,7 +666,9 @@
"chatConfig": {
"welcomeText": "",
"variables": [],
- "questionGuide": false,
+ "questionGuide": {
+ "open": false
+ },
"ttsConfig": {
"type": "web"
},
diff --git a/packages/plugins/src/drawing/baseChart/template.json b/packages/plugins/src/drawing/baseChart/template.json
index c249ced14..1fe584558 100644
--- a/packages/plugins/src/drawing/baseChart/template.json
+++ b/packages/plugins/src/drawing/baseChart/template.json
@@ -502,7 +502,9 @@
"chatConfig": {
"welcomeText": "",
"variables": [],
- "questionGuide": false,
+ "questionGuide": {
+ "open": false
+ },
"ttsConfig": {
"type": "web"
},
diff --git a/packages/plugins/src/google/template.json b/packages/plugins/src/google/template.json
index 9ceab6be2..7009049ae 100644
--- a/packages/plugins/src/google/template.json
+++ b/packages/plugins/src/google/template.json
@@ -538,7 +538,9 @@
"chatConfig": {
"welcomeText": "",
"variables": [],
- "questionGuide": false,
+ "questionGuide": {
+ "open": false
+ },
"ttsConfig": {
"type": "web"
},
diff --git a/packages/plugins/src/wiki/template.json b/packages/plugins/src/wiki/template.json
index c9a98e427..c52da3d9c 100644
--- a/packages/plugins/src/wiki/template.json
+++ b/packages/plugins/src/wiki/template.json
@@ -320,7 +320,9 @@
"chatConfig": {
"welcomeText": "",
"variables": [],
- "questionGuide": false,
+ "questionGuide": {
+ "open": false
+ },
"ttsConfig": {
"type": "web"
},
diff --git a/packages/service/core/ai/functions/createQuestionGuide.ts b/packages/service/core/ai/functions/createQuestionGuide.ts
index bb332180c..0124536be 100644
--- a/packages/service/core/ai/functions/createQuestionGuide.ts
+++ b/packages/service/core/ai/functions/createQuestionGuide.ts
@@ -3,29 +3,30 @@ import { createChatCompletion } from '../config';
import { countGptMessagesTokens } from '../../../common/string/tiktoken/index';
import { loadRequestMessages } from '../../chat/utils';
import { llmCompletionsBodyFormat } from '../utils';
-
-export const Prompt_QuestionGuide = `You are an AI assistant tasked with predicting the user's next question based on the conversation history. Your goal is to generate 3 potential questions that will guide the user to continue the conversation. When generating these questions, adhere to the following rules:
-
-1. Use the same language as the user's last question in the conversation history.
-2. Keep each question under 20 characters in length.
-3. Return the questions in JSON format: ["question1", "question2", "question3"].
-
-Analyze the conversation history provided to you and use it as context to generate relevant and engaging follow-up questions. Your predictions should be logical extensions of the current topic or related areas that the user might be interested in exploring further.
-
-Remember to maintain consistency in tone and style with the existing conversation while providing diverse options for the user to choose from. Your goal is to keep the conversation flowing naturally and help the user delve deeper into the subject matter or explore related topics.`;
+import {
+ PROMPT_QUESTION_GUIDE,
+ PROMPT_QUESTION_GUIDE_FOOTER
+} from '@fastgpt/global/core/ai/prompt/agent';
+import { addLog } from '../../../common/system/log';
+import json5 from 'json5';
export async function createQuestionGuide({
messages,
- model
+ model,
+ customPrompt
}: {
messages: ChatCompletionMessageParam[];
model: string;
-}) {
+ customPrompt?: string;
+}): Promise<{
+ result: string[];
+ tokens: number;
+}> {
const concatMessages: ChatCompletionMessageParam[] = [
...messages,
{
role: 'user',
- content: Prompt_QuestionGuide
+ content: `${customPrompt || PROMPT_QUESTION_GUIDE}\n${PROMPT_QUESTION_GUIDE_FOOTER}`
}
];
@@ -53,6 +54,7 @@ export async function createQuestionGuide({
const tokens = await countGptMessagesTokens(concatMessages);
if (start === -1 || end === -1) {
+ addLog.warn('Create question guide error', { answer });
return {
result: [],
tokens: 0
@@ -66,10 +68,12 @@ export async function createQuestionGuide({
try {
return {
- result: JSON.parse(jsonStr),
+ result: json5.parse(jsonStr),
tokens
};
} catch (error) {
+ console.log(error);
+
return {
result: [],
tokens: 0
diff --git a/packages/service/core/app/schema.ts b/packages/service/core/app/schema.ts
index 4e396d40e..ce042a500 100644
--- a/packages/service/core/app/schema.ts
+++ b/packages/service/core/app/schema.ts
@@ -11,7 +11,7 @@ export const AppCollectionName = 'apps';
export const chatConfigType = {
welcomeText: String,
variables: Array,
- questionGuide: Boolean,
+ questionGuide: Object,
ttsConfig: Object,
whisperConfig: Object,
scheduledTriggerConfig: Object,
diff --git a/packages/web/components/common/Icon/icons/core/chat/QGFill.svg b/packages/web/components/common/Icon/icons/core/chat/QGFill.svg
index 1974fb398..3257f19ab 100644
--- a/packages/web/components/common/Icon/icons/core/chat/QGFill.svg
+++ b/packages/web/components/common/Icon/icons/core/chat/QGFill.svg
@@ -1 +1,10 @@
-
\ No newline at end of file
+
diff --git a/packages/web/components/common/Textarea/CustomPromptEditor/index.tsx b/packages/web/components/common/Textarea/CustomPromptEditor/index.tsx
new file mode 100644
index 000000000..776dcf4af
--- /dev/null
+++ b/packages/web/components/common/Textarea/CustomPromptEditor/index.tsx
@@ -0,0 +1,158 @@
+import {
+ Box,
+ Button,
+ Flex,
+ Textarea,
+ ModalFooter,
+ HStack,
+ Icon,
+ ModalBody
+} from '@chakra-ui/react';
+import MyIcon from '../../Icon/index';
+
+import React, { useCallback, useEffect, useRef, useState } from 'react';
+import { useTranslation } from 'next-i18next';
+import MyModal from '../../MyModal';
+
+const CustomLightTip = () => {
+ const { t } = useTranslation();
+
+ return (
+
+
+
+ {t('common:core.app.QG.Custom prompt tip1')}
+
+ {t('common:core.app.QG.Custom prompt tip2')}
+
+ {t('common:core.app.QG.Custom prompt tip3')}
+
+
+ );
+};
+
+const FixBox = ({ children }: { children: React.ReactNode }) => {
+ return (
+
+
+ {children}
+
+
+ );
+};
+
+const CustomPromptEditor = ({
+ defaultValue = '',
+ defaultPrompt,
+ footerPrompt,
+ onChange,
+ onClose
+}: {
+ defaultValue?: string;
+ defaultPrompt: string;
+ footerPrompt?: string;
+ onChange: (e: string) => void;
+ onClose: () => void;
+}) => {
+ const ref = useRef(null);
+ const { t } = useTranslation();
+ const [value, setValue] = useState(defaultValue || defaultPrompt);
+
+ const adjustHeight = useCallback(() => {
+ const textarea = ref.current;
+ if (!textarea) return;
+
+ textarea.style.height = '22px';
+ textarea.style.height = `${textarea.scrollHeight}px`;
+ }, []);
+
+ useEffect(() => {
+ adjustHeight();
+ const timer = setTimeout(adjustHeight, 0);
+ return () => clearTimeout(timer);
+ }, [value, adjustHeight]);
+
+ return (
+
+
+
+
+
+
+ {t('common:core.ai.Prompt')}
+
+
+ }
+ px={2}
+ onClick={() => setValue(defaultPrompt)}
+ >
+ {t('common:common.Reset')}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
+
+export default CustomPromptEditor;
diff --git a/packages/web/i18n/en/app.json b/packages/web/i18n/en/app.json
index 957a33d87..19fe4d351 100644
--- a/packages/web/i18n/en/app.json
+++ b/packages/web/i18n/en/app.json
@@ -22,10 +22,13 @@
"chat_logs": "Conversation Logs",
"chat_logs_tips": "Logs will record the online, shared, and API (requires chatId) conversation records of this app.",
"config_file_upload": "Click to Configure File Upload Rules",
+ "config_question_guide": "Configuration guess you want to ask",
"confirm_copy_app_tip": "The system will create an app with the same configuration for you, but permissions will not be copied. Please confirm!",
"confirm_del_app_tip": "Are you sure you want to delete 【{{name}}】 and all of its chat history?",
"confirm_delete_folder_tip": "Confirm to delete this folder? All apps and corresponding conversation records under it will be deleted. Please confirm!",
"copy_one_app": "Create Duplicate",
+ "core.app.QG.Switch": "Enable guess what you want to ask",
+ "core.dataset.import.Custom prompt": "Custom Prompt",
"create_copy_success": "Duplicate Created Successfully",
"create_empty_app": "Create Default App",
"create_empty_plugin": "Create Default Plugin",
@@ -94,6 +97,7 @@
"plugin_dispatch_tip": "Adds extra capabilities to the model. The specific plugins to be invoked will be autonomously decided by the model.\nIf a plugin is selected, the Dataset invocation will automatically be treated as a special plugin.",
"publish_channel": "Publish Channel",
"publish_success": "Publish Successful",
+ "question_guide_tip": "After the conversation, 3 guiding questions will be generated for you.",
"saved_success": "Save Successful",
"search_app": "Search Application",
"setting_app": "Application Settings",
diff --git a/packages/web/i18n/en/common.json b/packages/web/i18n/en/common.json
index 427fdb794..500ad3551 100644
--- a/packages/web/i18n/en/common.json
+++ b/packages/web/i18n/en/common.json
@@ -168,6 +168,7 @@
"common.Rename": "Rename",
"common.Request Error": "Request Error",
"common.Require Input": "Required",
+ "common.Reset": "Reset",
"common.Restart": "Restart",
"common.Role": "Permission",
"common.Root folder": "Root Folder",
@@ -289,8 +290,12 @@
"core.app.Publish": "Publish",
"core.app.Publish Confirm": "Confirm to Publish App? This Will Immediately Update the App Status on All Publishing Channels.",
"core.app.Publish app tip": "After Publishing the App, All Publishing Channels Will Immediately Use This Version",
+ "core.app.QG.Custom prompt tip": "To ensure the generated content follows the correct format, [Yellow Prompt] cannot be modified",
+ "core.app.QG.Custom prompt tip1": "To ensure the generated content follows the correct format, ",
+ "core.app.QG.Custom prompt tip2": "[Yellow Prompt]",
+ "core.app.QG.Custom prompt tip3": " cannot be modified",
+ "core.app.QG.Fixed Prompt": "Please strictly follow the format rules: \nReturn questions in JSON format: ['Question 1', 'Question 2', 'Question 3'].",
"core.app.Question Guide": "Guess What You Want to Ask",
- "core.app.Question Guide Tip": "After the conversation ends, 3 guiding questions will be generated.",
"core.app.Quote prompt": "Quote Template Prompt",
"core.app.Quote templates": "Quote Content Templates",
"core.app.Random": "Divergent",
@@ -967,6 +972,7 @@
"plugin.contribute": "Contribute Plugin",
"plugin.go to laf": "Go to Write",
"plugin.path": "Path",
+ "prompt_input_placeholder": "Please enter the prompt word",
"required": "Required",
"resume_failed": "Resume Failed",
"select_reference_variable": "Select Reference Variable",
@@ -1139,6 +1145,7 @@
"textarea_variable_picker_tip": "Enter \"/\" to select a variable",
"unit.character": "Character",
"unit.minute": "Minute",
+ "unit.seconds": "Second",
"unusable_variable": "No Usable Variables",
"upload_file_error": "File Upload Failed",
"user.Account": "Account",
diff --git a/packages/web/i18n/zh-CN/app.json b/packages/web/i18n/zh-CN/app.json
index d68d6c50b..857bb2d5d 100644
--- a/packages/web/i18n/zh-CN/app.json
+++ b/packages/web/i18n/zh-CN/app.json
@@ -22,10 +22,13 @@
"chat_logs": "对话日志",
"chat_logs_tips": "日志会记录该应用的在线、分享和 API(需填写 chatId)对话记录",
"config_file_upload": "点击配置文件上传规则",
+ "config_question_guide": "配置猜你想问",
"confirm_copy_app_tip": "系统将为您创建一个相同配置应用,但权限不会进行复制,请确认!",
"confirm_del_app_tip": "确认删除 【{{name}}】 及其所有聊天记录?",
"confirm_delete_folder_tip": "确认删除该文件夹?将会删除它下面所有应用及对应的聊天记录,请确认!",
"copy_one_app": "创建副本",
+ "core.app.QG.Switch": "启用猜你想问",
+ "core.dataset.import.Custom prompt": "自定义提示词",
"create_copy_success": "创建副本成功",
"create_empty_app": "创建空白应用",
"create_empty_plugin": "创建空白插件",
@@ -94,6 +97,7 @@
"plugin_dispatch_tip": "给模型附加获取外部数据的能力,具体调用哪些插件,将由模型自主决定,所有插件都将以非流模式运行。\n若选择了插件,知识库调用将自动作为一个特殊的插件。",
"publish_channel": "发布渠道",
"publish_success": "发布成功",
+ "question_guide_tip": "对话结束后,会为你生成 3 个引导性问题。",
"saved_success": "保存成功",
"search_app": "搜索应用",
"setting_app": "应用配置",
diff --git a/packages/web/i18n/zh-CN/common.json b/packages/web/i18n/zh-CN/common.json
index 834abc46d..69527e0e2 100644
--- a/packages/web/i18n/zh-CN/common.json
+++ b/packages/web/i18n/zh-CN/common.json
@@ -168,6 +168,7 @@
"common.Rename": "重命名",
"common.Request Error": "请求异常",
"common.Require Input": "必填",
+ "common.Reset": "恢复默认",
"common.Restart": "重新开始",
"common.Role": "权限",
"common.Root folder": "根目录",
@@ -288,8 +289,12 @@
"core.app.Publish": "发布",
"core.app.Publish Confirm": "确认发布应用?会立即更新所有发布渠道的应用状态。",
"core.app.Publish app tip": "发布应用后,所有发布渠道将会立即使用该版本",
+ "core.app.QG.Custom prompt tip": "为保证生成的内容遵循正确格式,【黄色部分提示词】不允许修改",
+ "core.app.QG.Custom prompt tip1": "为保证生成的内容遵循正确格式,",
+ "core.app.QG.Custom prompt tip2": "【黄色部分提示词】",
+ "core.app.QG.Custom prompt tip3": "不允许修改",
+ "core.app.QG.Fixed Prompt": "请严格遵循格式规则:以 JSON 格式返回题目:\n['问题1','问题2','问题3']。",
"core.app.Question Guide": "猜你想问",
- "core.app.Question Guide Tip": "对话结束后,会为生成 3 个引导性问题。",
"core.app.Quote prompt": "引用模板提示词",
"core.app.Quote templates": "引用内容模板",
"core.app.Random": "发散",
@@ -966,6 +971,7 @@
"plugin.contribute": "贡献插件",
"plugin.go to laf": "去编写",
"plugin.path": "路径",
+ "prompt_input_placeholder": "请输入提示词",
"required": "必须",
"resume_failed": "恢复失败",
"select_reference_variable": "选择引用变量",
@@ -1138,6 +1144,7 @@
"textarea_variable_picker_tip": "输入\"/\"可选择变量",
"unit.character": "字符",
"unit.minute": "分钟",
+ "unit.seconds": "秒",
"unusable_variable": "无可用变量",
"upload_file_error": "上传文件失败",
"user.Account": "账号",
diff --git a/packages/web/i18n/zh-Hant/app.json b/packages/web/i18n/zh-Hant/app.json
index daf7e1144..29a8bf152 100644
--- a/packages/web/i18n/zh-Hant/app.json
+++ b/packages/web/i18n/zh-Hant/app.json
@@ -22,10 +22,13 @@
"chat_logs": "對話紀錄",
"chat_logs_tips": "紀錄會記錄此應用程式的線上、分享和 API(需填寫 chatId)對話紀錄",
"config_file_upload": "點選設定檔案上傳規則",
+ "config_question_guide": "配置猜你想問",
"confirm_copy_app_tip": "系統將為您建立一個相同設定的應用程式,但權限不會複製,請確認!",
"confirm_del_app_tip": "確認刪除【{{name}}】及其所有聊天紀錄?",
"confirm_delete_folder_tip": "確認刪除這個資料夾?將會刪除它底下所有應用程式及對應的對話紀錄,請確認!",
"copy_one_app": "建立副本",
+ "core.app.QG.Switch": "啟用猜你想問",
+ "core.dataset.import.Custom prompt": "自訂提示詞",
"create_copy_success": "建立副本成功",
"create_empty_app": "建立空白應用程式",
"create_empty_plugin": "建立空白外掛",
@@ -94,6 +97,7 @@
"plugin_dispatch_tip": "賦予模型取得外部資料的能力,具體呼叫哪些外掛,將由模型自主決定,所有外掛都將以非串流模式執行。\n若選擇了外掛,知識庫呼叫將自動作為一個特殊的外掛。",
"publish_channel": "發布通道",
"publish_success": "發布成功",
+ "question_guide_tip": "對話結束後,會為你產生 3 個引導性問題。",
"saved_success": "儲存成功",
"search_app": "搜尋應用程式",
"setting_app": "應用程式設定",
diff --git a/packages/web/i18n/zh-Hant/common.json b/packages/web/i18n/zh-Hant/common.json
index ac1618ec9..ce6417a1a 100644
--- a/packages/web/i18n/zh-Hant/common.json
+++ b/packages/web/i18n/zh-Hant/common.json
@@ -168,6 +168,7 @@
"common.Rename": "重新命名",
"common.Request Error": "請求錯誤",
"common.Require Input": "必填",
+ "common.Reset": "恢復預設",
"common.Restart": "重新開始",
"common.Role": "權限",
"common.Root folder": "根目錄",
@@ -289,8 +290,12 @@
"core.app.Publish": "發布",
"core.app.Publish Confirm": "確認發布應用程式?這將立即更新所有發布管道的應用程式狀態。",
"core.app.Publish app tip": "發布應用程式後,所有發布管道將立即使用此版本",
+ "core.app.QG.Custom prompt tip": "為確保生成的內容遵循正確格式,【黃色部分提示詞】不允許修改",
+ "core.app.QG.Custom prompt tip1": "為確保生成的內容遵循正確格式,",
+ "core.app.QG.Custom prompt tip2": "【黃色部分提示詞】",
+ "core.app.QG.Custom prompt tip3": "不允許修改",
+ "core.app.QG.Fixed Prompt": "請嚴格遵循格式規則:以 JSON 格式返回題目:\n['問題1','問題2','問題3']。",
"core.app.Question Guide": "猜你想問",
- "core.app.Question Guide Tip": "對話結束後,系統會產生 3 個引導性問題。",
"core.app.Quote prompt": "引用範本提示詞",
"core.app.Quote templates": "引用內容範本",
"core.app.Random": "發散",
@@ -966,6 +971,7 @@
"plugin.contribute": "貢獻外掛程式",
"plugin.go to laf": "前往編寫",
"plugin.path": "路徑",
+ "prompt_input_placeholder": "請輸入提示詞",
"required": "必填",
"resume_failed": "恢復失敗",
"select_reference_variable": "選擇引用變數",
@@ -1138,6 +1144,7 @@
"textarea_variable_picker_tip": "輸入「/」以選擇變數",
"unit.character": "字元",
"unit.minute": "分鐘",
+ "unit.seconds": "秒",
"unusable_variable": "無可用變數",
"upload_file_error": "上傳檔案失敗",
"user.Account": "帳戶",
diff --git a/projects/app/public/appMarketTemplates/CQ/template.json b/projects/app/public/appMarketTemplates/CQ/template.json
index 69fcdf242..6c04a80d5 100644
--- a/projects/app/public/appMarketTemplates/CQ/template.json
+++ b/projects/app/public/appMarketTemplates/CQ/template.json
@@ -18,56 +18,7 @@
"y": -486.7611729549753
},
"version": "481",
- "inputs": [
- {
- "key": "welcomeText",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "string",
- "label": "core.app.Welcome Text",
- "value": "你好,我是知识库助手,请不要忘记选择知识库噢~\n[你是谁]\n[如何使用]"
- },
- {
- "key": "variables",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "any",
- "label": "core.app.Chat Variable",
- "value": []
- },
- {
- "key": "questionGuide",
- "valueType": "boolean",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "label": "core.app.Question Guide",
- "value": true
- },
- {
- "key": "tts",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "any",
- "label": "",
- "value": {
- "type": "web"
- }
- },
- {
- "key": "whisper",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "any",
- "label": "",
- "value": {
- "open": false,
- "autoSend": false,
- "autoTTSResponse": false
- }
- },
- {
- "key": "scheduleTrigger",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "any",
- "label": "",
- "value": null
- }
- ],
+ "inputs": [],
"outputs": []
},
{
@@ -84,7 +35,7 @@
"inputs": [
{
"key": "userChatInput",
- "renderTypeList": ["FlowNodeInputTypeEnum.reference", "FlowNodeInputTypeEnum.textarea"],
+ "renderTypeList": ["reference", "textarea"],
"valueType": "string",
"label": "用户问题",
"required": true,
@@ -116,17 +67,14 @@
"inputs": [
{
"key": "model",
- "renderTypeList": [
- "FlowNodeInputTypeEnum.settingLLMModel",
- "FlowNodeInputTypeEnum.reference"
- ],
+ "renderTypeList": ["settingLLMModel", "reference"],
"label": "core.module.input.label.aiModel",
"valueType": "string",
"value": "gpt-4o-mini"
},
{
"key": "temperature",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
+ "renderTypeList": ["hidden"],
"label": "",
"value": 3,
"valueType": "number",
@@ -136,7 +84,7 @@
},
{
"key": "maxToken",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
+ "renderTypeList": ["hidden"],
"label": "",
"value": 1950,
"valueType": "number",
@@ -146,26 +94,26 @@
},
{
"key": "isResponseAnswerText",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
+ "renderTypeList": ["hidden"],
"label": "",
"value": true,
"valueType": "boolean"
},
{
"key": "quoteTemplate",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
+ "renderTypeList": ["hidden"],
"label": "",
"valueType": "string"
},
{
"key": "quotePrompt",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
+ "renderTypeList": ["hidden"],
"label": "",
"valueType": "string"
},
{
"key": "systemPrompt",
- "renderTypeList": ["FlowNodeInputTypeEnum.textarea", "FlowNodeInputTypeEnum.reference"],
+ "renderTypeList": ["textarea", "reference"],
"max": 3000,
"valueType": "string",
"label": "core.ai.Prompt",
@@ -175,10 +123,7 @@
},
{
"key": "history",
- "renderTypeList": [
- "FlowNodeInputTypeEnum.numberInput",
- "FlowNodeInputTypeEnum.reference"
- ],
+ "renderTypeList": ["numberInput", "reference"],
"valueType": "chatHistory",
"label": "core.module.input.label.chat history",
"required": true,
@@ -188,7 +133,7 @@
},
{
"key": "userChatInput",
- "renderTypeList": ["FlowNodeInputTypeEnum.reference", "FlowNodeInputTypeEnum.textarea"],
+ "renderTypeList": ["reference", "textarea"],
"valueType": "string",
"label": "用户问题",
"required": true,
@@ -197,7 +142,7 @@
},
{
"key": "quoteQA",
- "renderTypeList": ["FlowNodeInputTypeEnum.settingDatasetQuotePrompt"],
+ "renderTypeList": ["settingDatasetQuotePrompt"],
"label": "",
"debugLabel": "知识库引用",
"description": "",
@@ -239,10 +184,7 @@
"inputs": [
{
"key": "model",
- "renderTypeList": [
- "FlowNodeInputTypeEnum.selectLLMModel",
- "FlowNodeInputTypeEnum.reference"
- ],
+ "renderTypeList": ["selectLLMModel", "reference"],
"label": "core.module.input.label.aiModel",
"required": true,
"valueType": "string",
@@ -251,7 +193,7 @@
},
{
"key": "systemPrompt",
- "renderTypeList": ["FlowNodeInputTypeEnum.textarea", "FlowNodeInputTypeEnum.reference"],
+ "renderTypeList": ["textarea", "reference"],
"max": 3000,
"valueType": "string",
"label": "core.module.input.label.Background",
@@ -261,10 +203,7 @@
},
{
"key": "history",
- "renderTypeList": [
- "FlowNodeInputTypeEnum.numberInput",
- "FlowNodeInputTypeEnum.reference"
- ],
+ "renderTypeList": ["numberInput", "reference"],
"valueType": "chatHistory",
"label": "core.module.input.label.chat history",
"required": true,
@@ -274,7 +213,7 @@
},
{
"key": "userChatInput",
- "renderTypeList": ["FlowNodeInputTypeEnum.reference", "FlowNodeInputTypeEnum.textarea"],
+ "renderTypeList": ["reference", "textarea"],
"valueType": "string",
"label": "用户问题",
"required": true,
@@ -282,7 +221,7 @@
},
{
"key": "agents",
- "renderTypeList": ["FlowNodeInputTypeEnum.custom"],
+ "renderTypeList": ["custom"],
"valueType": "any",
"label": "",
"value": [
@@ -325,7 +264,7 @@
"inputs": [
{
"key": "text",
- "renderTypeList": ["FlowNodeInputTypeEnum.textarea", "FlowNodeInputTypeEnum.reference"],
+ "renderTypeList": ["textarea", "reference"],
"valueType": "string",
"label": "core.module.input.label.Response content",
"description": "core.module.input.description.Response content",
@@ -351,10 +290,7 @@
"inputs": [
{
"key": "datasets",
- "renderTypeList": [
- "FlowNodeInputTypeEnum.selectDataset",
- "FlowNodeInputTypeEnum.reference"
- ],
+ "renderTypeList": ["selectDataset", "reference"],
"label": "core.module.input.label.Select dataset",
"value": [],
"valueType": "selectDataset",
@@ -363,55 +299,55 @@
},
{
"key": "similarity",
- "renderTypeList": ["FlowNodeInputTypeEnum.selectDatasetParamsModal"],
+ "renderTypeList": ["selectDatasetParamsModal"],
"label": "",
"value": 0.4,
"valueType": "number"
},
{
"key": "limit",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
+ "renderTypeList": ["hidden"],
"label": "",
"value": 1500,
"valueType": "number"
},
{
"key": "searchMode",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
+ "renderTypeList": ["hidden"],
"label": "",
"valueType": "string",
"value": "embedding"
},
{
"key": "usingReRank",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
+ "renderTypeList": ["hidden"],
"label": "",
"valueType": "boolean",
"value": false
},
{
"key": "datasetSearchUsingExtensionQuery",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
+ "renderTypeList": ["hidden"],
"label": "",
"valueType": "boolean",
"value": true
},
{
"key": "datasetSearchExtensionModel",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
+ "renderTypeList": ["hidden"],
"label": "",
"valueType": "string"
},
{
"key": "datasetSearchExtensionBg",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
+ "renderTypeList": ["hidden"],
"label": "",
"valueType": "string",
"value": ""
},
{
"key": "userChatInput",
- "renderTypeList": ["reference", "FlowNodeInputTypeEnum.textarea"],
+ "renderTypeList": ["reference", "textarea"],
"valueType": "string",
"label": "用户问题",
"required": true,
diff --git a/projects/app/public/appMarketTemplates/Chinese/template.json b/projects/app/public/appMarketTemplates/Chinese/template.json
index bc6d87288..108c29bdd 100644
--- a/projects/app/public/appMarketTemplates/Chinese/template.json
+++ b/projects/app/public/appMarketTemplates/Chinese/template.json
@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
- "valueType": "boolean",
+ "valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
- "value": false
+ "value": {
+ "open": false
+ }
},
{
"key": "tts",
diff --git a/projects/app/public/appMarketTemplates/TranslateRobot/template.json b/projects/app/public/appMarketTemplates/TranslateRobot/template.json
index d83756887..be0138de9 100644
--- a/projects/app/public/appMarketTemplates/TranslateRobot/template.json
+++ b/projects/app/public/appMarketTemplates/TranslateRobot/template.json
@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
- "valueType": "boolean",
+ "valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
- "value": false
+ "value": {
+ "open": false
+ }
},
{
"key": "tts",
diff --git a/projects/app/public/appMarketTemplates/animalLife/template.json b/projects/app/public/appMarketTemplates/animalLife/template.json
index 896ae0245..6350556a6 100644
--- a/projects/app/public/appMarketTemplates/animalLife/template.json
+++ b/projects/app/public/appMarketTemplates/animalLife/template.json
@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
- "valueType": "boolean",
+ "valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
- "value": false
+ "value": {
+ "open": false
+ }
},
{
"key": "tts",
diff --git a/projects/app/public/appMarketTemplates/chatGuide/template.json b/projects/app/public/appMarketTemplates/chatGuide/template.json
index 142160b5e..67dab9bcd 100644
--- a/projects/app/public/appMarketTemplates/chatGuide/template.json
+++ b/projects/app/public/appMarketTemplates/chatGuide/template.json
@@ -19,73 +19,7 @@
"y": -490.7611729549753
},
"version": "481",
- "inputs": [
- {
- "key": "welcomeText",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "string",
- "label": "core.app.Welcome Text",
- "value": "你好,我可以为你翻译各种语言,请告诉我你需要翻译成什么语言?"
- },
- {
- "key": "variables",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "any",
- "label": "core.app.Chat Variable",
- "value": [
- {
- "id": "myb3xk",
- "key": "language",
- "label": "目标语言",
- "type": "select",
- "required": true,
- "maxLen": 50,
- "enums": [
- {
- "value": "中文"
- },
- {
- "value": "英文"
- }
- ]
- }
- ]
- },
- {
- "key": "questionGuide",
- "valueType": "boolean",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "label": "core.app.Question Guide",
- "value": false
- },
- {
- "key": "tts",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "any",
- "label": "",
- "value": {
- "type": "web"
- }
- },
- {
- "key": "whisper",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "any",
- "label": "",
- "value": {
- "open": false,
- "autoSend": false,
- "autoTTSResponse": false
- }
- },
- {
- "key": "scheduleTrigger",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "any",
- "label": "",
- "value": null
- }
- ],
+ "inputs": [],
"outputs": []
},
{
diff --git a/projects/app/public/appMarketTemplates/divination/template.json b/projects/app/public/appMarketTemplates/divination/template.json
index 62f2a6340..90f3e2c3b 100644
--- a/projects/app/public/appMarketTemplates/divination/template.json
+++ b/projects/app/public/appMarketTemplates/divination/template.json
@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
- "valueType": "boolean",
+ "valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
- "value": false
+ "value": {
+ "open": false
+ }
},
{
"key": "tts",
diff --git a/projects/app/public/appMarketTemplates/githubIssue/template.json b/projects/app/public/appMarketTemplates/githubIssue/template.json
index 3471f37d1..2a83e7366 100644
--- a/projects/app/public/appMarketTemplates/githubIssue/template.json
+++ b/projects/app/public/appMarketTemplates/githubIssue/template.json
@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
- "valueType": "boolean",
+ "valueType": "hidden",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
- "value": false
+ "value": {
+ "open": false
+ }
},
{
"key": "tts",
diff --git a/projects/app/public/appMarketTemplates/google/template.json b/projects/app/public/appMarketTemplates/google/template.json
index ea1fd9eb4..90adf4eaf 100644
--- a/projects/app/public/appMarketTemplates/google/template.json
+++ b/projects/app/public/appMarketTemplates/google/template.json
@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
- "valueType": "boolean",
+ "valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
- "value": false
+ "value": {
+ "open": false
+ }
},
{
"key": "tts",
diff --git a/projects/app/public/appMarketTemplates/longTranslate/template.json b/projects/app/public/appMarketTemplates/longTranslate/template.json
index 9cb6c98ac..8bad54944 100644
--- a/projects/app/public/appMarketTemplates/longTranslate/template.json
+++ b/projects/app/public/appMarketTemplates/longTranslate/template.json
@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
- "valueType": "boolean",
+ "valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
- "value": false
+ "value": {
+ "open": false
+ }
},
{
"key": "tts",
diff --git a/projects/app/public/appMarketTemplates/simpleDatasetChat/template.json b/projects/app/public/appMarketTemplates/simpleDatasetChat/template.json
index 076ad7702..4c88b3086 100644
--- a/projects/app/public/appMarketTemplates/simpleDatasetChat/template.json
+++ b/projects/app/public/appMarketTemplates/simpleDatasetChat/template.json
@@ -18,56 +18,7 @@
"y": -486.7611729549753
},
"version": "481",
- "inputs": [
- {
- "key": "welcomeText",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "string",
- "label": "core.app.Welcome Text",
- "value": "你好,我是知识库助手,请不要忘记选择知识库噢~\n[你是谁]\n[如何使用]"
- },
- {
- "key": "variables",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "any",
- "label": "core.app.Chat Variable",
- "value": []
- },
- {
- "key": "questionGuide",
- "valueType": "boolean",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "label": "core.app.Question Guide",
- "value": false
- },
- {
- "key": "tts",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "any",
- "label": "",
- "value": {
- "type": "web"
- }
- },
- {
- "key": "whisper",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "any",
- "label": "",
- "value": {
- "open": false,
- "autoSend": false,
- "autoTTSResponse": false
- }
- },
- {
- "key": "scheduleTrigger",
- "renderTypeList": ["FlowNodeInputTypeEnum.hidden"],
- "valueType": "any",
- "label": "",
- "value": null
- }
- ],
+ "inputs": [],
"outputs": []
},
{
diff --git a/projects/app/public/appMarketTemplates/srt-translate/template.json b/projects/app/public/appMarketTemplates/srt-translate/template.json
index f38c76c45..66a9dc82a 100644
--- a/projects/app/public/appMarketTemplates/srt-translate/template.json
+++ b/projects/app/public/appMarketTemplates/srt-translate/template.json
@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
- "valueType": "boolean",
+ "valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
- "value": false
+ "value": {
+ "open": false
+ }
},
{
"key": "tts",
diff --git a/projects/app/public/appMarketTemplates/stock/template.json b/projects/app/public/appMarketTemplates/stock/template.json
index 7c3e99685..cdde5c438 100644
--- a/projects/app/public/appMarketTemplates/stock/template.json
+++ b/projects/app/public/appMarketTemplates/stock/template.json
@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
- "valueType": "boolean",
+ "valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
- "value": false
+ "value": {
+ "open": false
+ }
},
{
"key": "tts",
diff --git a/projects/app/public/imgs/app/nextQuestion-icon.svg b/projects/app/public/imgs/app/nextQuestion-icon.svg
index 8a921eafe..574c6b722 100644
--- a/projects/app/public/imgs/app/nextQuestion-icon.svg
+++ b/projects/app/public/imgs/app/nextQuestion-icon.svg
@@ -1,11 +1,11 @@
-