From a56115a66439f04e472feefb1c6abab1ba24661d Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 26 Mar 2024 18:07:35 +0800 Subject: [PATCH] chore: message type i18n --- .../workflow/nodes/llm/components/config-prompt.tsx | 2 +- web/app/components/workflow/nodes/llm/panel.tsx | 4 +++- web/i18n/en-US/workflow.ts | 6 +++++- web/i18n/zh-Hans/workflow.ts | 6 +++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/web/app/components/workflow/nodes/llm/components/config-prompt.tsx b/web/app/components/workflow/nodes/llm/components/config-prompt.tsx index 378aea77ab..51d8b5ef9c 100644 --- a/web/app/components/workflow/nodes/llm/components/config-prompt.tsx +++ b/web/app/components/workflow/nodes/llm/components/config-prompt.tsx @@ -119,7 +119,7 @@ const ConfigPrompt: FC = ({ /> {t(`${i18nPrefix}.roleDescription`)} +
{t(`${i18nPrefix}.roleDescription.${item.role}`)}
} > diff --git a/web/app/components/workflow/nodes/llm/panel.tsx b/web/app/components/workflow/nodes/llm/panel.tsx index 32292f74ea..6405435d68 100644 --- a/web/app/components/workflow/nodes/llm/panel.tsx +++ b/web/app/components/workflow/nodes/llm/panel.tsx @@ -201,7 +201,9 @@ const Panel: FC> = ({ title={
user
{t('workflow.nodes.llm.roleDescription.user')}
+ } >
diff --git a/web/i18n/en-US/workflow.ts b/web/i18n/en-US/workflow.ts index f306e7d67e..2313b49f3b 100644 --- a/web/i18n/en-US/workflow.ts +++ b/web/i18n/en-US/workflow.ts @@ -167,7 +167,11 @@ const translation = { context: 'context', contextTooltip: 'You can import Knowledge as context', prompt: 'prompt', - roleDescription: 'Message role', + roleDescription: { + system: 'Give high level instructions for the conversation', + user: 'Provide instructions, queries, or any text-based input to the model', + assistant: 'The model’s responses based on the user messages', + }, addMessage: 'Add Message', vision: 'vision', files: 'Files', diff --git a/web/i18n/zh-Hans/workflow.ts b/web/i18n/zh-Hans/workflow.ts index fea776d64d..76a1973898 100644 --- a/web/i18n/zh-Hans/workflow.ts +++ b/web/i18n/zh-Hans/workflow.ts @@ -168,7 +168,11 @@ const translation = { contextTooltip: '您可以导入知识库作为上下文', prompt: '提示词', addMessage: '添加消息', - roleDescription: '消息角色', + roleDescription: { + system: '为对话提供高层指导', + user: '向模型提供指令、查询或任何基于文本的输入', + assistant: '基于用户消息的模型回复', + }, vision: '视觉', files: '文件', resolution: {