Add question guide config (#3403)

* 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>
This commit is contained in:
Archer
2024-12-16 13:49:31 +08:00
committed by GitHub
parent 76d20b2b76
commit bfac393ab1
50 changed files with 775 additions and 397 deletions

View File

@@ -201,7 +201,7 @@ weight: 708
- /imgs/model/qwen.svg - 通义千问
- /imgs/model/sparkDesk.svg - 讯飞星火
- /imgs/model/yi.svg - 零一万物
-
- /imgs/model/hunyuan.svg - 腾讯混元
## 特殊模型

View File

@@ -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

View File

@@ -12,9 +12,10 @@ weight: 808
1.
2. 新增 - 商业版支持 API 知识库和链接集合定时同步。
3. 优化 - 工作流/简易模式变量初始化代码,去除监听初始化,避免因渲染顺序不一致导致的失败
4. 修复 - 无法自动切换默认语言。增加分享链接,强制执行一次切换默认语言
5. 修复 - 数组选择器自动兼容 4.8.13 以前的数据
6. 修复 - 站点同步知识库,链接同步时未使用选择器
7. 修复 - 简易模式转工作流,没有把系统配置项转化
8. 修复 - 插件独立运行,变量初始值未赋上
3. 新增 - 猜你想问支持选择模型和自定义提示词
4. 优化 - 工作流/简易模式变量初始化代码,去除监听初始化,避免因渲染顺序不一致导致的失败
5. 修复 - 无法自动切换默认语言。增加分享链接,强制执行一次切换默认语言
6. 修复 - 数组选择器自动兼容 4.8.13 以前的数据
7. 修复 - 站点同步知识库,链接同步时未使用选择器
8. 修复 - 简易模式转工作流,没有把系统配置项转化
9. 修复 - 插件独立运行,变量初始值未赋上。

View File

@@ -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: `;

View File

@@ -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: [],

View File

@@ -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;

View File

@@ -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 ??

View File

@@ -439,7 +439,9 @@
}
],
"chatConfig": {
"questionGuide": false,
"questionGuide": {
"open": false
},
"ttsConfig": {
"type": "web"
},

View File

@@ -489,7 +489,9 @@
"chatConfig": {
"welcomeText": "",
"variables": [],
"questionGuide": false,
"questionGuide": {
"open": false
},
"ttsConfig": {
"type": "web"
},

View File

@@ -666,7 +666,9 @@
"chatConfig": {
"welcomeText": "",
"variables": [],
"questionGuide": false,
"questionGuide": {
"open": false
},
"ttsConfig": {
"type": "web"
},

View File

@@ -502,7 +502,9 @@
"chatConfig": {
"welcomeText": "",
"variables": [],
"questionGuide": false,
"questionGuide": {
"open": false
},
"ttsConfig": {
"type": "web"
},

View File

@@ -538,7 +538,9 @@
"chatConfig": {
"welcomeText": "",
"variables": [],
"questionGuide": false,
"questionGuide": {
"open": false
},
"ttsConfig": {
"type": "web"
},

View File

@@ -320,7 +320,9 @@
"chatConfig": {
"welcomeText": "",
"variables": [],
"questionGuide": false,
"questionGuide": {
"open": false
},
"ttsConfig": {
"type": "web"
},

View File

@@ -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

View File

@@ -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,

View File

@@ -1 +1,10 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1698504394130" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4081" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M928 448h-64a19.2 19.2 0 0 1 0-38.4h64a19.2 19.2 0 0 1 0 38.4zM797.1072 738.4064l-45.2608-45.2608a19.2 19.2 0 0 1 27.1488-27.1488l45.3248 45.2608a19.2 19.2 0 0 1-27.2128 27.1488zM779.008 204.4032a19.2 19.2 0 0 1-27.1488-27.1488l45.2608-45.2608a19.2 19.2 0 0 1 27.2 27.1488z m-121.216 472.0128a282.368 282.368 0 0 0-17.2032 77.5808v20.8A37.7856 37.7856 0 0 1 614.4 810.6752V819.2H409.6v-8.5248a37.7856 37.7856 0 0 1-26.1888-35.84v-23.9488a290.0352 290.0352 0 0 0-16.9344-74.24A279.04 279.04 0 0 1 243.2 443.5968C243.2 290.56 363.52 166.4 512 166.4s268.8 124.16 268.8 277.1968a279.04 279.04 0 0 1-123.008 232.8192zM505.6 691.2a19.2 19.2 0 1 0-19.2-19.2 19.2 19.2 0 0 0 19.2 19.2z m6.4-358.4a115.2 115.2 0 0 0-114.4448 102.4h6.5024a17.728 17.728 0 1 0 20.9024 0h8.6656A79.8848 79.8848 0 0 1 512 368.64a77.7216 77.7216 0 0 1 76.8 79.36c0.8064 45.6064-64 76.8-64 76.8a97.4976 97.4976 0 0 0-34.432 46.4768 18.7392 18.7392 0 0 0-3.968 11.1232v7.68a56.6784 56.6784 0 0 0 0 11.52v6.4a19.2 19.2 0 0 0 38.4 0v-14.4768a18.6496 18.6496 0 0 1 0.384-4.6336C533.3632 557.9904 588.8 524.8 588.8 524.8c36.2368-23.296 38.4-76.8 38.4-76.8a115.2 115.2 0 0 0-115.2-115.2z m6.4-230.4A19.2 19.2 0 0 1 499.2 83.2v-64a19.2 19.2 0 1 1 38.4 0v64A19.2 19.2 0 0 1 518.4 102.4z m-264.3456 92.9536l-45.2608-45.2608A19.2 19.2 0 1 1 235.9424 122.88l45.2608 45.248a19.2 19.2 0 0 1-27.1488 27.2256zM160 448h-64a19.2 19.2 0 0 1 0-38.4h64a19.2 19.2 0 0 1 0 38.4z m94.0544 227.0464a19.2 19.2 0 0 1 27.1488 27.1488L235.9424 747.52a19.2 19.2 0 0 1-27.1488-27.1488zM652.8 846.9376a8.384 8.384 0 0 1 0.384 1.9072V870.4a8.4096 8.4096 0 0 1-0.384 1.9072V883.2H371.2v-51.2h281.6v14.9376zM627.2 947.2H396.8v-51.2h230.4v51.2z m-183.6672 23.9104H579.84a8.5248 8.5248 0 0 1 4.8896 1.6896H601.6v38.4H422.4v-38.4h16.2432a8.5248 8.5248 0 0 1 4.8896-1.6896z" fill="#1296db" p-id="4082"></path></svg>
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.13063 2.05868C9.13063 1.57855 9.51985 1.18933 9.99998 1.18933C10.4801 1.18933 10.8693 1.57855 10.8693 2.05868V3.21982C10.8693 3.69994 10.4801 4.08916 9.99998 4.08916C9.51985 4.08916 9.13063 3.69994 9.13063 3.21982V2.05868Z" fill="#219BF4"/>
<path d="M3.38076 9.1859C3.86089 9.1859 4.25011 9.57512 4.25011 10.0552C4.25011 10.5354 3.86089 10.9246 3.38076 10.9246H2.22333C1.74321 10.9246 1.35399 10.5354 1.35399 10.0552C1.35399 9.57512 1.74321 9.1859 2.22333 9.1859H3.38076Z" fill="#219BF4"/>
<path d="M17.7767 9.1859C18.2568 9.1859 18.646 9.57512 18.646 10.0552C18.646 10.5354 18.2568 10.9246 17.7767 10.9246H16.6144C16.1342 10.9246 15.745 10.5354 15.745 10.0552C15.745 9.57512 16.1342 9.1859 16.6144 9.1859H17.7767Z" fill="#219BF4"/>
<path d="M11.9605 15.5135C12.3425 15.5135 12.6522 15.8231 12.6522 16.2051C12.6522 16.5871 12.3425 16.8968 11.9605 16.8968H8.01907C7.63707 16.8968 7.3274 16.5871 7.3274 16.2051C7.3274 15.8231 7.63707 15.5135 8.01907 15.5135H11.9605Z" fill="#219BF4"/>
<path d="M10.9742 17.5941C11.3102 17.5941 11.5825 17.8664 11.5825 18.2024C11.5825 18.5384 11.3102 18.8107 10.9742 18.8107H9.00533C8.66936 18.8107 8.397 18.5384 8.397 18.2024C8.397 17.8664 8.66936 17.5941 9.00533 17.5941H10.9742Z" fill="#219BF4"/>
<path d="M14.8373 9.83534C14.8373 12.5069 12.6715 14.6726 10 14.6726C7.32845 14.6726 5.16274 12.5069 5.16274 9.83534C5.16274 7.16379 7.32845 4.99808 10 4.99808C12.6715 4.99808 14.8373 7.16379 14.8373 9.83534Z" fill="#219BF4"/>
<path d="M15.3181 5.79775C14.9786 6.13725 14.4282 6.13725 14.0887 5.79775C13.7492 5.45825 13.7492 4.90781 14.0887 4.56831L14.9091 3.7479C15.2486 3.4084 15.799 3.4084 16.1385 3.7479C16.478 4.0874 16.478 4.63784 16.1385 4.97734L15.3181 5.79775Z" fill="#219BF4"/>
<path d="M4.68184 5.80161C5.02134 6.14111 5.57178 6.14111 5.91128 5.80161C6.25078 5.46211 6.25078 4.91167 5.91128 4.57217L5.09091 3.7518C4.75141 3.4123 4.20097 3.4123 3.86147 3.7518C3.52197 4.0913 3.52197 4.64174 3.86147 4.98124L4.68184 5.80161Z" fill="#219BF4"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -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 (
<HStack px="3" py="2" bgColor="primary.50" borderRadius="md" fontSize={'sm'}>
<Icon name="common/info" w="1rem" color={'primary.600'} />
<Box color="primary.600">
{t('common:core.app.QG.Custom prompt tip1')}
<Box as="span" color={'yellow.500'} fontWeight="500" display="inline">
{t('common:core.app.QG.Custom prompt tip2')}
</Box>
{t('common:core.app.QG.Custom prompt tip3')}
</Box>
</HStack>
);
};
const FixBox = ({ children }: { children: React.ReactNode }) => {
return (
<Box>
<Box
bg="yellow.100"
as="span" // 改为 inline 元素
display="inline" // 确保是行内显示
>
{children}
</Box>
</Box>
);
};
const CustomPromptEditor = ({
defaultValue = '',
defaultPrompt,
footerPrompt,
onChange,
onClose
}: {
defaultValue?: string;
defaultPrompt: string;
footerPrompt?: string;
onChange: (e: string) => void;
onClose: () => void;
}) => {
const ref = useRef<HTMLTextAreaElement>(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 (
<MyModal
isOpen
onClose={onClose}
iconSrc="modal/edit"
title={t('app:core.dataset.import.Custom prompt')}
w={'100%'}
h={'85vh'}
isCentered
>
<ModalBody flex={'1 0 0'} display={'flex'} flexDirection={'column'}>
<CustomLightTip />
<HStack my={3} justifyContent={'space-between'}>
<Box fontWeight={'bold'} color={'myGray.600'}>
{t('common:core.ai.Prompt')}
</Box>
<Button
variant={'grayGhost'}
size={'sm'}
leftIcon={<MyIcon name={'common/retryLight'} w={'14px'} />}
px={2}
onClick={() => setValue(defaultPrompt)}
>
{t('common:common.Reset')}
</Button>
</HStack>
<Box
flex={'1 0 0'}
overflow={'auto'}
border="1px solid"
borderColor="borderColor.base"
borderRadius="md"
bg={'myGray.50'}
whiteSpace="pre-wrap"
fontSize="sm"
p={3}
>
<Textarea
ref={ref}
value={value}
placeholder={t('common:prompt_input_placeholder')}
onChange={(e) => setValue(e.target.value)}
resize="none"
bg="transparent"
border="none"
p={0}
mb={2}
_focus={{
border: 'none',
boxShadow: 'none'
}}
/>
{footerPrompt && <FixBox>{footerPrompt}</FixBox>}
</Box>
</ModalBody>
<ModalFooter>
<Flex gap={3}>
<Button variant={'whiteBase'} fontWeight={'medium'} onClick={onClose} w={20}>
{t('common:common.Close')}
</Button>
<Button
fontWeight={'medium'}
onClick={() => {
onChange(value.replace(defaultValue, ''));
onClose();
}}
w={20}
>
{t('common:common.Confirm')}
</Button>
</Flex>
</ModalFooter>
</MyModal>
);
};
export default CustomPromptEditor;

View File

@@ -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",

View File

@@ -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",

View File

@@ -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": "应用配置",

View File

@@ -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": "账号",

View File

@@ -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": "應用程式設定",

View File

@@ -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": "帳戶",

View File

@@ -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,

View File

@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
"valueType": "boolean",
"valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
"value": false
"value": {
"open": false
}
},
{
"key": "tts",

View File

@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
"valueType": "boolean",
"valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
"value": false
"value": {
"open": false
}
},
{
"key": "tts",

View File

@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
"valueType": "boolean",
"valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
"value": false
"value": {
"open": false
}
},
{
"key": "tts",

View File

@@ -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": []
},
{

View File

@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
"valueType": "boolean",
"valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
"value": false
"value": {
"open": false
}
},
{
"key": "tts",

View File

@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
"valueType": "boolean",
"valueType": "hidden",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
"value": false
"value": {
"open": false
}
},
{
"key": "tts",

View File

@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
"valueType": "boolean",
"valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
"value": false
"value": {
"open": false
}
},
{
"key": "tts",

View File

@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
"valueType": "boolean",
"valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
"value": false
"value": {
"open": false
}
},
{
"key": "tts",

View File

@@ -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": []
},
{

View File

@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
"valueType": "boolean",
"valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
"value": false
"value": {
"open": false
}
},
{
"key": "tts",

View File

@@ -35,10 +35,12 @@
},
{
"key": "questionGuide",
"valueType": "boolean",
"valueType": "any",
"renderTypeList": ["hidden"],
"label": "core.app.Question Guide",
"value": false
"value": {
"open": false
}
},
{
"key": "tts",

View File

@@ -1,11 +1,11 @@
<svg viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="36" height="36" rx="6" fill="#FFF1F6"/>
<path d="M16.9567 8.4704C16.9567 7.89425 17.4238 7.42719 17.9999 7.42719C18.5761 7.42719 19.0432 7.89425 19.0432 8.4704V9.86377C19.0432 10.4399 18.5761 10.907 17.9999 10.907C17.4238 10.907 16.9567 10.4399 16.9567 9.86377V8.4704Z" fill="#F9518E"/>
<path d="M10.0569 17.0231C10.633 17.0231 11.1001 17.4901 11.1001 18.0663C11.1001 18.6424 10.633 19.1095 10.0569 19.1095H8.66797C8.09182 19.1095 7.62476 18.6424 7.62476 18.0663C7.62476 17.4901 8.09182 17.0231 8.66797 17.0231H10.0569Z" fill="#F9518E"/>
<path d="M27.332 17.0231C27.9081 17.0231 28.3752 17.4901 28.3752 18.0663C28.3752 18.6424 27.9081 19.1095 27.332 19.1095H25.9372C25.361 19.1095 24.894 18.6424 24.894 18.0663C24.894 17.4901 25.361 17.0231 25.9372 17.0231H27.332Z" fill="#F9518E"/>
<path d="M20.3526 24.6161C20.811 24.6161 21.1826 24.9878 21.1826 25.4461C21.1826 25.9045 20.811 26.2761 20.3526 26.2761H15.6229C15.1645 26.2761 14.7929 25.9045 14.7929 25.4461C14.7929 24.9878 15.1645 24.6161 15.6229 24.6161H20.3526Z" fill="#F9518E"/>
<path d="M19.169 27.1129C19.5722 27.1129 19.899 27.4397 19.899 27.8429C19.899 28.246 19.5722 28.5729 19.169 28.5729H16.8064C16.4032 28.5729 16.0764 28.246 16.0764 27.8429C16.0764 27.4397 16.4032 27.1129 16.8064 27.1129H19.169Z" fill="#F9518E"/>
<path d="M23.8047 17.8024C23.8047 21.0082 21.2058 23.6071 18 23.6071C14.7941 23.6071 12.1953 21.0082 12.1953 17.8024C12.1953 14.5965 14.7941 11.9977 18 11.9977C21.2058 11.9977 23.8047 14.5965 23.8047 17.8024Z" fill="#F9518E"/>
<path d="M24.3817 12.9573C23.9743 13.3647 23.3138 13.3647 22.9064 12.9573C22.499 12.5499 22.499 11.8894 22.9064 11.482L23.8909 10.4975C24.2983 10.0901 24.9588 10.0901 25.3662 10.4975C25.7736 10.9049 25.7736 11.5654 25.3662 11.9728L24.3817 12.9573Z" fill="#F9518E"/>
<path d="M11.6182 12.9619C12.0256 13.3693 12.6861 13.3693 13.0935 12.9619C13.5009 12.5545 13.5009 11.894 13.0935 11.4866L12.1091 10.5022C11.7017 10.0948 11.0411 10.0948 10.6337 10.5022C10.2263 10.9096 10.2263 11.5701 10.6337 11.9775L11.6182 12.9619Z" fill="#F9518E"/>
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="36" height="36" rx="6" fill="#F0FBFF"/>
<path d="M16.9568 8.4704C16.9568 7.89425 17.4238 7.42719 18 7.42719C18.5761 7.42719 19.0432 7.89425 19.0432 8.4704V9.86377C19.0432 10.4399 18.5761 10.907 18 10.907C17.4238 10.907 16.9568 10.4399 16.9568 9.86377V8.4704Z" fill="#219BF4"/>
<path d="M10.0569 17.0231C10.6331 17.0231 11.1001 17.4901 11.1001 18.0663C11.1001 18.6424 10.6331 19.1095 10.0569 19.1095H8.668C8.09185 19.1095 7.62479 18.6424 7.62479 18.0663C7.62479 17.4901 8.09185 17.0231 8.668 17.0231H10.0569Z" fill="#219BF4"/>
<path d="M27.332 17.0231C27.9082 17.0231 28.3752 17.4901 28.3752 18.0663C28.3752 18.6424 27.9082 19.1095 27.332 19.1095H25.9372C25.3611 19.1095 24.894 18.6424 24.894 18.0663C24.894 17.4901 25.3611 17.0231 25.9372 17.0231H27.332Z" fill="#219BF4"/>
<path d="M20.3526 24.6161C20.811 24.6161 21.1826 24.9878 21.1826 25.4461C21.1826 25.9045 20.811 26.2761 20.3526 26.2761H15.6229C15.1645 26.2761 14.7929 25.9045 14.7929 25.4461C14.7929 24.9878 15.1645 24.6161 15.6229 24.6161H20.3526Z" fill="#219BF4"/>
<path d="M19.169 27.1129C19.5722 27.1129 19.899 27.4397 19.899 27.8429C19.899 28.246 19.5722 28.5729 19.169 28.5729H16.8064C16.4032 28.5729 16.0764 28.246 16.0764 27.8429C16.0764 27.4397 16.4032 27.1129 16.8064 27.1129H19.169Z" fill="#219BF4"/>
<path d="M23.8047 17.8024C23.8047 21.0082 21.2058 23.6071 18 23.6071C14.7941 23.6071 12.1953 21.0082 12.1953 17.8024C12.1953 14.5965 14.7941 11.9977 18 11.9977C21.2058 11.9977 23.8047 14.5965 23.8047 17.8024Z" fill="#219BF4"/>
<path d="M24.3817 12.9573C23.9743 13.3647 23.3138 13.3647 22.9064 12.9573C22.499 12.5499 22.499 11.8894 22.9064 11.482L23.8909 10.4975C24.2983 10.0901 24.9588 10.0901 25.3662 10.4975C25.7736 10.9049 25.7736 11.5654 25.3662 11.9728L24.3817 12.9573Z" fill="#219BF4"/>
<path d="M11.6182 12.9619C12.0256 13.3693 12.6861 13.3693 13.0935 12.9619C13.5009 12.5545 13.5009 11.894 13.0935 11.4866L12.1091 10.5022C11.7017 10.0948 11.0412 10.0948 10.6338 10.5022C10.2264 10.9096 10.2264 11.5701 10.6338 11.9775L11.6182 12.9619Z" fill="#219BF4"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -1,109 +1,109 @@
<svg width="422" height="272" viewBox="0 0 422 272" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_4766_19898)">
<g clip-path="url(#clip0_14774_424)">
<rect x="1" y="1" width="420" height="269.5" rx="7.875" fill="#F4F4F7"/>
<mask id="path-3-inside-1_4766_19898" fill="white">
<mask id="path-3-inside-1_14774_424" fill="white">
<path d="M58.75 20.1125H421V270.8H58.75V20.1125Z"/>
</mask>
<path d="M58.75 20.1125H421V270.8H58.75V20.1125Z" fill="white"/>
<path d="M59.4062 270.8V20.1125H58.0938V270.8H59.4062Z" fill="#DFE2EA" mask="url(#path-3-inside-1_4766_19898)"/>
<rect x="381.625" y="37.1749" width="22.3125" height="22.3125" rx="4.95833" fill="url(#paint0_linear_4766_19898)"/>
<path d="M392.278 44.6185H393.531L396.309 51.8311H395.127L394.45 49.9724H391.349L390.672 51.8311H389.5L392.278 44.6185ZM391.682 49.0632H394.116L392.924 45.8004H392.884L391.682 49.0632Z" fill="white"/>
<path d="M340.938 68.3992C340.938 65.652 343.165 63.4249 345.912 63.4249H403.938V83.3918C403.938 86.137 401.712 88.3624 398.967 88.3624H345.908C343.163 88.3624 340.938 86.137 340.938 83.3918V68.3992Z" fill="#F0F4FF"/>
<path d="M59.4062 270.8V20.1125H58.0937V270.8H59.4062Z" fill="#DFE2EA" mask="url(#path-3-inside-1_14774_424)"/>
<rect x="381.625" y="37.1749" width="22.3125" height="22.3125" rx="4.95833" fill="url(#paint0_linear_14774_424)"/>
<path d="M392.278 44.6185H393.53L396.308 51.8311H395.126L394.45 49.9724H391.348L390.672 51.8311H389.5L392.278 44.6185ZM391.682 49.0632H394.116L392.924 45.8004H392.884L391.682 49.0632Z" fill="white"/>
<path d="M340.937 68.3992C340.937 65.652 343.164 63.4249 345.912 63.4249H403.937V83.3918C403.937 86.137 401.712 88.3624 398.967 88.3624H345.908C343.163 88.3624 340.937 86.137 340.937 83.3918V68.3992Z" fill="#F0F4FF"/>
<rect x="349.309" y="73.2686" width="45.8664" height="5.25" rx="2.625" fill="#C5D7FF"/>
<rect x="69.5607" y="88.6731" width="21.7464" height="21.7464" rx="4.65993" fill="#FBFBFC"/>
<rect x="69.5607" y="88.6731" width="21.7464" height="21.7464" rx="4.65993" stroke="#E8EBF0" stroke-width="0.621324"/>
<path d="M81.6744 97.0955C81.6744 96.5958 81.5203 96.1072 81.2317 95.6917C80.943 95.2762 80.5328 94.9524 80.0528 94.7611C79.5728 94.5699 79.0447 94.5198 78.5351 94.6173C78.0256 94.7148 77.5575 94.9555 77.1902 95.3088C76.8228 95.6622 76.5726 96.1124 76.4713 96.6026C76.3699 97.0927 76.4219 97.6007 76.6207 98.0624C76.8196 98.5241 77.1562 98.9187 77.5882 99.1964C78.0202 99.474 78.5281 99.6222 79.0476 99.6222V97.0955H81.6744Z" fill="url(#paint1_linear_4766_19898)"/>
<path d="M84.447 97.0955C84.447 96.7637 84.3861 96.4351 84.2677 96.1286C84.1494 95.822 83.9759 95.5435 83.7572 95.3088C83.5384 95.0742 83.2788 94.8881 82.993 94.7611C82.7072 94.6341 82.401 94.5688 82.0916 94.5688C81.7823 94.5688 81.476 94.6341 81.1903 94.7611C80.9045 94.8881 80.6448 95.0742 80.4261 95.3088C80.2074 95.5435 80.0339 95.822 79.9155 96.1286C79.7972 96.4351 79.7362 96.7637 79.7362 97.0955L84.447 97.0955Z" fill="url(#paint2_linear_4766_19898)"/>
<path d="M84.0149 101.146C84.0149 100.864 83.9665 100.585 83.8725 100.324C83.7784 100.064 83.6405 99.8273 83.4667 99.628C83.2929 99.4287 83.0866 99.2706 82.8595 99.1627C82.6324 99.0548 82.389 98.9993 82.1432 98.9993V101.146H84.0149Z" fill="url(#paint3_linear_4766_19898)"/>
<path d="M79.0475 100.372C78.7025 100.372 78.361 100.431 78.0423 100.547C77.7236 100.662 77.434 100.832 77.1901 101.045C76.9461 101.259 76.7527 101.513 76.6207 101.792C76.4886 102.071 76.4207 102.37 76.4207 102.672C76.4207 102.974 76.4886 103.273 76.6207 103.552C76.7527 103.831 76.9461 104.085 77.1901 104.299C77.434 104.512 77.7236 104.682 78.0423 104.797C78.361 104.913 78.7025 104.972 79.0475 104.972L79.0475 100.372Z" fill="url(#paint4_linear_4766_19898)"/>
<path d="M79.0475 96.9954L79.0475 102.647L76.4207 102.647L76.4207 96.9954H79.0475Z" fill="url(#paint5_linear_4766_19898)"/>
<path d="M82.171 97.0951L79.0177 97.0951L79.0177 94.5688L82.171 94.5688V97.0951Z" fill="url(#paint6_linear_4766_19898)"/>
<path d="M82.171 101.145H80.426V98.9993L82.171 98.9993V101.145Z" fill="url(#paint7_linear_4766_19898)"/>
<path d="M69.25 115.271H398.967C401.712 115.271 403.938 117.497 403.938 120.242V191.676C403.938 194.421 401.712 196.646 398.967 196.646H74.2206C71.4754 196.646 69.25 194.421 69.25 191.676V115.271Z" fill="#F7F8FA"/>
<rect x="76.3269" y="126.377" width="315.446" height="5.25" rx="2.625" fill="#DFE2EA"/>
<rect x="76.3269" y="139.502" width="95.0487" height="5.25" rx="2.625" fill="#DFE2EA"/>
<path d="M82.7183 156.693C82.7183 156.357 82.9908 156.085 83.3268 156.085C83.6629 156.085 83.9354 156.357 83.9354 156.693V157.506C83.9354 157.842 83.6629 158.115 83.3268 158.115C82.9908 158.115 82.7183 157.842 82.7183 157.506V156.693Z" fill="#F9518E"/>
<path d="M78.6934 161.682C79.0295 161.682 79.3019 161.955 79.3019 162.291C79.3019 162.627 79.0295 162.9 78.6934 162.9H77.8832C77.5471 162.9 77.2747 162.627 77.2747 162.291C77.2747 161.955 77.5471 161.682 77.8832 161.682H78.6934Z" fill="#F9518E"/>
<path d="M88.7705 161.682C89.1066 161.682 89.3791 161.955 89.3791 162.291C89.3791 162.627 89.1066 162.9 88.7705 162.9H87.9569C87.6208 162.9 87.3484 162.627 87.3484 162.291C87.3484 161.955 87.6208 161.682 87.9569 161.682H88.7705Z" fill="#F9518E"/>
<path d="M84.6992 166.112C84.9666 166.112 85.1834 166.329 85.1834 166.596C85.1834 166.863 84.9666 167.08 84.6992 167.08H81.9402C81.6728 167.08 81.456 166.863 81.456 166.596C81.456 166.329 81.6728 166.112 81.9402 166.112H84.6992Z" fill="#F9518E"/>
<path d="M84.0088 167.568C84.244 167.568 84.4346 167.759 84.4346 167.994C84.4346 168.229 84.244 168.42 84.0088 168.42H82.6306C82.3954 168.42 82.2048 168.229 82.2048 167.994C82.2048 167.759 82.3954 167.568 82.6306 167.568H84.0088Z" fill="#F9518E"/>
<path d="M86.7129 162.137C86.7129 164.007 85.1969 165.523 83.3269 165.523C81.4568 165.523 79.9408 164.007 79.9408 162.137C79.9408 160.267 81.4568 158.751 83.3269 158.751C85.1969 158.751 86.7129 160.267 86.7129 162.137Z" fill="#F9518E"/>
<path d="M87.0495 159.311C86.8119 159.548 86.4266 159.548 86.1889 159.311C85.9513 159.073 85.9513 158.688 86.1889 158.45L86.7632 157.876C87.0009 157.638 87.3862 157.638 87.6238 157.876C87.8615 158.113 87.8615 158.499 87.6238 158.736L87.0495 159.311Z" fill="#F9518E"/>
<path d="M79.6042 159.313C79.8418 159.551 80.2271 159.551 80.4648 159.313C80.7024 159.076 80.7024 158.69 80.4648 158.453L79.8905 157.879C79.6529 157.641 79.2675 157.641 79.0299 157.879C78.7922 158.116 78.7922 158.502 79.0299 158.739L79.6042 159.313Z" fill="#F9518E"/>
<rect x="69.5606" y="88.6731" width="21.7464" height="21.7464" rx="4.65993" fill="#FBFBFC"/>
<rect x="69.5606" y="88.6731" width="21.7464" height="21.7464" rx="4.65993" stroke="#E8EBF0" stroke-width="0.621324"/>
<path d="M81.6742 97.0955C81.6742 96.5958 81.5201 96.1072 81.2315 95.6917C80.9429 95.2762 80.5326 94.9524 80.0526 94.7611C79.5727 94.5699 79.0445 94.5198 78.535 94.6173C78.0254 94.7148 77.5574 94.9555 77.19 95.3088C76.8226 95.6622 76.5724 96.1124 76.4711 96.6026C76.3697 97.0927 76.4218 97.6007 76.6206 98.0624C76.8194 98.5241 77.1561 98.9187 77.588 99.1964C78.02 99.474 78.5279 99.6222 79.0474 99.6222V97.0955H81.6742Z" fill="url(#paint1_linear_14774_424)"/>
<path d="M84.4469 97.0955C84.4469 96.7637 84.3859 96.4351 84.2676 96.1286C84.1492 95.822 83.9757 95.5435 83.757 95.3088C83.5383 95.0742 83.2786 94.8881 82.9928 94.7611C82.7071 94.6341 82.4008 94.5688 82.0915 94.5688C81.7822 94.5688 81.4759 94.6341 81.1901 94.7611C80.9043 94.8881 80.6447 95.0742 80.426 95.3088C80.2072 95.5435 80.0337 95.822 79.9154 96.1286C79.797 96.4351 79.7361 96.7637 79.7361 97.0955L84.4469 97.0955Z" fill="url(#paint2_linear_14774_424)"/>
<path d="M84.0148 101.146C84.0148 100.864 83.9663 100.585 83.8723 100.324C83.7782 100.064 83.6404 99.8273 83.4665 99.628C83.2927 99.4287 83.0864 99.2706 82.8593 99.1627C82.6322 99.0548 82.3889 98.9993 82.1431 98.9993V101.146H84.0148Z" fill="url(#paint3_linear_14774_424)"/>
<path d="M79.0473 100.372C78.7024 100.372 78.3608 100.431 78.0421 100.547C77.7234 100.662 77.4338 100.832 77.1899 101.045C76.946 101.259 76.7525 101.513 76.6205 101.792C76.4885 102.071 76.4205 102.37 76.4205 102.672C76.4205 102.974 76.4885 103.273 76.6205 103.552C76.7525 103.831 76.946 104.085 77.1899 104.299C77.4338 104.512 77.7234 104.682 78.0421 104.797C78.3608 104.913 78.7024 104.972 79.0473 104.972L79.0473 100.372Z" fill="url(#paint4_linear_14774_424)"/>
<path d="M79.0474 96.9954L79.0474 102.647L76.4205 102.647L76.4205 96.9954H79.0474Z" fill="url(#paint5_linear_14774_424)"/>
<path d="M82.1709 97.0951L79.0175 97.0951L79.0175 94.5688L82.1709 94.5688V97.0951Z" fill="url(#paint6_linear_14774_424)"/>
<path d="M82.1709 101.145H80.4258V98.9993L82.1709 98.9993V101.145Z" fill="url(#paint7_linear_14774_424)"/>
<path d="M69.2499 115.271H398.967C401.712 115.271 403.937 117.497 403.937 120.242V191.676C403.937 194.421 401.712 196.646 398.967 196.646H74.2204C71.4753 196.646 69.2499 194.421 69.2499 191.676V115.271Z" fill="#F7F8FA"/>
<rect x="76.3268" y="126.377" width="315.446" height="5.25" rx="2.625" fill="#DFE2EA"/>
<rect x="76.3268" y="139.502" width="95.0487" height="5.25" rx="2.625" fill="#DFE2EA"/>
<path d="M82.7183 156.693C82.7183 156.357 82.9907 156.085 83.3268 156.085C83.6629 156.085 83.9354 156.357 83.9354 156.693V157.506C83.9354 157.842 83.6629 158.115 83.3268 158.115C82.9907 158.115 82.7183 157.842 82.7183 157.506V156.693Z" fill="#219BF4"/>
<path d="M78.6934 161.682C79.0295 161.682 79.3019 161.955 79.3019 162.291C79.3019 162.627 79.0295 162.9 78.6934 162.9H77.8832C77.5471 162.9 77.2746 162.627 77.2746 162.291C77.2746 161.955 77.5471 161.682 77.8832 161.682H78.6934Z" fill="#219BF4"/>
<path d="M88.7705 161.682C89.1066 161.682 89.3791 161.955 89.3791 162.291C89.3791 162.627 89.1066 162.9 88.7705 162.9H87.9569C87.6208 162.9 87.3484 162.627 87.3484 162.291C87.3484 161.955 87.6208 161.682 87.9569 161.682H88.7705Z" fill="#219BF4"/>
<path d="M84.6992 166.112C84.9666 166.112 85.1834 166.329 85.1834 166.596C85.1834 166.863 84.9666 167.08 84.6992 167.08H81.9402C81.6728 167.08 81.456 166.863 81.456 166.596C81.456 166.329 81.6728 166.112 81.9402 166.112H84.6992Z" fill="#219BF4"/>
<path d="M84.0088 167.568C84.244 167.568 84.4346 167.759 84.4346 167.994C84.4346 168.229 84.244 168.42 84.0088 168.42H82.6306C82.3954 168.42 82.2047 168.229 82.2047 167.994C82.2047 167.759 82.3954 167.568 82.6306 167.568H84.0088Z" fill="#219BF4"/>
<path d="M86.7129 162.137C86.7129 164.007 85.1969 165.523 83.3268 165.523C81.4568 165.523 79.9408 164.007 79.9408 162.137C79.9408 160.267 81.4568 158.751 83.3268 158.751C85.1969 158.751 86.7129 160.267 86.7129 162.137Z" fill="#219BF4"/>
<path d="M87.0495 159.311C86.8119 159.548 86.4266 159.548 86.1889 159.311C85.9513 159.073 85.9513 158.688 86.1889 158.45L86.7632 157.876C87.0009 157.638 87.3862 157.638 87.6238 157.876C87.8615 158.113 87.8615 158.499 87.6238 158.736L87.0495 159.311Z" fill="#219BF4"/>
<path d="M79.6041 159.313C79.8418 159.551 80.2271 159.551 80.4647 159.313C80.7024 159.076 80.7024 158.69 80.4647 158.453L79.8905 157.879C79.6528 157.641 79.2675 157.641 79.0299 157.879C78.7922 158.116 78.7922 158.502 79.0299 158.739L79.6041 159.313Z" fill="#219BF4"/>
<path d="M99.7497 157.052H100.66V157.622H102.97V158.402H100.66V158.882H102.63V159.642H100.66V160.142H103.23V160.922H97.2397V160.142H99.7497V159.642H97.8297V158.882H99.7497V158.402H97.5897V157.622H99.7497V157.052ZM98.7997 163.452V163.992H101.65V163.452H98.7997ZM101.65 162.732V162.162H98.7997V162.732H101.65ZM98.7997 164.702V166.282H97.8997V161.392H102.56V165.292C102.56 165.912 102.25 166.222 101.64 166.222H100.84L100.61 165.382L101.37 165.432C101.55 165.432 101.65 165.312 101.65 165.092V164.702H98.7997ZM94.7797 166.162L94.4997 165.272C94.7997 165.312 95.0797 165.332 95.3497 165.332C95.6297 165.332 95.8097 165.272 95.8997 165.172C96.0997 164.922 96.2097 164.172 96.2097 162.912C96.2097 162.632 96.1997 162.372 96.1897 162.132C95.7297 162.762 95.2097 163.302 94.6097 163.752L94.0597 162.952C94.9197 162.372 95.5797 161.682 96.0597 160.882C95.9897 160.512 95.9097 160.192 95.8097 159.912L95.7497 159.752C95.4197 160.052 95.0297 160.362 94.5797 160.682L94.0697 159.862C94.5097 159.622 94.9197 159.312 95.2997 158.932C95.0297 158.532 94.7097 158.162 94.3297 157.822L95.0797 157.242C95.3997 157.562 95.6697 157.892 95.9097 158.212C96.1597 157.872 96.3997 157.482 96.6297 157.062L97.4197 157.552C97.0797 158.142 96.7497 158.642 96.4197 159.052C96.4997 159.212 96.5797 159.372 96.6397 159.532C96.9297 160.332 97.0897 161.472 97.1197 162.952C97.1197 164.592 96.9097 165.572 96.5097 165.912C96.2697 166.082 95.9497 166.172 95.5497 166.172C95.2297 166.172 94.9797 166.162 94.7797 166.162ZM105.366 161.012C105.076 161.372 104.766 161.712 104.446 162.052L104.136 161.042C105.176 159.882 105.946 158.532 106.436 156.992L107.326 157.412C107.066 158.192 106.736 158.942 106.316 159.642V166.282H105.366V161.012ZM112.096 161.032C112.576 162.202 112.996 163.452 113.346 164.782L112.516 165.162C112.136 163.712 111.716 162.432 111.256 161.312L112.096 161.032ZM108.566 159.112C108.266 159.852 107.916 160.522 107.516 161.142L106.696 160.632C107.446 159.522 107.976 158.332 108.286 157.052L109.176 157.242C109.086 157.572 108.996 157.892 108.896 158.192H113.096V158.812C112.936 159.412 112.746 160.012 112.506 160.612L111.596 160.352C111.796 159.992 111.976 159.572 112.116 159.112H108.566ZM109.716 166.212H108.436L108.226 165.312C108.636 165.352 109.026 165.382 109.396 165.382C109.636 165.382 109.756 165.252 109.756 164.992V159.842H110.676V165.232C110.676 165.882 110.356 166.212 109.716 166.212ZM108.126 161.132L108.976 161.372C108.626 162.752 108.176 163.952 107.616 164.992L106.726 164.672C107.256 163.742 107.726 162.562 108.126 161.132ZM118.833 157.382H122.893V162.532H118.833V157.382ZM121.973 161.712V161.052H119.763V161.712H121.973ZM119.763 160.282H121.973V159.652H119.763V160.282ZM119.763 158.872H121.973V158.222H119.763V158.872ZM117.063 160.262V162.622H116.103V160.242C115.713 160.932 115.243 161.572 114.683 162.172L114.333 161.272C115.053 160.642 115.633 159.912 116.073 159.082H114.543V158.202H116.103V157.172H117.063V158.202H118.283V159.082H117.063V159.432C117.563 159.762 118.063 160.132 118.573 160.542L118.033 161.332C117.653 160.892 117.333 160.532 117.063 160.262ZM115.323 163.132L116.263 163.342C116.023 164.302 115.683 165.142 115.243 165.842L114.423 165.332C114.843 164.652 115.143 163.922 115.323 163.132ZM120.413 166.072H117.843C117.123 166.072 116.763 165.702 116.763 164.962V163.032H117.733V164.762C117.733 165.022 117.863 165.152 118.143 165.152H120.243C120.403 165.152 120.533 165.092 120.613 164.992C120.713 164.892 120.773 164.562 120.803 164.002L121.703 164.302C121.633 165.152 121.493 165.662 121.273 165.842C121.093 165.992 120.803 166.072 120.413 166.072ZM119.043 162.802C119.503 163.292 119.863 163.712 120.113 164.072L119.353 164.602C119.093 164.202 118.743 163.752 118.303 163.262L119.043 162.802ZM122.153 162.822C122.813 163.662 123.313 164.392 123.663 165.022L122.853 165.582C122.493 164.902 122.003 164.152 121.383 163.312L122.153 162.822ZM132.03 166.222H131.01L130.77 165.332L131.84 165.352C132.18 165.352 132.36 165.162 132.36 164.792V158.482H128.58V157.562H133.33V165.042C133.33 165.822 132.89 166.222 132.03 166.222ZM124.99 158.712H125.96V166.292H124.99V158.712ZM127.23 160.072H131.05V164.052H127.23V160.072ZM130.1 163.142V160.982H128.18V163.142H130.1ZM126.72 156.952C127.17 157.492 127.57 158.092 127.93 158.742L127.08 159.182C126.7 158.482 126.29 157.872 125.84 157.342L126.72 156.952Z" fill="#485264"/>
<line x1="141.222" y1="161.859" x2="396.841" y2="161.859" stroke="#DFE2EA" stroke-width="0.7875"/>
<rect x="76.3269" y="174.502" width="58.6732" height="5.25" rx="2.625" fill="#DFE2EA"/>
<rect x="76.3268" y="174.502" width="58.6732" height="5.25" rx="2.625" fill="#DFE2EA"/>
<rect x="141.562" y="174.502" width="58.6732" height="5.25" rx="2.625" fill="#DFE2EA"/>
<rect x="206.798" y="174.502" width="58.6732" height="5.25" rx="2.625" fill="#DFE2EA"/>
<path d="M184.51 185.348C193.721 199.728 203.855 206.666 220.593 210.05C234.839 212.93 244.543 211.573 257.451 204.893" stroke="#3370FF" stroke-width="2.40329" stroke-dasharray="3.2 3.2"/>
<path d="M182.472 185.198C182.308 183.975 183.529 183.034 184.67 183.503L193.866 187.287C195.24 187.853 195.171 189.822 193.76 190.29L189.564 191.682C189.209 191.8 188.906 192.038 188.709 192.356L186.722 195.547C185.928 196.823 183.974 196.402 183.774 194.913L182.472 185.198Z" fill="#3370FF"/>
<g filter="url(#filter0_dd_4766_19898)">
<rect x="70.5625" y="226.175" width="339.938" height="31.5" rx="6.91639" fill="white"/>
<rect x="70.8452" y="226.458" width="339.372" height="30.9345" rx="6.63366" stroke="#DFE2EA" stroke-width="0.565456"/>
<rect x="82.75" y="239.3" width="58.6732" height="5.25" rx="2.625" fill="#E8EBF0"/>
<rect x="378.615" y="232.467" width="18.6344" height="18.9157" rx="2.85316" fill="#F0F1F6"/>
<path d="M184.511 185.348C193.722 199.728 203.856 206.666 220.594 210.05C234.84 212.93 244.544 211.573 257.452 204.893" stroke="#3370FF" stroke-width="2.40329" stroke-dasharray="3.2 3.2"/>
<path d="M182.473 185.198C182.309 183.975 183.53 183.034 184.67 183.503L193.866 187.287C195.24 187.853 195.171 189.822 193.761 190.29L189.565 191.682C189.21 191.8 188.907 192.038 188.709 192.356L186.723 195.547C185.929 196.823 183.974 196.402 183.774 194.913L182.473 185.198Z" fill="#3370FF"/>
<g filter="url(#filter0_dd_14774_424)">
<rect x="70.5624" y="226.175" width="339.938" height="31.5" rx="6.91639" fill="white"/>
<rect x="70.8451" y="226.458" width="339.372" height="30.9345" rx="6.63366" stroke="#DFE2EA" stroke-width="0.565456"/>
<rect x="82.7498" y="239.3" width="58.6732" height="5.25" rx="2.625" fill="#E8EBF0"/>
<rect x="378.614" y="232.467" width="18.6344" height="18.9157" rx="2.85316" fill="#F0F1F6"/>
</g>
<rect x="8.6106" y="34.5865" width="22.5656" height="5.46791" rx="2.73395" fill="#DFE2EA"/>
<rect x="8.6106" y="48.86" width="41.6007" height="5.46791" rx="2.73395" fill="#DFE2EA"/>
<mask id="path-28-inside-2_4766_19898" fill="white">
<path d="M0.290283 11.3545C0.290283 5.5555 4.99129 0.854492 10.7903 0.854492H412.133C417.932 0.854492 422.633 5.5555 422.633 11.3545V20.7646H0.290283V11.3545Z"/>
<rect x="8.61066" y="34.5865" width="22.5656" height="5.46791" rx="2.73395" fill="#DFE2EA"/>
<rect x="8.61066" y="48.86" width="41.6007" height="5.46791" rx="2.73395" fill="#DFE2EA"/>
<mask id="path-28-inside-2_14774_424" fill="white">
<path d="M0.290329 11.3545C0.290329 5.5555 4.99134 0.854492 10.7903 0.854492H412.133C417.932 0.854492 422.633 5.5555 422.633 11.3545V20.7646H0.290329V11.3545Z"/>
</mask>
<path d="M0.290283 11.3545C0.290283 5.5555 4.99129 0.854492 10.7903 0.854492H412.133C417.932 0.854492 422.633 5.5555 422.633 11.3545V20.7646H0.290283V11.3545Z" fill="#F0F1F6"/>
<path d="M0.290283 0.854492H422.633H0.290283ZM422.633 21.4208H0.290283V20.1083H422.633V21.4208ZM0.290283 20.7646V0.854492V20.7646ZM422.633 0.854492V20.7646V0.854492Z" fill="#DFE2EA" mask="url(#path-28-inside-2_4766_19898)"/>
<circle cx="17.4036" cy="11.6514" r="3.64527" fill="#C4CBD7"/>
<circle cx="31.9846" cy="11.6514" r="3.64527" fill="#C4CBD7"/>
<circle cx="46.5657" cy="11.6514" r="3.64527" fill="#C4CBD7"/>
<path d="M0.290329 11.3545C0.290329 5.5555 4.99134 0.854492 10.7903 0.854492H412.133C417.932 0.854492 422.633 5.5555 422.633 11.3545V20.7646H0.290329V11.3545Z" fill="#F0F1F6"/>
<path d="M0.290329 0.854492H422.633H0.290329ZM422.633 21.4208H0.290329V20.1083H422.633V21.4208ZM0.290329 20.7646V0.854492V20.7646ZM422.633 0.854492V20.7646V0.854492Z" fill="#DFE2EA" mask="url(#path-28-inside-2_14774_424)"/>
<circle cx="17.4037" cy="11.6514" r="3.64527" fill="#C4CBD7"/>
<circle cx="31.9848" cy="11.6514" r="3.64527" fill="#C4CBD7"/>
<circle cx="46.5659" cy="11.6514" r="3.64527" fill="#C4CBD7"/>
</g>
<rect x="0.5" y="0.5" width="421" height="270.5" rx="8.375" stroke="#E8EBF0"/>
<defs>
<filter id="filter0_dd_4766_19898" x="64.7988" y="222.717" width="351.465" height="43.0273" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<filter id="filter0_dd_14774_424" x="64.7988" y="222.717" width="351.465" height="43.0273" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="0.288183"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.0745098 0 0 0 0 0.2 0 0 0 0 0.419608 0 0 0 0.08 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4766_19898"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_14774_424"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="2.30546"/>
<feGaussianBlur stdDeviation="2.88183"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.0745098 0 0 0 0 0.2 0 0 0 0 0.419608 0 0 0 0.08 0"/>
<feBlend mode="normal" in2="effect1_dropShadow_4766_19898" result="effect2_dropShadow_4766_19898"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_4766_19898" result="shape"/>
<feBlend mode="normal" in2="effect1_dropShadow_14774_424" result="effect2_dropShadow_14774_424"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_14774_424" result="shape"/>
</filter>
<linearGradient id="paint0_linear_4766_19898" x1="392.781" y1="37.1749" x2="385.034" y2="57.628" gradientUnits="userSpaceOnUse">
<linearGradient id="paint0_linear_14774_424" x1="392.781" y1="37.1749" x2="385.034" y2="57.628" gradientUnits="userSpaceOnUse">
<stop stop-color="#3E78FF"/>
<stop offset="1" stop-color="#78A0FF"/>
</linearGradient>
<linearGradient id="paint1_linear_4766_19898" x1="80.4338" y1="94.5688" x2="80.4338" y2="104.972" gradientUnits="userSpaceOnUse">
<linearGradient id="paint1_linear_14774_424" x1="80.4337" y1="94.5688" x2="80.4337" y2="104.972" gradientUnits="userSpaceOnUse">
<stop stop-color="#326DFF"/>
<stop offset="1" stop-color="#8EAEFF"/>
</linearGradient>
<linearGradient id="paint2_linear_4766_19898" x1="80.4338" y1="94.5688" x2="80.4338" y2="104.972" gradientUnits="userSpaceOnUse">
<linearGradient id="paint2_linear_14774_424" x1="80.4337" y1="94.5688" x2="80.4337" y2="104.972" gradientUnits="userSpaceOnUse">
<stop stop-color="#326DFF"/>
<stop offset="1" stop-color="#8EAEFF"/>
</linearGradient>
<linearGradient id="paint3_linear_4766_19898" x1="80.4338" y1="94.5688" x2="80.4338" y2="104.972" gradientUnits="userSpaceOnUse">
<linearGradient id="paint3_linear_14774_424" x1="80.4337" y1="94.5688" x2="80.4337" y2="104.972" gradientUnits="userSpaceOnUse">
<stop stop-color="#326DFF"/>
<stop offset="1" stop-color="#8EAEFF"/>
</linearGradient>
<linearGradient id="paint4_linear_4766_19898" x1="80.4338" y1="94.5688" x2="80.4338" y2="104.972" gradientUnits="userSpaceOnUse">
<linearGradient id="paint4_linear_14774_424" x1="80.4337" y1="94.5688" x2="80.4337" y2="104.972" gradientUnits="userSpaceOnUse">
<stop stop-color="#326DFF"/>
<stop offset="1" stop-color="#8EAEFF"/>
</linearGradient>
<linearGradient id="paint5_linear_4766_19898" x1="80.4338" y1="94.5688" x2="80.4338" y2="104.972" gradientUnits="userSpaceOnUse">
<linearGradient id="paint5_linear_14774_424" x1="80.4337" y1="94.5688" x2="80.4337" y2="104.972" gradientUnits="userSpaceOnUse">
<stop stop-color="#326DFF"/>
<stop offset="1" stop-color="#8EAEFF"/>
</linearGradient>
<linearGradient id="paint6_linear_4766_19898" x1="80.4338" y1="94.5688" x2="80.4338" y2="104.972" gradientUnits="userSpaceOnUse">
<linearGradient id="paint6_linear_14774_424" x1="80.4337" y1="94.5688" x2="80.4337" y2="104.972" gradientUnits="userSpaceOnUse">
<stop stop-color="#326DFF"/>
<stop offset="1" stop-color="#8EAEFF"/>
</linearGradient>
<linearGradient id="paint7_linear_4766_19898" x1="80.4338" y1="94.5688" x2="80.4338" y2="104.972" gradientUnits="userSpaceOnUse">
<linearGradient id="paint7_linear_14774_424" x1="80.4337" y1="94.5688" x2="80.4337" y2="104.972" gradientUnits="userSpaceOnUse">
<stop stop-color="#326DFF"/>
<stop offset="1" stop-color="#8EAEFF"/>
</linearGradient>
<clipPath id="clip0_4766_19898">
<clipPath id="clip0_14774_424">
<rect x="1" y="1" width="420" height="269.5" rx="7.875" fill="white"/>
</clipPath>
</defs>

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,13 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_19_417)">
<path d="M8.69132 19.7708L8.43646 10.1106C7.92262 9.92227 9.99843 7.48009 10.8505 7.6956C13.3489 7.06769 16.0648 3.09118 11.1064 0.142151C-3.89673 0.142151 -2.25275 18.589 8.69132 19.7708Z" fill="#B3DDF2"/>
<path d="M8.64384 19.7663C4.17343 18.7386 -0.201612 12.4833 5.14972 6.86892C6.37883 5.78554 3.9237 2.58709 1.91253 4.3511C-3.43099 11.7411 3.5968 19.7863 8.64384 19.7663Z" fill="#0055E9"/>
<path d="M7.92307 10.4705C7.79974 10.5592 7.92307 10.4191 7.92307 10.4705V10.4705ZM7.92307 10.4705V11.2412C7.92307 11.344 7.77919 12.0274 7.71753 12.3203L8.48829 13.9646C8.48829 13.9646 9.00213 14.1187 9.05351 14.1701C9.1049 14.2215 9.35668 14.2575 9.46459 14.2729L10.5436 14.9409L12.3421 14.684L14.6544 13.9646L16.8125 12.1148L17.4805 10.9843L18.0457 8.1068L17.9429 6.77082V5.58898L16.7611 3.43086L16.1445 2.6601L15.0654 1.6838L14.1405 1.11858L13.8836 0.964424L13.5753 0.861657L13.0101 0.656121L11.2116 0.193665C15.1168 1.47826 15.4251 5.43483 14.2947 7.33604C13.1642 9.23725 10.715 10.3348 8.33414 10.1108L7.92307 10.4705Z" fill="#00BCFF"/>
<path d="M8.95026 19.7715C12.4444 20.6959 20.0974 17.3601 19.9978 10.2141C20.2549 7.02775 17.2808 0.68943 12.4444 0.451111C17.8362 1.54919 19.8961 11.4535 12.9079 13.9137C9.41293 14.7872 8.12863 12.1153 8.38607 10.2141C4.79042 10.3958 2.88305 18.1057 8.95026 19.7715Z" fill="#0055DF"/>
</g>
<defs>
<clipPath id="clip0_19_417">
<rect width="20" height="20" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,9 +1,4 @@
<svg t="1719125004089" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2490"
width="200" height="200">
<path
d="M415.185455 477.696v314.554182c-22.248727 106.496-170.449455 79.034182-171.101091 1.768727-0.698182-97.047273 0-193.396364 0-289.792V392.564364c0-13.963636-3.165091-24.994909-16.011637-33.792-24.994909-17.780364-54.923636 3.165091-55.575272 28.858181-1.396364 34.443636-0.698182 68.189091-1.396364 102.213819 0 26.810182 0 52.922182 0.698182 79.685818C153.320727 687.522909 3.397818 667.927273 0 570.228364v-81.733819c0-26.810182 54.923636-33.093818 52.224 6.981819-1.768727 19.828364-0.651636 40.308364-1.349818 59.904-0.651636 35.095273 55.621818 58.740364 68.887273 1.349818 0.698182-47.290182 0.698182-94.580364 0.698181-142.336 0-59.857455 17.780364-108.497455 84.247273-113.012364 28.811636-2.466909 47.941818 8.983273 66.373818 28.858182 6.981818 6.981818 23.645091 29.230545 24.343273 53.527273 0 22.341818 0.651636 44.590545 0.651636 67.118545 0 44.590545-0.651636 89.367273-0.651636 133.957818 0 28.858182 0.651636 57.437091 0.651636 85.597091 0 35.793455 0 72.052364-0.651636 107.845818-0.698182 46.592 58.740364 45.940364 68.235636-0.698181 0-54.923636 0.651636-109.195636 0.651637-164.119273 0-135.354182-0.651636-270.661818-0.651637-405.969455 0-13.963636-2.048-52.922182 5.818182-67.118545 41.425455-96.349091 167.330909-54.272 168.448 25.460364 2.466909 163.467636 0 328.750545 0.651637 492.63709 0 56.785455-48.407273 44.590545-51.10691 22.341819 0-170.496 0-341.643636 0.698182-511.860364-2.466909-42.775273-68.887273-36.910545-72.750545-6.283636-1.349818 35.141818-0.651636 70.935273-1.349818 106.030545v208.756364h0.698181l0.465455 0.232727z"
fill="#AE70FF" p-id="2491"></path>
<path
d="M609.745455 475.182545v231.005091V161.047273c21.643636-107.194182 169.797818-79.266909 170.449454-2.001455 0.698182 96.349091 0 193.396364 0.698182 289.745455 0 36.957091 0 74.100364-0.698182 111.010909 0 14.661818 3.816727 24.994909 16.663273 34.443636 24.343273 17.361455 54.272-3.118545 55.621818-29.230545 1.349818-33.792 0.651636-67.584 0.651636-102.260364V383.534545c18.478545-117.992727 168.029091-98.397091 171.147637-0.698181v296.075636c0 26.810182-54.272 33.140364-51.805091-6.981818 1.396364-20.48 0-254.603636 0.698182-275.130182 1.349818-34.443636-55.621818-58.786909-68.887273-0.698182v141.637818c0 60.602182-17.826909 108.544-84.898909 113.710546-63.301818 1.396364-88.715636-40.308364-90.763637-82.385455V282.856727c0-36.491636 0-72.052364 0.698182-107.845818 0.651636-46.592-58.786909-46.592-68.887272 0.698182v640.791273c0 13.963636 2.001455 52.922182-5.213091 67.118545-41.425455 96.349091-167.936 54.272-169.099637-25.460364v-75.86909c3.165091-51.106909 48.407273-38.958545 50.455273-17.361455v90.065455c2.466909 42.821818 68.887273 37.608727 72.052364 6.330181 1.349818-35.141818 1.349818-70.283636 1.349818-106.077091V475.229091H609.745455z"
fill="#AE70FF" p-id="2492"></path>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none">
<path d="M8.33595 9.4104V14.8168C7.95355 16.6472 5.40635 16.1752 5.39515 14.8472C5.38315 13.1792 5.39515 11.5232 5.39515 9.8664V7.9472C5.39515 7.7072 5.34075 7.5176 5.11995 7.3664C4.69035 7.0608 4.17595 7.4208 4.16475 7.8624C4.14075 8.4544 4.15275 9.0344 4.14075 9.6192C4.14075 10.08 4.14075 10.5288 4.15275 10.9888C3.83515 13.0168 1.25835 12.68 1.19995 11.0008V9.596C1.19995 9.1352 2.14395 9.0272 2.09755 9.716C2.06715 10.0568 2.08635 10.4088 2.07435 10.7456C2.06315 11.3488 3.03035 11.7552 3.25835 10.7688C3.27035 9.956 3.27035 9.1432 3.27035 8.3224C3.27035 7.2936 3.57595 6.4576 4.71835 6.38C5.21355 6.3376 5.54235 6.5344 5.85915 6.876C5.97915 6.996 6.26555 7.3784 6.27755 7.796C6.27755 8.18 6.28875 8.5624 6.28875 8.9496C6.28875 9.716 6.27755 10.4856 6.27755 11.252C6.27755 11.748 6.28875 12.2392 6.28875 12.7232C6.28875 13.3384 6.28875 13.9616 6.27755 14.5768C6.26555 15.3776 7.28715 15.3664 7.45035 14.5648C7.45035 13.6208 7.46155 12.688 7.46155 11.744C7.46155 9.4176 7.45035 7.092 7.45035 4.7664C7.45035 4.5264 7.41515 3.8568 7.55035 3.6128C8.26235 1.9568 10.4264 2.68 10.4456 4.0504C10.488 6.86 10.4456 9.7008 10.4568 12.5176C10.4568 13.4936 9.62475 13.284 9.57835 12.9016C9.57835 9.9712 9.57835 7.0296 9.59035 4.104C9.54795 3.3688 8.40635 3.4696 8.33995 3.996C8.31675 4.6 8.32875 5.2152 8.31675 5.8184V9.4064H8.32875L8.33675 9.4104H8.33595Z" fill="#D4367A"/>
<path d="M11.68 9.36721V13.3376V3.96801C12.052 2.12561 14.5984 2.60561 14.6096 3.93361C14.6216 5.58961 14.6096 7.25761 14.6216 8.91361C14.6216 9.54881 14.6216 10.1872 14.6096 10.8216C14.6096 11.0736 14.6752 11.2512 14.896 11.4136C15.3144 11.712 15.8288 11.36 15.852 10.9112C15.8752 10.3304 15.8632 9.74961 15.8632 9.15361V7.79201C16.1808 5.76401 18.7512 6.10081 18.8048 7.78001V12.8688C18.8048 13.3296 17.872 13.4384 17.9144 12.7488C17.9384 12.3968 17.9144 8.37281 17.9264 8.02001C17.9496 7.42801 16.9704 7.00961 16.7424 8.00801V10.4424C16.7424 11.484 16.436 12.308 15.2832 12.3968C14.1952 12.4208 13.7584 11.704 13.7232 10.9808V6.06161C13.7232 5.43441 13.7232 4.82321 13.7352 4.20801C13.7464 3.40721 12.7248 3.40721 12.5512 4.22001V15.2336C12.5512 15.4736 12.5856 16.1432 12.4616 16.3872C11.7496 18.0432 9.57518 17.32 9.55518 15.9496V14.6456C9.60958 13.7672 10.3872 13.976 10.4224 14.3472V15.8952C10.4648 16.6312 11.6064 16.5416 11.6608 16.004C11.684 15.4 11.684 14.796 11.684 14.1808V9.36801H11.68V9.36721Z" fill="#ED6D48"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,194 @@
import MyIcon from '@fastgpt/web/components/common/Icon';
import MyTooltip from '@fastgpt/web/components/common/MyTooltip';
import { Box, Button, Flex, ModalBody, useDisclosure, Switch, BoxProps } from '@chakra-ui/react';
import React from 'react';
import { useTranslation } from 'next-i18next';
import type { AppQGConfigType } from '@fastgpt/global/core/app/type.d';
import MyModal from '@fastgpt/web/components/common/MyModal';
import QuestionTip from '@fastgpt/web/components/common/MyTooltip/QuestionTip';
import { defaultQGConfig } from '@fastgpt/global/core/app/constants';
import ChatFunctionTip from './Tip';
import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
import { useSystemStore } from '@/web/common/system/useSystemStore';
import AIModelSelector from '@/components/Select/AIModelSelector';
import CustomPromptEditor from '@fastgpt/web/components/common/Textarea/CustomPromptEditor';
import {
PROMPT_QUESTION_GUIDE,
PROMPT_QUESTION_GUIDE_FOOTER
} from '@fastgpt/global/core/ai/prompt/agent';
// question generator config
const QGConfig = ({
value = defaultQGConfig,
onChange
}: {
value?: AppQGConfigType;
onChange: (e: AppQGConfigType) => void;
}) => {
const { t } = useTranslation();
const { isOpen, onOpen, onClose } = useDisclosure();
const isOpenQG = value.open;
const formLabel = isOpenQG
? t('common:core.app.whisper.Open')
: t('common:core.app.whisper.Close');
return (
<Flex alignItems={'center'}>
<MyIcon name={'core/chat/QGFill'} mr={2} w={'20px'} />
<FormLabel>{t('common:core.app.Question Guide')}</FormLabel>
<ChatFunctionTip type={'nextQuestion'} />
<Box flex={1} />
<MyTooltip label={t('app:config_question_guide')}>
<Button
variant={'transparentBase'}
size={'sm'}
mr={'-5px'}
color={'myGray.600'}
onClick={onOpen}
>
{formLabel}
</Button>
</MyTooltip>
{isOpen && <QGConfigModal value={value} onChange={onChange} onClose={onClose} />}
</Flex>
);
};
export default QGConfig;
const LabelStyles: BoxProps = {
display: 'flex',
alignItems: 'center',
fontSize: 'sm',
color: 'myGray.900',
width: ['6rem', '8rem']
};
const QGConfigModal = ({
value,
onClose,
onChange
}: {
value: AppQGConfigType;
onChange: (e: AppQGConfigType) => void;
onClose: () => void;
}) => {
const { t } = useTranslation();
const { llmModelList } = useSystemStore();
const customPrompt = value.customPrompt;
const isOpenQG = value.open;
const model = value?.model || llmModelList?.[0]?.model;
const {
isOpen: isOpenCustomPrompt,
onOpen: onOpenCustomPrompt,
onClose: onCloseCustomPrompt
} = useDisclosure();
return (
<>
<MyModal
title={t('common:core.chat.Question Guide')}
iconSrc="core/chat/QGFill"
isOpen
onClose={onClose}
width="500px"
>
<ModalBody px={[5, 10]} py={[4, 8]} pb={[4, 12]}>
<Flex justifyContent={'space-between'} alignItems={'center'}>
<FormLabel flex={'0 0 100px'}>{t('app:core.app.QG.Switch')}</FormLabel>
<Switch
isChecked={isOpenQG}
onChange={(e) => {
onChange({
...value,
open: e.target.checked
});
}}
/>
</Flex>
{isOpenQG && (
<>
<Flex alignItems={'center'} mt={4}>
<Box {...LabelStyles} mr={2}>
{t('common:core.ai.Model')}
</Box>
<Box flex={'1 0 0'}>
<AIModelSelector
width={'100%'}
value={model}
list={llmModelList.map((item) => ({
value: item.model,
label: item.name
}))}
onchange={(e) => {
onChange({
...value,
model: e
});
}}
/>
</Box>
</Flex>
<Box mt={4}>
<Flex alignItems={'center'} mb={1}>
<FormLabel>{t('app:core.dataset.import.Custom prompt')}</FormLabel>
<QuestionTip ml={1} label={t('common:core.app.QG.Custom prompt tip')} />
<Box flex={1} />
<Button
size="xs"
variant={'transparentBase'}
leftIcon={<MyIcon name={'edit'} w={'14px'} />}
onClick={onOpenCustomPrompt}
>
{t('common:common.Edit')}
</Button>
</Flex>
<Box
position={'relative'}
bg={'myGray.50'}
border={'1px'}
borderColor={'borderColor.base'}
borderRadius={'md'}
maxH={'200px'}
overflow={'auto'}
px={3}
py={2}
fontSize={'sm'}
textAlign={'justify'}
whiteSpace={'pre-wrap'}
_hover={{
'& .mask': {
display: 'block'
}
}}
>
{customPrompt || PROMPT_QUESTION_GUIDE}
</Box>
</Box>
</>
)}
</ModalBody>
</MyModal>
{isOpenCustomPrompt && (
<CustomPromptEditor
defaultValue={customPrompt}
defaultPrompt={PROMPT_QUESTION_GUIDE}
footerPrompt={PROMPT_QUESTION_GUIDE_FOOTER}
onChange={(e) => {
onChange({
...value,
customPrompt: e
});
}}
onClose={onCloseCustomPrompt}
/>
)}
</>
);
};

View File

@@ -1,22 +0,0 @@
import MyIcon from '@fastgpt/web/components/common/Icon';
import { Box, Flex, Switch, type SwitchProps } from '@chakra-ui/react';
import React from 'react';
import { useTranslation } from 'next-i18next';
import ChatFunctionTip from './Tip';
import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
// question generator switch
const QGSwitch = (props: SwitchProps) => {
const { t } = useTranslation();
return (
<Flex alignItems={'center'}>
<MyIcon name={'core/chat/QGFill'} mr={2} w={'20px'} />
<FormLabel color={'myGray.600'}>{t('common:core.app.Question Guide')}</FormLabel>
<ChatFunctionTip type={'nextQuestion'} />
<Box flex={1} />
<Switch {...props} />
</Flex>
);
};
export default QGSwitch;

View File

@@ -29,7 +29,7 @@ const ChatFunctionTip = ({ type }: { type: `${FnTypeEnum}` }) => {
[FnTypeEnum.nextQuestion]: {
icon: '/imgs/app/nextQuestion-icon.svg',
title: t('common:core.app.Question Guide'),
desc: t('common:core.app.Question Guide Tip'),
desc: t('app:question_guide_tip'),
imgUrl: '/imgs/app/nextQuestion.svg'
},
[FnTypeEnum.tts]: {

View File

@@ -2,8 +2,8 @@ import React, { useState, useMemo, useCallback } from 'react';
import { useAudioPlay } from '@/web/common/utils/voice';
import { OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
import {
AppAutoExecuteConfigType,
AppFileSelectConfigType,
AppQGConfigType,
AppTTSConfigType,
AppWhisperConfigType,
ChatInputGuideConfigType,
@@ -12,8 +12,8 @@ import {
import { ChatHistoryItemResType } from '@fastgpt/global/core/chat/type';
import {
defaultAppSelectFileConfig,
defaultAutoExecuteConfig,
defaultChatInputGuideConfig,
defaultQGConfig,
defaultTTSConfig,
defaultWhisperConfig
} from '@fastgpt/global/core/app/constants';
@@ -37,7 +37,7 @@ type useChatStoreType = ChatProviderProps & {
welcomeText: string;
variableList: VariableItemType[];
allVariableList: VariableItemType[];
questionGuide: boolean;
questionGuide: AppQGConfigType;
ttsConfig: AppTTSConfigType;
whisperConfig: AppWhisperConfigType;
autoTTSResponse: boolean;
@@ -72,7 +72,11 @@ type useChatStoreType = ChatProviderProps & {
export const ChatBoxContext = createContext<useChatStoreType>({
welcomeText: '',
variableList: [],
questionGuide: false,
questionGuide: {
open: false,
model: undefined,
customPrompt: undefined
},
ttsConfig: {
type: 'none',
model: undefined,
@@ -143,10 +147,16 @@ const Provider = ({
ChatItemContext,
(v) => v.chatBoxData?.app?.chatConfig?.variables ?? []
);
const questionGuide = useContextSelector(
ChatItemContext,
(v) => v.chatBoxData?.app?.chatConfig?.questionGuide ?? false
);
const questionGuide = useContextSelector(ChatItemContext, (v) => {
const val = v.chatBoxData?.app?.chatConfig?.questionGuide;
if (typeof val === 'boolean') {
return {
...defaultQGConfig,
open: val
};
}
return v.chatBoxData?.app?.chatConfig?.questionGuide ?? defaultQGConfig;
});
const ttsConfig = useContextSelector(
ChatItemContext,
(v) => v.chatBoxData?.app?.chatConfig?.ttsConfig ?? defaultTTSConfig

View File

@@ -335,7 +335,7 @@ const ChatBox = ({
// create question guide
const createQuestionGuide = useCallback(async () => {
if (!questionGuide || chatController.current?.signal?.aborted) return;
if (!questionGuide.open || chatController.current?.signal?.aborted) return;
try {
const abortSignal = new AbortController();
questionGuideController.current = abortSignal;
@@ -344,6 +344,7 @@ const ChatBox = ({
{
appId,
chatId,
questionGuide,
...outLinkAuthData
},
abortSignal
@@ -355,7 +356,7 @@ const ChatBox = ({
}, 100);
}
} catch (error) {}
}, [questionGuide, appId, outLinkAuthData, scrollToBottom]);
}, [questionGuide, appId, chatId, outLinkAuthData, scrollToBottom]);
/* Abort chat completions, questionGuide */
const abortRequest = useMemoizedFn((signal: string = 'stop') => {

View File

@@ -8,15 +8,20 @@ import { NextAPI } from '@/service/middleware/entry';
import { OutLinkChatAuthProps } from '@fastgpt/global/support/permission/chat';
import { getChatItems } from '@fastgpt/service/core/chat/controller';
import { chats2GPTMessages } from '@fastgpt/global/core/chat/adapt';
import { getAppLatestVersion } from '@fastgpt/service/core/app/version/controller';
export type CreateQuestionGuideParams = OutLinkChatAuthProps & {
appId: string;
chatId: string;
questionGuide?: {
open: boolean;
model?: string;
customPrompt?: string;
};
};
async function handler(req: ApiRequestProps<CreateQuestionGuideParams>, res: NextApiResponse<any>) {
const { appId, chatId } = req.body;
const { appId, chatId, questionGuide: inputQuestionGuide } = req.body;
const [{ tmbId, teamId }] = await Promise.all([
authChatCrud({
req,
@@ -27,6 +32,13 @@ async function handler(req: ApiRequestProps<CreateQuestionGuideParams>, res: Nex
]);
// Auth app and get questionGuide config
const questionGuide = await (async () => {
if (inputQuestionGuide) {
return inputQuestionGuide;
}
const { chatConfig } = await getAppLatestVersion(appId);
return chatConfig.questionGuide;
})();
// Get histories
const { histories } = await getChatItems({
@@ -38,15 +50,12 @@ async function handler(req: ApiRequestProps<CreateQuestionGuideParams>, res: Nex
});
const messages = chats2GPTMessages({ messages: histories, reserveId: false });
const qgModel = global.llmModels[0];
const qgModel = questionGuide?.model || global.llmModels[0].model;
const { result, tokens } = await createQuestionGuide({
messages,
model: qgModel.model
});
jsonRes(res, {
data: result
model: qgModel,
customPrompt: questionGuide?.customPrompt
});
pushQuestionGuideUsage({
@@ -54,6 +63,8 @@ async function handler(req: ApiRequestProps<CreateQuestionGuideParams>, res: Nex
teamId,
tmbId
});
return result;
}
export default NextAPI(handler);

View File

@@ -40,7 +40,7 @@ const DatasetSelectModal = dynamic(() => import('@/components/core/app/DatasetSe
const DatasetParamsModal = dynamic(() => import('@/components/core/app/DatasetParamsModal'));
const ToolSelectModal = dynamic(() => import('./components/ToolSelectModal'));
const TTSSelect = dynamic(() => import('@/components/core/app/TTSSelect'));
const QGSwitch = dynamic(() => import('@/components/core/app/QGSwitch'));
const QGConfig = dynamic(() => import('@/components/core/app/QGConfig'));
const WhisperConfig = dynamic(() => import('@/components/core/app/WhisperConfig'));
const InputGuideConfig = dynamic(() => import('@/components/core/app/InputGuideConfig'));
const WelcomeTextConfig = dynamic(() => import('@/components/core/app/WelcomeTextConfig'));
@@ -425,14 +425,14 @@ const EditForm = ({
{/* question guide */}
<Box {...BoxStyles}>
<QGSwitch
isChecked={appForm.chatConfig.questionGuide}
<QGConfig
value={appForm.chatConfig.questionGuide}
onChange={(e) => {
setAppForm((state) => ({
...state,
chatConfig: {
...state.chatConfig,
questionGuide: e.target.checked
questionGuide: e
}
}));
}}

View File

@@ -30,7 +30,7 @@ export const compareSimpleAppSnapshot = (
{
welcomeText: appForm1.chatConfig?.welcomeText || '',
variables: appForm1.chatConfig?.variables || [],
questionGuide: appForm1.chatConfig?.questionGuide || false,
questionGuide: appForm1.chatConfig?.questionGuide || undefined,
ttsConfig: appForm1.chatConfig?.ttsConfig || undefined,
whisperConfig: appForm1.chatConfig?.whisperConfig || undefined,
chatInputGuide: appForm1.chatConfig?.chatInputGuide || undefined,
@@ -39,7 +39,7 @@ export const compareSimpleAppSnapshot = (
{
welcomeText: appForm2.chatConfig?.welcomeText || '',
variables: appForm2.chatConfig?.variables || [],
questionGuide: appForm2.chatConfig?.questionGuide || false,
questionGuide: appForm2.chatConfig?.questionGuide || undefined,
ttsConfig: appForm2.chatConfig?.ttsConfig || undefined,
whisperConfig: appForm2.chatConfig?.whisperConfig || undefined,
chatInputGuide: appForm2.chatConfig?.chatInputGuide || undefined,

View File

@@ -3,7 +3,7 @@ import { NodeProps } from 'reactflow';
import { Box } from '@chakra-ui/react';
import { FlowNodeItemType } from '@fastgpt/global/core/workflow/type/node.d';
import QGSwitch from '@/components/core/app/QGSwitch';
import QGConfig from '@/components/core/app/QGConfig';
import TTSSelect from '@/components/core/app/TTSSelect';
import WhisperConfig from '@/components/core/app/WhisperConfig';
import InputGuideConfig from '@/components/core/app/InputGuideConfig';
@@ -13,7 +13,12 @@ import NodeCard from './render/NodeCard';
import ScheduledTriggerConfig from '@/components/core/app/ScheduledTriggerConfig';
import { useContextSelector } from 'use-context-selector';
import { WorkflowContext } from '../../context';
import { AppChatConfigType, AppDetailType, VariableItemType } from '@fastgpt/global/core/app/type';
import {
AppChatConfigType,
AppDetailType,
AppQGConfigType,
VariableItemType
} from '@fastgpt/global/core/app/type';
import { useMemoizedFn } from 'ahooks';
import VariableEdit from '@/components/core/app/VariableEdit';
import { AppContext } from '@/pages/app/detail/components/context';
@@ -149,17 +154,16 @@ function AutoExecute({ chatConfig: { autoExecute }, setAppDetail }: ComponentPro
);
}
function QuestionGuide({ chatConfig: { questionGuide = false }, setAppDetail }: ComponentProps) {
function QuestionGuide({ chatConfig: { questionGuide }, setAppDetail }: ComponentProps) {
return (
<QGSwitch
isChecked={questionGuide}
<QGConfig
value={questionGuide}
onChange={(e) => {
const value = e.target.checked;
setAppDetail((state) => ({
...state,
chatConfig: {
...state.chatConfig,
questionGuide: value
questionGuide: e
}
}));
}}

View File

@@ -142,7 +142,7 @@ export const AiPointsTable = () => {
{whisperModel?.charsPointsPrice +
t('common:support.wallet.subscription.point') +
' / 60' +
t('common:unit.minute')}
t('common:unit.seconds')}
</Box>
</Flex>
</Box>

View File

@@ -58,10 +58,12 @@ export const emptyTemplates: Record<
},
{
key: 'questionGuide',
valueType: WorkflowIOValueTypeEnum.boolean,
valueType: WorkflowIOValueTypeEnum.object,
renderTypeList: [FlowNodeInputTypeEnum.hidden],
label: 'core.app.Question Guide',
value: false
value: {
open: false
}
},
{
key: 'tts',
@@ -285,10 +287,12 @@ export const emptyTemplates: Record<
},
{
key: 'questionGuide',
valueType: 'boolean',
valueType: 'any',
renderTypeList: ['hidden'],
label: 'core.app.Question Guide',
value: false
value: {
open: false
}
},
{
key: 'tts',