diff --git a/web/app/components/workflow/nodes/knowledge-base/panel.tsx b/web/app/components/workflow/nodes/knowledge-base/panel.tsx index c3dd15ed42..7014e12558 100644 --- a/web/app/components/workflow/nodes/knowledge-base/panel.tsx +++ b/web/app/components/workflow/nodes/knowledge-base/panel.tsx @@ -2,6 +2,7 @@ import type { FC } from 'react' import { memo, useCallback, + useMemo, } from 'react' import { useTranslation } from 'react-i18next' import type { KnowledgeBaseNodeType } from './types' @@ -60,6 +61,25 @@ const Panel: FC> = ({ } }, [data.chunk_structure]) + const chunkTypePlaceHolder = useMemo(() => { + if (!data.chunk_structure) return '' + let placeholder = '' + switch (data.chunk_structure) { + case ChunkStructureEnum.general: + placeholder = 'general_structure' + break + case ChunkStructureEnum.parent_child: + placeholder = 'parent_child_structure' + break + case ChunkStructureEnum.question_answer: + placeholder = 'qa_structure' + break + default: + return '' + } + return placeholder.charAt(0).toUpperCase() + placeholder.slice(1) + }, [data.chunk_structure]) + return (
> = ({ }} fieldProps={{ fieldTitleProps: { - title: t('workflow.nodes.common.inputVars'), + title: t('workflow.nodes.knowledgeBase.chunksInput'), + tooltip: t('workflow.nodes.knowledgeBase.chunksInputTip'), }, }} > @@ -95,6 +116,7 @@ const Panel: FC> = ({ isFilterFileVar isSupportFileVar={false} preferSchemaType + typePlaceHolder={chunkTypePlaceHolder} /> diff --git a/web/i18n/de-DE/workflow.ts b/web/i18n/de-DE/workflow.ts index d512fd87bf..9c83e5af20 100644 --- a/web/i18n/de-DE/workflow.ts +++ b/web/i18n/de-DE/workflow.ts @@ -942,6 +942,8 @@ const translation = { aboutRetrieval: 'Über die Abrufmethode.', chooseChunkStructure: 'Auswählen einer Chunk-Struktur', chunkIsRequired: 'Chunk-Struktur ist erforderlich', + chunksInput: 'Stücke', + chunksInputTip: 'Die Eingangsvariable des Wissensbasis-Knotens sind Chunks. Der Variablentyp ist ein Objekt mit einem spezifischen JSON-Schema, das konsistent mit der ausgewählten Chunk-Struktur sein muss.', }, }, tracing: { diff --git a/web/i18n/en-US/workflow.ts b/web/i18n/en-US/workflow.ts index 19aa984524..6b6a25e7af 100644 --- a/web/i18n/en-US/workflow.ts +++ b/web/i18n/en-US/workflow.ts @@ -950,6 +950,8 @@ const translation = { learnMore: 'Learn more', }, changeChunkStructure: 'Change Chunk Structure', + chunksInput: 'Chunks', + chunksInputTip: 'The input variable of the knowledge base node is Chunks. The variable type is an object with a specific JSON Schema which must be consistent with the selected chunk structure.', aboutRetrieval: 'about retrieval method.', chunkIsRequired: 'Chunk structure is required', indexMethodIsRequired: 'Index method is required', diff --git a/web/i18n/es-ES/workflow.ts b/web/i18n/es-ES/workflow.ts index 60a81d7d1c..1a7c62eab8 100644 --- a/web/i18n/es-ES/workflow.ts +++ b/web/i18n/es-ES/workflow.ts @@ -942,6 +942,8 @@ const translation = { retrievalSettingIsRequired: 'Se requiere configuración de recuperación', chunkStructure: 'Estructura de fragmentos', chunkIsRequired: 'Se requiere una estructura de fragmentos', + chunksInput: 'Trozo', + chunksInputTip: 'La variable de entrada del nodo de la base de conocimientos es Chunks. El tipo de variable es un objeto con un esquema JSON específico que debe ser consistente con la estructura del fragmento seleccionado.', }, }, tracing: { diff --git a/web/i18n/fa-IR/workflow.ts b/web/i18n/fa-IR/workflow.ts index 56e898abdc..6abbcb5c52 100644 --- a/web/i18n/fa-IR/workflow.ts +++ b/web/i18n/fa-IR/workflow.ts @@ -942,6 +942,8 @@ const translation = { aboutRetrieval: 'درباره روش بازیابی.', chunkIsRequired: 'ساختار تکه ای مورد نیاز است', chooseChunkStructure: 'یک ساختار تکه ای را انتخاب کنید', + chunksInput: 'تکه‌ها', + chunksInputTip: 'متغیر ورودی گره پایگاه دانش چانک‌ها است. نوع متغیر یک شیء با یک طرح JSON خاص است که باید با ساختار چانک انتخاب شده سازگار باشد.', }, }, tracing: { diff --git a/web/i18n/fr-FR/workflow.ts b/web/i18n/fr-FR/workflow.ts index ef0da6236d..e68f254273 100644 --- a/web/i18n/fr-FR/workflow.ts +++ b/web/i18n/fr-FR/workflow.ts @@ -942,6 +942,8 @@ const translation = { changeChunkStructure: 'Modifier la structure des morceaux', indexMethodIsRequired: 'La méthode d’indexation est requise', retrievalSettingIsRequired: 'Le paramètre de récupération est requis', + chunksInput: 'Morceaux', + chunksInputTip: 'La variable d\'entrée du nœud de la base de connaissances est Chunks. Le type de variable est un objet avec un schéma JSON spécifique qui doit être cohérent avec la structure de morceau sélectionnée.', }, }, tracing: { diff --git a/web/i18n/hi-IN/workflow.ts b/web/i18n/hi-IN/workflow.ts index c6e28cc84a..9bbfc05f61 100644 --- a/web/i18n/hi-IN/workflow.ts +++ b/web/i18n/hi-IN/workflow.ts @@ -962,6 +962,8 @@ const translation = { changeChunkStructure: 'चंक संरचना बदलें', aboutRetrieval: 'पुनर्प्राप्ति विधि के बारे में।', chooseChunkStructure: 'एक चंक संरचना चुनें', + chunksInput: 'टुकड़े', + chunksInputTip: 'ज्ञान आधार नोड का इनपुट वेरिएबल चंक्स है। वेरिएबल प्रकार एक ऑब्जेक्ट है जिसमें एक विशेष JSON स्कीमा है जो चयनित चंक संरचना के साथ सुसंगत होना चाहिए।', }, }, tracing: { diff --git a/web/i18n/id-ID/workflow.ts b/web/i18n/id-ID/workflow.ts index 182f596596..7bc9b631dd 100644 --- a/web/i18n/id-ID/workflow.ts +++ b/web/i18n/id-ID/workflow.ts @@ -917,6 +917,8 @@ const translation = { retrievalSettingIsRequired: 'Pengaturan pengambilan diperlukan', indexMethodIsRequired: 'Metode indeks diperlukan', chunkStructure: 'Struktur Potongan', + chunksInput: 'Potongan', + chunksInputTip: 'Variabel input dari node basis pengetahuan adalah Chunks. Tipe variabel adalah objek dengan Skema JSON tertentu yang harus konsisten dengan struktur chunk yang dipilih.', }, }, tracing: {}, diff --git a/web/i18n/it-IT/workflow.ts b/web/i18n/it-IT/workflow.ts index c960c80fd2..1df67ba454 100644 --- a/web/i18n/it-IT/workflow.ts +++ b/web/i18n/it-IT/workflow.ts @@ -968,6 +968,8 @@ const translation = { aboutRetrieval: 'Informazioni sul metodo di recupero.', chunkIsRequired: 'È necessaria una struttura a blocchi', retrievalSettingIsRequired: 'È richiesta l\'impostazione di recupero', + chunksInputTip: 'La variabile di input del nodo della base di conoscenza è Chunks. Il tipo di variabile è un oggetto con uno specifico schema JSON che deve essere coerente con la struttura del chunk selezionato.', + chunksInput: 'Pezzetti', }, }, tracing: { diff --git a/web/i18n/ja-JP/workflow.ts b/web/i18n/ja-JP/workflow.ts index ffc503bc21..203f8221cc 100644 --- a/web/i18n/ja-JP/workflow.ts +++ b/web/i18n/ja-JP/workflow.ts @@ -953,6 +953,8 @@ const translation = { retrievalSettingIsRequired: 'リトリーバル設定が必要です', changeChunkStructure: 'チャンク構造を変更する', indexMethodIsRequired: 'インデックスメソッドが必要です', + chunksInput: 'チャンク', + chunksInputTip: '知識ベースノードの入力変数はチャンクです。変数のタイプは、選択されたチャンク構造と一貫性のある特定のJSONスキーマを持つオブジェクトです。', }, }, tracing: { diff --git a/web/i18n/ko-KR/workflow.ts b/web/i18n/ko-KR/workflow.ts index ad40fa5c6d..70fd324f82 100644 --- a/web/i18n/ko-KR/workflow.ts +++ b/web/i18n/ko-KR/workflow.ts @@ -990,6 +990,8 @@ const translation = { changeChunkStructure: '청크 구조 변경', indexMethodIsRequired: '인덱스 메서드가 필요합니다.', retrievalSettingIsRequired: '검색 설정이 필요합니다.', + chunksInput: '청크', + chunksInputTip: '지식 기반 노드의 입력 변수는 Chunks입니다. 변수 유형은 선택된 청크 구조와 일치해야 하는 특정 JSON 스키마를 가진 객체입니다.', }, }, tracing: { diff --git a/web/i18n/pl-PL/workflow.ts b/web/i18n/pl-PL/workflow.ts index ea0b7b6cdb..f4d5b98102 100644 --- a/web/i18n/pl-PL/workflow.ts +++ b/web/i18n/pl-PL/workflow.ts @@ -942,6 +942,8 @@ const translation = { chooseChunkStructure: 'Wybieranie struktury fragmentów', indexMethodIsRequired: 'Metoda indeksowa jest wymagana', chunkIsRequired: 'Wymagana jest struktura porcji', + chunksInput: 'Kawałki', + chunksInputTip: 'Zmienna wejściowa węzła bazy wiedzy to Chunks. Typ zmiennej to obiekt z określonym schematem JSON, który musi być zgodny z wybraną strukturą chunk.', }, }, tracing: { diff --git a/web/i18n/pt-BR/workflow.ts b/web/i18n/pt-BR/workflow.ts index 4ceb72d221..af9ad3ae40 100644 --- a/web/i18n/pt-BR/workflow.ts +++ b/web/i18n/pt-BR/workflow.ts @@ -942,6 +942,8 @@ const translation = { aboutRetrieval: 'sobre o método de recuperação.', chooseChunkStructure: 'Escolha uma estrutura de blocos', indexMethodIsRequired: 'O método de índice é necessário', + chunksInput: 'Pedaços', + chunksInputTip: 'A variável de entrada do nó da base de conhecimento é Chunks. O tipo da variável é um objeto com um esquema JSON específico que deve ser consistente com a estrutura de chunk selecionada.', }, }, tracing: { diff --git a/web/i18n/ro-RO/workflow.ts b/web/i18n/ro-RO/workflow.ts index 375fb46d1d..04f899a460 100644 --- a/web/i18n/ro-RO/workflow.ts +++ b/web/i18n/ro-RO/workflow.ts @@ -942,6 +942,8 @@ const translation = { aboutRetrieval: 'despre metoda de recuperare.', chooseChunkStructure: 'Alegeți o structură de bucăți', changeChunkStructure: 'Modificați structura bucății', + chunksInput: 'Bucăți', + chunksInputTip: 'Variabila de intrare a nodului bazei de cunoștințe este Chunks. Tipul variabilei este un obiect cu un Șchema JSON specific care trebuie să fie coerent cu structura de chunk selectată.', }, }, tracing: { diff --git a/web/i18n/ru-RU/workflow.ts b/web/i18n/ru-RU/workflow.ts index d254b4ff5d..531352c54d 100644 --- a/web/i18n/ru-RU/workflow.ts +++ b/web/i18n/ru-RU/workflow.ts @@ -942,6 +942,8 @@ const translation = { chunkIsRequired: 'Требуется структура чанка', changeChunkStructure: 'Изменение структуры чанка', retrievalSettingIsRequired: 'Настройка извлечения обязательна', + chunksInput: 'Куски', + chunksInputTip: 'Входная переменная узла базы знаний - это Чанки. Тип переменной является объектом с определенной схемой JSON, которая должна соответствовать выбранной структуре чанка.', }, }, tracing: { diff --git a/web/i18n/sl-SI/workflow.ts b/web/i18n/sl-SI/workflow.ts index dffc9b4ecb..2aa192a7ad 100644 --- a/web/i18n/sl-SI/workflow.ts +++ b/web/i18n/sl-SI/workflow.ts @@ -949,6 +949,8 @@ const translation = { chunkStructure: 'Struktura kosov', changeChunkStructure: 'Spreminjanje strukture kosov', aboutRetrieval: 'o metodi iskanja.', + chunksInput: 'Kosi', + chunksInputTip: 'Vhodna spremenljivka vozlišča podatkovne baze je Chunks. Tip spremenljivke je objekt s specifično JSON shemo, ki mora biti skladna z izbrano strukturo kosov.', }, }, tracing: { diff --git a/web/i18n/th-TH/pipeline.ts b/web/i18n/th-TH/pipeline.ts index 7748b80273..6d90b553e3 100644 --- a/web/i18n/th-TH/pipeline.ts +++ b/web/i18n/th-TH/pipeline.ts @@ -27,6 +27,7 @@ const translation = { resultPreview: { viewDetails: 'ดูรายละเอียด', error: 'เกิดข้อผิดพลาดระหว่างการดําเนินการ', + loading: 'กำลังประมวลผล...กรุณารอ', }, }, ragToolSuggestions: { diff --git a/web/i18n/th-TH/workflow.ts b/web/i18n/th-TH/workflow.ts index c3ea5fbab6..d735a82ded 100644 --- a/web/i18n/th-TH/workflow.ts +++ b/web/i18n/th-TH/workflow.ts @@ -942,6 +942,8 @@ const translation = { indexMethodIsRequired: 'ต้องใช้วิธีการจัดทําดัชนี', retrievalSettingIsRequired: 'จําเป็นต้องมีการตั้งค่าการดึงข้อมูล', chunkIsRequired: 'จําเป็นต้องมีโครงสร้างก้อน', + chunksInput: 'ชิ้นส่วน', + chunksInputTip: 'ตัวแปรนำเข้าของโหนดฐานความรู้คือ Chunks ตัวแปรประเภทเป็นอ็อบเจ็กต์ที่มี JSON Schema เฉพาะซึ่งต้องสอดคล้องกับโครงสร้างชิ้นส่วนที่เลือกไว้.', }, }, tracing: { diff --git a/web/i18n/tr-TR/workflow.ts b/web/i18n/tr-TR/workflow.ts index 85b259c55a..f4964e87fb 100644 --- a/web/i18n/tr-TR/workflow.ts +++ b/web/i18n/tr-TR/workflow.ts @@ -943,6 +943,8 @@ const translation = { aboutRetrieval: 'geri alma yöntemi hakkında.', retrievalSettingIsRequired: 'Alma ayarı gereklidir', changeChunkStructure: 'Yığın Yapısını Değiştir', + chunksInput: 'Parçalar', + chunksInputTip: 'Bilgi tabanı düğümünün girdi değişkeni \'Chunks\'tır. Değişkenin tipi, seçilen parça yapısıyla tutarlı olması gereken belirli bir JSON Şemasına sahip bir nesnedir.', }, }, tracing: { diff --git a/web/i18n/uk-UA/workflow.ts b/web/i18n/uk-UA/workflow.ts index 62a67cc2d0..40004b4ea8 100644 --- a/web/i18n/uk-UA/workflow.ts +++ b/web/i18n/uk-UA/workflow.ts @@ -942,6 +942,8 @@ const translation = { indexMethodIsRequired: 'Обов\'язковий індексний метод', chooseChunkStructure: 'Виберіть структуру шматків', retrievalSettingIsRequired: 'Потрібне налаштування для отримання', + chunksInput: 'Частини', + chunksInputTip: 'Вхідна змінна вузла бази знань - це Частини. Тип змінної - об\'єкт з певною JSON-схемою, яка повинна відповідати вибраній структурі частин.', }, }, tracing: { diff --git a/web/i18n/vi-VN/workflow.ts b/web/i18n/vi-VN/workflow.ts index 9c6a76ae16..e85e2e8fc3 100644 --- a/web/i18n/vi-VN/workflow.ts +++ b/web/i18n/vi-VN/workflow.ts @@ -942,6 +942,8 @@ const translation = { changeChunkStructure: 'Thay đổi cấu trúc chunk', chooseChunkStructure: 'Chọn cấu trúc chunk', indexMethodIsRequired: 'Phương pháp chỉ mục là bắt buộc', + chunksInput: 'Mảnh', + chunksInputTip: 'Biến đầu vào của nút cơ sở tri thức là Chunks. Loại biến là một đối tượng với một JSON Schema cụ thể mà phải nhất quán với cấu trúc chunk đã chọn.', }, }, tracing: { diff --git a/web/i18n/zh-Hans/workflow.ts b/web/i18n/zh-Hans/workflow.ts index 80583f5665..0bf078c085 100644 --- a/web/i18n/zh-Hans/workflow.ts +++ b/web/i18n/zh-Hans/workflow.ts @@ -950,6 +950,8 @@ const translation = { learnMore: '了解更多', }, changeChunkStructure: '更改分段结构', + chunksInput: '分块', + chunksInputTip: '知识库节点的输入变量为 Chunks。该变量类型是符合特定 JSON Schema 的对象,必须与所选块结构一致。', aboutRetrieval: '关于知识检索。', chunkIsRequired: '分段结构是必需的', indexMethodIsRequired: '索引方法是必需的', diff --git a/web/i18n/zh-Hant/workflow.ts b/web/i18n/zh-Hant/workflow.ts index 38f25c8e65..ee10c976ed 100644 --- a/web/i18n/zh-Hant/workflow.ts +++ b/web/i18n/zh-Hant/workflow.ts @@ -942,6 +942,8 @@ const translation = { chunkStructure: '區塊結構', changeChunkStructure: '變更區塊結構', retrievalSettingIsRequired: '需要檢索設定', + chunksInput: '區塊', + chunksInputTip: '知識庫節點的輸入變數是 Chunks。該變數類型是一個物件,具有特定的 JSON Schema,必須與所選的塊結構一致。', }, }, tracing: {