diff --git a/web/app/components/workflow/nodes/llm/components/structure-output.tsx b/web/app/components/workflow/nodes/llm/components/structure-output.tsx index a0bba53c27..374262ccf8 100644 --- a/web/app/components/workflow/nodes/llm/components/structure-output.tsx +++ b/web/app/components/workflow/nodes/llm/components/structure-output.tsx @@ -8,6 +8,7 @@ import ShowPanel from '@/app/components/workflow/nodes/_base/components/variable import { useBoolean } from 'ahooks' import JsonSchemaConfigModal from './json-schema-config-modal' import cn from '@/utils/classnames' +import { useTranslation } from 'react-i18next' type Props = { className?: string @@ -20,6 +21,7 @@ const StructureOutput: FC = ({ value, onChange, }) => { + const { t } = useTranslation() const [showConfig, { setTrue: showConfigModal, setFalse: hideConfigModal, @@ -44,14 +46,14 @@ const StructureOutput: FC = ({ onClick={showConfigModal} > -
Configure
+
{t('app.structOutput.configure')}
{value?.schema ? ( ) : ( -
no data
+
{t('app.structOutput.notConfiguredTip')}
)} {showConfig && ( diff --git a/web/app/components/workflow/nodes/llm/panel.tsx b/web/app/components/workflow/nodes/llm/panel.tsx index f4b0b6a0de..6ac1410d8d 100644 --- a/web/app/components/workflow/nodes/llm/panel.tsx +++ b/web/app/components/workflow/nodes/llm/panel.tsx @@ -22,6 +22,7 @@ import Tooltip from '@/app/components/base/tooltip' import Editor from '@/app/components/workflow/nodes/_base/components/prompt/editor' import StructureOutput from './components/structure-output' import Switch from '@/app/components/base/switch' +import { RiAlertFill, RiQuestionLine } from '@remixicon/react' const i18nPrefix = 'workflow.nodes.llm' @@ -278,8 +279,27 @@ const Panel: FC> = ({ +
+ +
{t('app.structOutput.modelNotSupported')}
+
{t('app.structOutput.modelNotSupportedTip')}
+
+ }> +
+ +
+ +
{t('app.structOutput.structured')}
+ {t('app.structOutput.structuredTip')} + }> +
+ +
+