diff --git a/packages/global/common/system/types/index.d.ts b/packages/global/common/system/types/index.d.ts
index 3200c653d..63c418266 100644
--- a/packages/global/common/system/types/index.d.ts
+++ b/packages/global/common/system/types/index.d.ts
@@ -34,6 +34,7 @@ export type FastGPTFeConfigsType = {
show_openai_account?: boolean;
show_promotion?: boolean;
show_team_chat?: boolean;
+ show_compliance_documentation?: boolean;
concatMd?: string;
docUrl?: string;
diff --git a/packages/web/i18n/en/common.json b/packages/web/i18n/en/common.json
index b437ecf07..e73c180d7 100644
--- a/packages/web/i18n/en/common.json
+++ b/packages/web/i18n/en/common.json
@@ -292,6 +292,10 @@
"comon": {
"Continue_Adding": "Continue Adding"
},
+ "compliance": {
+ "chat": "The content is generated by third-party AI and cannot be guaranteed to be true and accurate. It is for reference only.",
+ "compliance.dataset": "Please ensure that your content strictly complies with relevant laws and regulations and avoid containing any illegal or infringing content. \nPlease be careful when uploading materials that may contain sensitive information."
+ },
"confirm_choice": "Confirm Choice",
"contribute_app_template": "Contribute Template",
"core": {
@@ -1482,4 +1486,4 @@
"verification": "Verification",
"xx_search_result": "{{key}} Search Results",
"yes": "Yes"
-}
\ No newline at end of file
+}
diff --git a/packages/web/i18n/zh/common.json b/packages/web/i18n/zh/common.json
index 3a6971032..e7d2ced72 100644
--- a/packages/web/i18n/zh/common.json
+++ b/packages/web/i18n/zh/common.json
@@ -19,6 +19,10 @@
"switch_package_a": "套餐使用规则为优先使用更高级的套餐,因此,购买的新套餐若比当前套餐更高级,则新套餐立即生效:否则将继续使用当前套餐。",
"switch_package_q": "是否切换订阅套餐?"
},
+ "compliance": {
+ "chat": "内容由第三方 AI 生成,无法确保真实准确,仅供参考",
+ "dataset": "请确保您的内容严格遵守相关法律法规,避免包含任何违法或侵权的内容。请谨慎上传可能涉及敏感信息的资料。"
+ },
"Folder": "文件夹",
"Login": "登录",
"Move": "移动",
@@ -1482,4 +1486,4 @@
"verification": "验证",
"xx_search_result": "{{key}} 的搜索结果",
"yes": "是"
-}
\ No newline at end of file
+}
diff --git a/projects/app/src/components/core/chat/ChatContainer/ChatBox/Input/ChatInput.tsx b/projects/app/src/components/core/chat/ChatContainer/ChatBox/Input/ChatInput.tsx
index 4f3e8e4b6..486d29775 100644
--- a/projects/app/src/components/core/chat/ChatContainer/ChatBox/Input/ChatInput.tsx
+++ b/projects/app/src/components/core/chat/ChatContainer/ChatBox/Input/ChatInput.tsx
@@ -38,6 +38,7 @@ import { clone } from 'lodash';
import { formatFileSize } from '@fastgpt/global/common/file/tools';
import MyBox from '@fastgpt/web/components/common/MyBox';
import { getErrText } from '@fastgpt/global/common/error/utils';
+import ComplianceTip, { TipTypeEnum } from '@/components/support/compliance/ComplianceTip';
const InputGuideBox = dynamic(() => import('./InputGuideBox'));
@@ -709,6 +710,7 @@ const ChatInput = ({
{RenderTextarea}
+
);
};
diff --git a/projects/app/src/components/core/chat/ChatContainer/PluginRunBox/components/RenderOutput.tsx b/projects/app/src/components/core/chat/ChatContainer/PluginRunBox/components/RenderOutput.tsx
index 196bf4c58..6eaebf353 100644
--- a/projects/app/src/components/core/chat/ChatContainer/PluginRunBox/components/RenderOutput.tsx
+++ b/projects/app/src/components/core/chat/ChatContainer/PluginRunBox/components/RenderOutput.tsx
@@ -6,6 +6,7 @@ import Markdown from '@/components/Markdown';
import { FlowNodeTypeEnum } from '@fastgpt/global/core/workflow/node/constant';
import AIResponseBox from '../../../components/AIResponseBox';
import { useTranslation } from 'next-i18next';
+import ComplianceTip, { TipTypeEnum } from '@/components/support/compliance/ComplianceTip';
const RenderOutput = () => {
const { histories, isChatting } = useContextSelector(PluginRunContext, (v) => v);
const { t } = useTranslation();
@@ -49,6 +50,7 @@ const RenderOutput = () => {
) : null}
+
>
);
};
diff --git a/projects/app/src/components/support/compliance/ComplianceTip.tsx b/projects/app/src/components/support/compliance/ComplianceTip.tsx
new file mode 100644
index 000000000..e1e3d7590
--- /dev/null
+++ b/projects/app/src/components/support/compliance/ComplianceTip.tsx
@@ -0,0 +1,36 @@
+import { useSystemStore } from '@/web/common/system/useSystemStore';
+import { Box, BoxProps } from '@chakra-ui/react';
+import { useTranslation } from 'next-i18next';
+import { useMemo } from 'react';
+export enum TipTypeEnum {
+ chat = 'chat',
+ dataset = 'dataset'
+}
+const ChatTip = ({ type, ...props }: { type: `${TipTypeEnum}` } & BoxProps) => {
+ const { t } = useTranslation();
+ const { feConfigs } = useSystemStore();
+ const textMap = useMemo(() => {
+ return {
+ [TipTypeEnum.chat]: t('common:compliance.chat'),
+ [TipTypeEnum.dataset]: t('common:compliance.dataset')
+ };
+ }, [t]);
+ return (
+ feConfigs.show_compliance_documentation && (
+
+ {textMap[type]}
+
+ )
+ );
+};
+
+export default ChatTip;
diff --git a/projects/app/src/pages/app/detail/components/useChatTest.tsx b/projects/app/src/pages/app/detail/components/useChatTest.tsx
index d7ca47d5b..aa40a38be 100644
--- a/projects/app/src/pages/app/detail/components/useChatTest.tsx
+++ b/projects/app/src/pages/app/detail/components/useChatTest.tsx
@@ -72,7 +72,7 @@ export const useChatTest = ({
const CustomChatContainer = useMemoizedFn(() =>
appDetail.type === AppTypeEnum.plugin ? (
-
+
)}
+
+
+
+
-
-
-
+
+