From 991398b8d2571b27344ef2138470a6486b086fd3 Mon Sep 17 00:00:00 2001 From: jingyang <72259332+zjy365@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:03:35 +0800 Subject: [PATCH] scripts: add delete-unused-keys (#2115) * scripts: add delete-unused-keys * update script * fix keys * fix ci * update keys * add i18n * update --- package.json | 3 +- packages/global/core/dataset/constants.ts | 8 +- packages/web/i18n/en/app.json | 52 +++-- packages/web/i18n/en/chat.json | 1 + packages/web/i18n/en/common.json | 154 +++++++++++--- packages/web/i18n/en/dataset.json | 1 + packages/web/i18n/en/user.json | 7 +- packages/web/i18n/zh/app.json | 52 +++-- packages/web/i18n/zh/common.json | 134 ++++++++++--- packages/web/i18n/zh/dataset.json | 1 + .../nodes/render/RenderToolInput/index.tsx | 2 +- scripts/i18n/delete-unused-keys.js | 188 ++++++++++++++++++ 12 files changed, 493 insertions(+), 110 deletions(-) create mode 100644 scripts/i18n/delete-unused-keys.js diff --git a/package.json b/package.json index 7aca23d2a..958e805c9 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "gen:theme-typings": "chakra-cli tokens packages/web/styles/theme.ts --out node_modules/.pnpm/node_modules/@chakra-ui/styled-system/dist/theming.types.d.ts", "postinstall": "sh ./scripts/postinstall.sh", "initIcon": "node ./scripts/icon/init.js", - "previewIcon": "node ./scripts/icon/index.js" + "previewIcon": "node ./scripts/icon/index.js", + "checkI18n": "node ./scripts/i18n/delete-unused-keys.js" }, "devDependencies": { "@chakra-ui/cli": "^2.4.1", diff --git a/packages/global/core/dataset/constants.ts b/packages/global/core/dataset/constants.ts index 478875b0a..a417ae748 100644 --- a/packages/global/core/dataset/constants.ts +++ b/packages/global/core/dataset/constants.ts @@ -8,22 +8,22 @@ export enum DatasetTypeEnum { export const DatasetTypeMap = { [DatasetTypeEnum.folder]: { icon: 'common/folderFill', - label: 'Folder Dataset', + label: 'folder_dataset', collectionLabel: 'common.Folder' }, [DatasetTypeEnum.dataset]: { icon: 'core/dataset/commonDataset', - label: 'Common Dataset', + label: 'common_dataset', collectionLabel: 'common.File' }, [DatasetTypeEnum.websiteDataset]: { icon: 'core/dataset/websiteDataset', - label: 'Website Dataset', + label: 'website_dataset', collectionLabel: 'common.Website' }, [DatasetTypeEnum.externalFile]: { icon: 'core/dataset/externalDataset', - label: 'External File', + label: 'external_file', collectionLabel: 'common.File' } }; diff --git a/packages/web/i18n/en/app.json b/packages/web/i18n/en/app.json index 5546d1f63..a9921ef91 100644 --- a/packages/web/i18n/en/app.json +++ b/packages/web/i18n/en/app.json @@ -1,12 +1,18 @@ { - "plugin_cost_per_times": "{{cost}}/per time", + "Run": "Run", "ai_settings": "AI Settings", + "app": { + "modules": { + "click to update": "click to update", + "has new version": "has new version" + } + }, "app_detail": "App Details", "chat_debug": "Chat Debug", - "chat_logs_tips": "Logs will record online, shared and API (chatId required) conversation records for this app", "chat_logs": "Chat Logs", - "confirm_del_app_tip": "Confirm to delete this app and all its chat records?", + "chat_logs_tips": "Logs will record online, shared and API (chatId required) conversation records for this app", "confirm_copy_app_tip": "The system will create an application with the same configuration for you, but the permission will not be copied, please confirm!", + "confirm_del_app_tip": "Confirm to delete this app and all its chat records?", "confirm_delete_folder_tip": "Are you sure to delete this folder? All the following applications and corresponding chat records will be deleted, please confirm!", "copy_one_app": "Copy", "create_copy_success": "Create copy success", @@ -24,39 +30,31 @@ "logs_message_total": "Total Messages", "logs_title": "Title", "mark_count": "Marked Answer Count", - "move_app": "Move app", - "paste_config": "Paste Config", - "plugin_dispatch": "Plugins", - "plugin_dispatch_tip": "It is up to the model to decide which plug-ins to add additional capabilities to. If the plug-in is selected, the knowledge base call is also treated as a special plug-in.", - "publish_channel": "Publish channel", - "publish_success": "Publish success", - "Run": "Run", - "search_app": "Search app", - "setting_app": "Settings", - "setting_plugin": "Setting plugin", - "transition_to_workflow": "Transition to workflow", - "transition_to_workflow_create_new_placeholder": "Create a new application instead of modifying the current one", - "transition_to_workflow_create_new_tip": "After converting to workflow, it will not be able to convert back to simple mode, please confirm!", - "app": { - "modules": { - "click to update": "click to update", - "has new version": "has new version" - } - }, - "common": { - "plugin_cost_per_times": "{{cost}} points/times" - }, "module": { "Confirm Sync": "The template will be updated to the latest template configuration. Fields that do not exist in the template will be deleted (including all custom fields). You are advised to make a copy of the node and then update the original node version.", "Custom Title Tip": "This title will be displayed during the conversation", - "No Modules": "No plugins yet~" + "No Modules": "No plugins yet~", + "type": "\"{{type}}\" type\n{{description}}" }, "modules": { "Title is required": "Module name cannot be empty" }, + "move_app": "Move app", + "paste_config": "Paste Config", + "plugin_cost_per_times": "{{cost}}/per time", + "plugin_dispatch": "Plugins", + "plugin_dispatch_tip": "It is up to the model to decide which plug-ins to add additional capabilities to. If the plug-in is selected, the knowledge base call is also treated as a special plug-in.", + "publish_channel": "Publish channel", + "publish_success": "Publish success", + "search_app": "Search app", + "setting_app": "Settings", + "setting_plugin": "Setting plugin", "template": { "simple_robot": "Simple Robot" }, + "transition_to_workflow": "Transition to workflow", + "transition_to_workflow_create_new_placeholder": "Create a new application instead of modifying the current one", + "transition_to_workflow_create_new_tip": "After converting to workflow, it will not be able to convert back to simple mode, please confirm!", "type": { "All": "All", "Create http plugin tip": "Create plug-ins in batches using OpenAPI schema, compatible with GPTs format.", @@ -74,4 +72,4 @@ "version": { "Revert success": "Revert success" } -} \ No newline at end of file +} diff --git a/packages/web/i18n/en/chat.json b/packages/web/i18n/en/chat.json index 7a9d8dfbf..631f78f6f 100644 --- a/packages/web/i18n/en/chat.json +++ b/packages/web/i18n/en/chat.json @@ -1,5 +1,6 @@ { "chat_input_guide_lexicon_is_empty": "The lexicon has not been configured", + "config_input_guide": "Configure input boot", "config_input_guide_lexicon": "Config", "config_input_guide_lexicon_title": "Config lexicon", "csv_input_lexicon_tip": "Only CSV can be imported in batches. Click to download the template", diff --git a/packages/web/i18n/en/common.json b/packages/web/i18n/en/common.json index 09e34e91b..15e6b777b 100644 --- a/packages/web/i18n/en/common.json +++ b/packages/web/i18n/en/common.json @@ -53,6 +53,7 @@ "Exit": "Exit", "Expired Time": "Expired Time", "Field": "Field", + "File": "File", "Finish": "Finish", "Import": "Import", "Import failed": "Import failed", @@ -71,7 +72,6 @@ "No data": "No data available" }, "Name": "Name", - "name_is_empty": "Name cannot be empty", "Next Step": "Next Step", "No more data": "No more data~", "Not open": "Not open", @@ -82,6 +82,7 @@ "Output": "Output", "Params": "Params", "Password inconsistency": "Passwords do not match", + "Permission": "Permissions", "Please Input Name": "Please enter a name", "Read document": "Read document", "Read intro": "Read intro", @@ -118,6 +119,7 @@ "Username": "Username", "Waiting": "Waiting", "Warning": "Warning", + "Website": "Website", "avatar": { "Select Avatar": "Click to select avatar", "Select Failed": "Select avatar failed" @@ -155,6 +157,7 @@ "UnValid": "Invalid link" }, "month": "Month", + "name_is_empty": "Name cannot be empty", "speech": { "error tip": "Speech to text failed", "not support": "Your browser does not support speech input" @@ -204,6 +207,7 @@ "Onclick to save": "Click to save", "Publish": "Publish", "Publish Confirm": "Confirm to publish the app? It will immediately update the app status across all published channels.", + "Publish app tip": "Once you publish your app, all distribution channels will immediately use that version", "Question Guide": "Guess you want to ask", "Question Guide Tip": "After the conversation ends, it will generate 3 guiding questions.", "Quote prompt": "Quote template prompt", @@ -317,6 +321,7 @@ "Audio Not Support": "Device does not support audio playback", "Audio Speech Error": "Audio speech error", "Cancel Speak": "Cancel voice input", + "Chat API is error or undefined": "Chat API error or undefined", "Confirm to clear history": "Confirm to clear the online chat history of this app? Records of sharing and API calls will not be cleared.", "Confirm to clear share chat history": "Confirm to delete all chat history?", "Converting to text": "Converting to text...", @@ -355,7 +360,10 @@ "Unpin": "Unpin", "You need to a chat app": "You do not have a usable app", "error": { - "Chat error": "Chat error" + "Chat error": "Chat error", + "Messages empty": "API content is empty, text may be too long~", + "Select dataset empty": "You did not select a dataset", + "User input empty": "User question input is empty" }, "feedback": { "Close User Like": "User expressed approval\nClick to close this mark", @@ -363,6 +371,12 @@ "No Content": "User did not provide specific feedback content", "Read User dislike": "User expressed disapproval\nClick to view content" }, + "logs": { + "api": "API call", + "online": "Online use", + "share": "External link call", + "test": "Test" + }, "markdown": { "Edit Question": "Edit question", "Quick Question": "Click to ask now", @@ -385,7 +399,22 @@ "module cq result": "Classification result", "module extract description": "Extract requirement description", "module extract result": "Extraction result", - "module historyPreview": "Complete record" + "module historyPreview": "Complete record", + "module http result": "response body", + "module if else Result": "Determinator result", + "module limit": "Single search limit", + "module maxToken": "Maximum response tokens", + "module model": "Model", + "module name": "Model name", + "module query": "question/search term", + "module quoteList": "Quote content", + "module similarity": "Similarity", + "module temperature": "temperature", + "module time": "Running time", + "module tokens": "total tokens", + "plugin output": "Plugin output value", + "search using reRank": "Result rearrangement", + "text output": "text output" }, "retry": "Regenerate", "tts": { @@ -407,6 +436,7 @@ "Dataset ID": "Dataset ID", "Dataset Type": "Dataset type", "Delete Confirm": "Confirm to delete this dataset? Data cannot be recovered after deletion, please confirm!", + "Empty Dataset": "Empty Dataset", "Empty Dataset Tips": "No datasets yet, go create one!", "Folder placeholder": "This is a directory", "Go Dataset": "Go to dataset", @@ -450,6 +480,12 @@ "status": { "active": "Ready" }, + "sync": { + "result": { + "sameRaw": "Content unchanged, no update needed", + "success": "Start syncing" + } + }, "training": {} }, "data": { @@ -472,14 +508,24 @@ "error": { "Data not found": "Data does not exist or has been deleted", "Start Sync Failed": "Failed to start syncing", - "Template does not exist": "Template does not exist" + "Template does not exist": "Template does not exist", + "unAuthDataset": "Unauthorized to operate this dataset", + "unAuthDatasetCollection": "Unauthorized to operate this collection", + "unAuthDatasetData": "Unauthorized to operate this data", + "unAuthDatasetFile": "Unauthorized to operate this file", + "unCreateCollection": "Unauthorized to operate this data", + "unLinkCollection": "Not a network link collection" }, + "externalFile": "external file repository", "file": "File", + "folder": "Directory", "import": { "Auto mode Estimated Price Tips": "Requires calling the file processing model, consuming more Tokens: {{price}} points/1k Tokens", "Auto process": "Automatic", "Auto process desc": "Automatically set segmentation and preprocessing rules", "Chunk Range": "Range: {{min}}~{{max}}", + "Chunk Split": "Direct segmentation", + "Chunk Split Tip": "Segment the text according to certain rules and convert it into a format that can be semantically searched, suitable for most scenarios. Does not require calling additional models for processing, low cost.", "Custom process": "Custom rules", "Custom process desc": "Customize segmentation and preprocessing rules", "Custom prompt": "Custom prompt words", @@ -502,6 +548,8 @@ "Preview raw text": "Preview raw text (up to 3000 characters)", "Process way": "Processing method", "QA Estimated Price Tips": "Requires calling the file processing model, consuming more AI points: {{price}} points/1k Tokens", + "QA Import": "QA Split", + "QA Import Tip": "According to certain rules, split the text into a larger paragraph, call AI to generate Q&A pairs for that paragraph. Has very high search accuracy, but loses a lot of content details.", "Select file": "Select file", "Select source": "Select source", "Source name": "Source name", @@ -515,6 +563,7 @@ "Web link": "Web link", "Web link desc": "Read static web page content as a dataset" }, + "link": "Link", "search": { "Dataset Search Params": "Knowledge base search configuration", "Empty result response": "Empty search reply", @@ -532,9 +581,28 @@ "Source id": "Source ID", "Source name": "Source name", "Using query extension": "Use question optimization", + "mode": { + "embedding": "Semantic retrieval", + "embedding desc": "Use vectors for text relevance queries", + "fullTextRecall": "Full-text retrieval", + "fullTextRecall desc": "Use traditional full-text retrieval, suitable for finding some keywords and special subject-predicate data", + "mixedRecall": "Mixed retrieval", + "mixedRecall desc": "Return the combined results of vector retrieval and full-text retrieval, sorted using the RRF algorithm." + }, + "score": { + "embedding": "Semantic retrieval", + "embedding desc": "Obtain scores by calculating the distance between vectors, ranging from 0 to 1.", + "fullText": "Full-text retrieval", + "fullText desc": "Calculate the score of the same keywords, ranging from 0 to infinity.", + "reRank": "Result reranking", + "reRank desc": "Calculate the relevance between sentences using the ReRank model, ranging from 0 to 1.", + "rrf": "Comprehensive ranking", + "rrf desc": "Merge multiple search results by inverted calculation." + }, "search mode": "Search mode" }, "status": { + "active": "Ready", "syncing": "Syncing" }, "test": { @@ -553,8 +621,12 @@ }, "training": { "Agent queue": "QA training queue", + "Auto mode": "Enhanced processing (experimental)", + "Auto mode Tip": "Increase the semantic richness of data blocks by generating related questions and summaries through sub-indexes and model calls, which is more conducive to retrieval. Requires more storage space and increases AI call frequency.", + "Chunk mode": "Direct segmentation", "Full": "Estimated more than 5 minutes", "Leisure": "Idle", + "QA mode": "Question and answer split", "Vector queue": "Index queue", "Waiting": "Estimated 5 minutes", "Website Sync": "Web site sync" @@ -660,11 +732,13 @@ "output": { "description": { "Ai response content": "Triggered after the stream response is complete", - "New context": "Concatenate this response content with historical records to return as a new context" + "New context": "Concatenate this response content with historical records to return as a new context", + "query extension result": "Outputs as an array of strings, can directly connect this result to 'Knowledge base search' 'User question', it is recommended not to connect to 'AI dialogue' 'User question'" }, "label": { "Ai response content": "AI response content", - "New context": "New context" + "New context": "New context", + "query extension result": "Optimized result" } }, "template": { @@ -683,14 +757,15 @@ "templates": { "Load plugin error": "Load plugin error" }, - "tool": { - "Tool input": "Tool input" - }, "variable": { + "Custom type": "Custom variable", "add option": "Add option", + "input type": "Text", "key": "Variable key", "key is required": "Variable key is required", + "select type": "Dropdown single select", "text max length": "Maximum length", + "textarea type": "Paragraph", "variable name": "Variable name", "variable name is required": "Variable name cannot be empty", "variable option is required": "Options cannot be all empty", @@ -700,16 +775,11 @@ "variable add option": "Add option" }, "plugin": { - "Free": "The plugin requires no points~", - "Intro placeholder": "If this plugin is used as a tool, this introduction will be used as a prompt.", - "cost": "Plugin cost: ", "Custom headers": "Custom headers", + "Free": "The plugin requires no points~", "Get Plugin Module Detail Failed": "Plugin loading failed", - "Http plugin intro placeholder": "For display only, no actual effect" - }, - "template": { - "Multimodal": "Multimodal", - "Search": "Search" + "Http plugin intro placeholder": "For display only, no actual effect", + "cost": "Plugin cost: " }, "workflow": { "Can not delete node": "This node cannot be deleted", @@ -788,6 +858,7 @@ "Select Dataset": "Select this dataset", "Select Dataset Tips": "Only datasets from the same index model can be selected", "Select Folder": "Enter folder", + "Training Name": "Data Training", "collections": { "Collection Embedding": "{{total}} groups indexing", "Confirm to delete the folder": "Confirm to delete the folder and all its contents?", @@ -823,7 +894,12 @@ }, "error": { "Create failed": "Create failed", - "fileNotFound": "File not found~" + "fileNotFound": "File not found~", + "inheritPermissionError": "Inherit permission Error", + "missingParams": "Insufficient parameters", + "team": { + "overSize": "Team members exceed the limit" + } }, "navbar": { "Account": "Account", @@ -833,7 +909,7 @@ "Tools": "Tools" }, "permission": { - "Collaborator": "", + "Collaborator": "collaborator", "Default permission": "Default permission", "Manage": "Manage", "No InheritPermission": "The permission has been restricted, and the parent folder's permission will not be inherited,", @@ -869,7 +945,8 @@ "Plugin List": "Plugin list", "Search plugin": "Search plugin", "Set Name": "Name the plugin", - "go to laf": "Go to write" + "go to laf": "Go to write", + "path": "Path" }, "select_reference_variable": "Select Reference Variable", "share_link": "Share Link", @@ -969,11 +1046,20 @@ "Status": "Status", "Type": "Order type", "payWay": { - "Way": "Payment method" + "Way": "Payment method", + "balance": "Balance payment", + "wx": "Wechat payment" + }, + "status": { + "closed": "Closed", + "notpay": "Not paid", + "refund": "Refunded", + "success": "Payment successful" } }, "moduleName": { - "index": "Index generation" + "index": "Index generation", + "qa": "QA split" }, "noBill": "No bill records~", "subscription": { @@ -1015,6 +1101,19 @@ "Period": "Subscription period", "Year": "Yearly", "Year sale": "Two months free" + }, + "standardSubLevel": { + "enterprise": "Enterprise edition", + "experience": "Experience edition", + "free": "Free edition", + "free desc": "Basic functions can be used for free every month, and the knowledge base will be cleared if there is no usage record for 30 days", + "team": "Team edition" + }, + "type": { + "balance": "Balance recharge", + "extraDatasetSize": "Knowledge base expansion", + "extraPoints": "AI points package", + "standard": "Plan subscription" } }, "usage": { @@ -1067,7 +1166,7 @@ "Password": "Password", "Pay": "Recharge", "Personal Information": "Personal information", - "Promotion": "", + "Promotion": "Promotion", "Promotion Rate": "Cashback ratio", "Promotion Record": "Promotion record", "Promotion rate tip": "You will receive a certain percentage of balance reward when your friend recharges", @@ -1121,10 +1220,15 @@ "reject": "Reject" }, "member": { - "Confirm Leave": "Confirm to leave this team?" + "Confirm Leave": "Confirm to leave this team?", + "active": "Joined", + "reject": "Reject", + "waiting": "Waiting for Acceptance" }, "role": { - "Admin": "Admin" + "Admin": "Admin", + "Owner": "Owner", + "Visitor": "Visitor" } } } diff --git a/packages/web/i18n/en/dataset.json b/packages/web/i18n/en/dataset.json index 7a0a99de1..4ab7210a0 100644 --- a/packages/web/i18n/en/dataset.json +++ b/packages/web/i18n/en/dataset.json @@ -12,6 +12,7 @@ "external_read_url": "External read url", "external_read_url_tip": "You can configure the reading address of your file library. This allows users to read and authenticate. You can currently use the {{fileId}} variable to refer to the external file ID.", "external_url": "File read url", + "folder_dataset": "Folder", "rebuild_embedding_start_tip": "The task of switching index models has begun", "rebuilding_index_count": "Rebuilding count: {{count}}", "the_knowledge_base_has_indexes_that_are_being_trained_or_being_rebuilt": "The knowledge base has indexes that are being trained or being rebuilt", diff --git a/packages/web/i18n/en/user.json b/packages/web/i18n/en/user.json index b51a6e50b..8dbf48d69 100644 --- a/packages/web/i18n/en/user.json +++ b/packages/web/i18n/en/user.json @@ -1,6 +1,11 @@ { "permission": { - "Write": "Write" + "Manage": "administrator", + "Manage tip": "Team administrator, with full permissions", + "Read": "Read only", + "Read desc": "Members can only read related resources and cannot create new resources.", + "Write": "Write", + "Write tip": "In addition to readable resources, you can also create new resources" }, "team": { "Add manager": "Add manager" diff --git a/packages/web/i18n/zh/app.json b/packages/web/i18n/zh/app.json index 9c119a842..6a3edf42e 100644 --- a/packages/web/i18n/zh/app.json +++ b/packages/web/i18n/zh/app.json @@ -1,12 +1,18 @@ { - "plugin_cost_per_times": "{{cost}}/次", + "Run": "运行", "ai_settings": "AI 配置", + "app": { + "modules": { + "click to update": "点击更新", + "has new version": "有新版本" + } + }, "app_detail": "应用详情", "chat_debug": "调试预览", - "chat_logs_tips": "日志会记录该应用的在线、分享和 API(需填写 chatId)对话记录", "chat_logs": "对话日志", - "confirm_del_app_tip": "确认删除该应用及其所有聊天记录?", + "chat_logs_tips": "日志会记录该应用的在线、分享和 API(需填写 chatId)对话记录", "confirm_copy_app_tip": "系统将为您创建一个相同配置应用,但权限不会进行复制,请确认!", + "confirm_del_app_tip": "确认删除该应用及其所有聊天记录?", "confirm_delete_folder_tip": "确认删除该文件夹?将会删除它下面所有应用及对应的聊天记录,请确认!", "copy_one_app": "创建副本", "create_copy_success": "创建副本成功", @@ -24,39 +30,31 @@ "logs_message_total": "消息总数", "logs_title": "标题", "mark_count": "标注答案数量", - "move_app": "移动应用", - "paste_config": "粘贴配置", - "plugin_dispatch": "插件调用", - "plugin_dispatch_tip": "给模型附加额外的能力,具体调用哪些插件,将由模型自主决定。\n若选择了插件,知识库调用将自动作为一个特殊的插件。", - "publish_channel": "发布渠道", - "publish_success": "发布成功", - "Run": "运行", - "search_app": "搜索应用", - "setting_app": "应用配置", - "setting_plugin": "插件配置", - "transition_to_workflow": "转成工作流", - "transition_to_workflow_create_new_placeholder": "创建一个新的应用,而不是修改当前应用", - "transition_to_workflow_create_new_tip": "转化成工作流后,将无法转化回简易模式,请确认!", - "app": { - "modules": { - "click to update": "点击更新", - "has new version": "有新版本" - } - }, - "common": { - "plugin_cost_per_times": "{{cost}}积分/次" - }, "module": { "Confirm Sync": "将会更新至最新的模板配置,不存在模板中的字段将会被删除(包括所有自定义字段),建议您先复制一份节点,再更新原来节点的版本。", "Custom Title Tip": "该标题名字会展示在对话过程中", - "No Modules": "没找到插件" + "No Modules": "没找到插件", + "type": "\"{{type}}\"类型\n{{description}}" }, "modules": { "Title is required": "模块名不能为空" }, + "move_app": "移动应用", + "paste_config": "粘贴配置", + "plugin_cost_per_times": "{{cost}}/次", + "plugin_dispatch": "插件调用", + "plugin_dispatch_tip": "给模型附加额外的能力,具体调用哪些插件,将由模型自主决定。\n若选择了插件,知识库调用将自动作为一个特殊的插件。", + "publish_channel": "发布渠道", + "publish_success": "发布成功", + "search_app": "搜索应用", + "setting_app": "应用配置", + "setting_plugin": "插件配置", "template": { "simple_robot": "简易机器人" }, + "transition_to_workflow": "转成工作流", + "transition_to_workflow_create_new_placeholder": "创建一个新的应用,而不是修改当前应用", + "transition_to_workflow_create_new_tip": "转化成工作流后,将无法转化回简易模式,请确认!", "type": { "All": "全部", "Create http plugin tip": "通过 OpenAPI Schema 批量创建插件,兼容 GPTs 格式。", @@ -74,4 +72,4 @@ "version": { "Revert success": "回滚成功" } -} \ No newline at end of file +} diff --git a/packages/web/i18n/zh/common.json b/packages/web/i18n/zh/common.json index 203dbcfe2..f07a957b3 100644 --- a/packages/web/i18n/zh/common.json +++ b/packages/web/i18n/zh/common.json @@ -53,6 +53,7 @@ "Exit": "退出", "Expired Time": "过期时间", "Field": "字段", + "File": "文件", "Finish": "完成", "Import": "导入", "Import failed": "导入失败", @@ -71,7 +72,6 @@ "No data": "没有可选值" }, "Name": "名称", - "name_is_empty": "名称不能为空", "Next Step": "下一步", "No more data": "没有更多了~", "Not open": "未开启", @@ -119,6 +119,7 @@ "Username": "用户名", "Waiting": "等待中", "Warning": "警告", + "Website": "网站", "avatar": { "Select Avatar": "点击选择头像", "Select Failed": "选择头像异常" @@ -156,6 +157,7 @@ "UnValid": "无效的链接" }, "month": "月", + "name_is_empty": "名称不能为空", "speech": { "error tip": "语音转文字失败", "not support": "您的浏览器不支持语音输入" @@ -319,6 +321,7 @@ "Audio Not Support": "设备不支持语音播放", "Audio Speech Error": "语音播报异常", "Cancel Speak": "取消语音输入", + "Chat API is error or undefined": "对话接口报错或返回为空", "Confirm to clear history": "确认清空该应用的在线聊天记录?分享和 API 调用的记录不会被清空。", "Confirm to clear share chat history": "确认删除所有聊天记录?", "Converting to text": "正在转换为文本...", @@ -357,7 +360,10 @@ "Unpin": "取消置顶", "You need to a chat app": "你没有可用的应用", "error": { - "Chat error": "对话出现异常" + "Chat error": "对话出现异常", + "Messages empty": "接口内容为空,可能文本超长了~", + "Select dataset empty": "你没有选择知识库", + "User input empty": "传入的用户问题为空" }, "feedback": { "Close User Like": "用户表示赞同\n点击关闭该标记", @@ -365,6 +371,12 @@ "No Content": "用户没有填写具体反馈内容", "Read User dislike": "用户表示反对\n点击查看内容" }, + "logs": { + "api": "API 调用", + "online": "在线使用", + "share": "外部链接调用", + "test": "测试" + }, "markdown": { "Edit Question": "编辑问题", "Quick Question": "点我立即提问", @@ -424,7 +436,7 @@ "Dataset ID": "知识库 ID", "Dataset Type": "知识库类型", "Delete Confirm": "确认删除该知识库?删除后数据无法恢复,请确认!", - "Empty Dataset": "", + "Empty Dataset": "空数据集", "Empty Dataset Tips": "还没有知识库,快去创建一个吧!", "Folder placeholder": "这是一个目录", "Go Dataset": "前往知识库", @@ -468,6 +480,12 @@ "status": { "active": "已就绪" }, + "sync": { + "result": { + "sameRaw": "内容未变动,无需更新", + "success": "开始同步" + } + }, "training": {} }, "data": { @@ -490,14 +508,24 @@ "error": { "Data not found": "数据不存在或已被删除", "Start Sync Failed": "开始同步失败", - "Template does not exist": "模板不存在" + "Template does not exist": "模板不存在", + "unAuthDataset": "无权操作该知识库", + "unAuthDatasetCollection": "无权操作该数据集", + "unAuthDatasetData": "无权操作该数据", + "unAuthDatasetFile": "无权操作该文件", + "unCreateCollection": "无权操作该数据", + "unLinkCollection": "不是网络链接集合" }, + "externalFile": "外部文件库", "file": "文件", + "folder": "目录", "import": { "Auto mode Estimated Price Tips": "需调用文件处理模型,需要消耗较多 tokens:{{price}} 积分/1K tokens", "Auto process": "自动", "Auto process desc": "自动设置分割和预处理规则", "Chunk Range": "范围:{{min}}~{{max}}", + "Chunk Split": "直接分段", + "Chunk Split Tip": "将文本按一定的规则进行分段处理后,转成可进行语义搜索的格式,适合绝大多数场景。不需要调用模型额外处理,成本低。", "Custom process": "自定义规则", "Custom process desc": "自定义设置分制和预处理规则", "Custom prompt": "自定义提示词", @@ -520,6 +548,8 @@ "Preview raw text": "预览源文本(最多 3000 字)", "Process way": "处理方式", "QA Estimated Price Tips": "需调用文件处理模型,需要消耗较多 AI 积分:{{price}} 积分/1K tokens", + "QA Import": "QA 拆分", + "QA Import Tip": "根据一定规则,将文本拆成一段较大的段落,调用 AI 为该段落生成问答对。有非常高的检索精度,但是会丢失很多内容细节。", "Select file": "选择文件", "Select source": "选择来源", "Source name": "来源名", @@ -533,6 +563,7 @@ "Web link": "网页链接", "Web link desc": "读取静态网页内容作为数据集" }, + "link": "链接", "search": { "Dataset Search Params": "知识库搜索配置", "Empty result response": "空搜索回复", @@ -550,9 +581,28 @@ "Source id": "来源 ID", "Source name": "引用来源名", "Using query extension": "使用问题优化", + "mode": { + "embedding": "语义检索", + "embedding desc": "使用向量进行文本相关性查询", + "fullTextRecall": "全文检索", + "fullTextRecall desc": "使用传统的全文检索,适合查找一些关键词和主谓语特殊的数据", + "mixedRecall": "混合检索", + "mixedRecall desc": "使用向量检索与全文检索的综合结果返回,使用 RRF 算法进行排序。" + }, + "score": { + "embedding": "语义检索", + "embedding desc": "通过计算向量之间的距离获取得分,范围为 0~1。", + "fullText": "全文检索", + "fullText desc": "计算相同关键词的得分,范围为 0~无穷。", + "reRank": "结果重排", + "reRank desc": "通过 Rerank 模型计算句子之间的关联度,范围为 0~1。", + "rrf": "综合排名", + "rrf desc": "通过倒排计算的方式,合并多个检索结果。" + }, "search mode": "搜索模式" }, "status": { + "active": "已就绪", "syncing": "同步中" }, "test": { @@ -571,8 +621,12 @@ }, "training": { "Agent queue": "QA 训练排队", + "Auto mode": "增强处理(实验)", + "Auto mode Tip": "通过子索引以及调用模型生成相关问题与摘要,来增加数据块的语义丰富度,更利于检索。需要消耗更多的存储空间和增加 AI 调用次数。", + "Chunk mode": "直接分段", "Full": "预计 5 分钟以上", "Leisure": "空闲", + "QA mode": "问答拆分", "Vector queue": "索引排队", "Waiting": "预计 5 分钟", "Website Sync": "Web 站点同步" @@ -678,11 +732,13 @@ "output": { "description": { "Ai response content": "将在 stream 回复完毕后触发", - "New context": "将本次回复内容拼接上历史记录,作为新的上下文返回" + "New context": "将本次回复内容拼接上历史记录,作为新的上下文返回", + "query extension result": "以字符串数组的形式输出,可将该结果直接连接到“知识库搜索”的“用户问题”中,建议不要连接到“AI 对话”的“用户问题”中" }, "label": { "Ai response content": "AI 回复内容", - "New context": "新的上下文" + "New context": "新的上下文", + "query extension result": "优化结果" } }, "template": { @@ -701,14 +757,15 @@ "templates": { "Load plugin error": "加载插件失败" }, - "tool": { - "Tool input": "工具输入" - }, "variable": { + "Custom type": "自定义变量", "add option": "添加选项", + "input type": "文本", "key": "变量 key", "key is required": "变量 key 是必须的", + "select type": "下拉单选", "text max length": "最大长度", + "textarea type": "段落", "variable name": "变量名", "variable name is required": "变量名不能为空", "variable option is required": "选项不能全空", @@ -718,16 +775,11 @@ "variable add option": "添加选项" }, "plugin": { - "Free": "该插件无需积分消耗~", - "Intro placeholder": "如果该插件作为工具被调用,则会使用该介绍作为提示词。", - "cost": "积分消耗:", "Custom headers": "自定义请求头", + "Free": "该插件无需积分消耗~", "Get Plugin Module Detail Failed": "加载插件异常", - "Http plugin intro placeholder": "仅做展示,无实际效果" - }, - "template": { - "Multimodal": "多模态", - "Search": "搜索" + "Http plugin intro placeholder": "仅做展示,无实际效果", + "cost": "积分消耗:" }, "workflow": { "Can not delete node": "该节点不允许删除", @@ -806,6 +858,7 @@ "Select Dataset": "选择该知识库", "Select Dataset Tips": "仅能选择同一个索引模型的知识库", "Select Folder": "进入文件夹", + "Training Name": "数据训练", "collections": { "Collection Embedding": "{{total}} 组索引中", "Confirm to delete the folder": "确认删除该文件夹及里面所有内容?", @@ -841,7 +894,12 @@ }, "error": { "Create failed": "创建失败", - "fileNotFound": "文件找不到了~" + "fileNotFound": "文件找不到了~", + "inheritPermissionError": "权限继承错误", + "missingParams": "参数缺失", + "team": { + "overSize": "团队成员超出上限" + } }, "navbar": { "Account": "账号", @@ -887,7 +945,8 @@ "Plugin List": "插件列表", "Search plugin": "搜索插件", "Set Name": "给插件取个名字", - "go to laf": "去编写" + "go to laf": "去编写", + "path": "路径" }, "select_reference_variable": "选择引用变量", "share_link": "分享链接", @@ -987,11 +1046,20 @@ "Status": "状态", "Type": "订单类型", "payWay": { - "Way": "支付方式" + "Way": "支付方式", + "balance": "余额支付", + "wx": "微信支付" + }, + "status": { + "closed": "已关闭", + "notpay": "未支付", + "refund": "已退款", + "success": "支付成功" } }, "moduleName": { - "index": "索引生成" + "index": "索引生成", + "qa": "QA 拆分" }, "noBill": "无账单记录~", "subscription": { @@ -1033,6 +1101,19 @@ "Period": "订阅周期", "Year": "按年", "Year sale": "赠送两个月" + }, + "standardSubLevel": { + "enterprise": "企业版", + "experience": "体验版", + "free": "免费版", + "free desc": "每月均可免费使用基础功能,30 天无使用记录时,将会清除知识库", + "team": "团队版" + }, + "type": { + "balance": "余额充值", + "extraDatasetSize": "知识库扩容", + "extraPoints": "AI 积分套餐", + "standard": "套餐订阅" } }, "usage": { @@ -1085,7 +1166,7 @@ "Password": "密码", "Pay": "充值", "Personal Information": "个人信息", - "Promotion": "", + "Promotion": "促销", "Promotion Rate": "返现比例", "Promotion Record": "推广记录", "Promotion rate tip": "好友充值时你将获得一定比例的余额奖励", @@ -1139,10 +1220,15 @@ "reject": "拒绝" }, "member": { - "Confirm Leave": "确认离开该团队?" + "Confirm Leave": "确认离开该团队?", + "active": "已加入", + "reject": "拒绝", + "waiting": "待接受" }, "role": { - "Admin": "管理员" + "Admin": "管理员", + "Owner": "创建者", + "Visitor": "访客" } } } diff --git a/packages/web/i18n/zh/dataset.json b/packages/web/i18n/zh/dataset.json index 15610ed55..711c85775 100644 --- a/packages/web/i18n/zh/dataset.json +++ b/packages/web/i18n/zh/dataset.json @@ -12,6 +12,7 @@ "external_read_url": "外部预览地址", "external_read_url_tip": "可以配置你文件库的阅读地址。便于对用户进行阅读鉴权操作。目前可以使用 {{fileId}} 变量来指代外部文件 ID。", "external_url": "文件访问 URL", + "folder_dataset": "文件夹", "rebuild_embedding_start_tip": "切换索引模型任务已开始", "rebuilding_index_count": "重建中索引数量:{{count}}", "the_knowledge_base_has_indexes_that_are_being_trained_or_being_rebuilt": "知识库有训练中或正在重建的索引", diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderToolInput/index.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderToolInput/index.tsx index 8657326c5..cce4a2d99 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderToolInput/index.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderToolInput/index.tsx @@ -45,7 +45,7 @@ const RenderToolInput = ({ return ( <> - + {dynamicInput && (