Commit 9eb02b7e by Archer Committed by GitHub

feat: plan index;flat i18n and add variable value type (#2762)

* feat: plan index

* flat i18n and add variable value type

* fix: ts

* perf: free plan tip
parent 75af549c
......@@ -91,6 +91,13 @@ ${mdSplitString}
};
};
/*
1. 自定义分隔符:不需要重叠
2. Markdown 标题:不需要重叠;标题嵌套共享。
3. 特殊 markdown 语法:不需要重叠
4. 段落:尽可能保证它是一个完整的段落。
5. 标点分割:重叠
*/
const commonSplit = (props: SplitProps): SplitResponse => {
let { text = '', chunkLen, overlapRatio = 0.2, customReg = [] } = props;
......
......@@ -76,6 +76,9 @@ try {
SubSchema.index({ teamId: 1, type: 1, expiredTime: -1 });
// timer task. Get standard plan;Get free plan;Clear expired extract plan
SubSchema.index({ type: 1, expiredTime: -1, currentSubLevel: 1 });
// unique
SubSchema.index({ teamId: 1, type: 1, currentSubLevel: 1 }, { unique: true });
} catch (error) {
console.log(error);
}
......
......@@ -31,9 +31,7 @@
"no_workflow_response": "No workflow data",
"plugins_output": "Plugin Output",
"question_tip": "From top to bottom, the response order of each module",
"response": {
"node_inputs": "Node Inputs"
},
"response.node_inputs": "Node Inputs",
"select": "Select",
"select_file": "Upload File",
"select_file_img": "Upload file / image",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"Enable": "Enable",
"collection": {
"Create update time": "Creation/Update Time",
"Training type": "Training Mode"
},
"collection.Create update time": "Creation/Update Time",
"collection.Training type": "Training Mode",
"collection_tags": "Collection Tags",
"common_dataset": "General Dataset",
"common_dataset_desc": "Build a Dataset by importing files, web links, or manual input.",
"confirm_to_rebuild_embedding_tip": "Are you sure you want to switch the index for the Dataset?\nSwitching the index is a significant operation that requires re-indexing all data in your Dataset, which may take a long time. Please ensure your account has sufficient remaining points.\n\nAdditionally, you need to update the applications that use this Dataset to avoid conflicts with other indexed model Datasets.",
"dataset": {
"no_collections": "No datasets available",
"no_tags": "No tags available"
},
"dataset.no_collections": "No datasets available",
"dataset.no_tags": "No tags available",
"external_file": "External File Library",
"external_file_dataset_desc": "Import files from an external file library to build a Dataset. The files will not be stored again.",
"external_id": "File Reading ID",
......@@ -21,27 +17,21 @@
"file_model_function_tip": "Enhances indexing and QA generation",
"filename": "Filename",
"folder_dataset": "Folder",
"permission": {
"des": {
"manage": "Can manage the entire knowledge base data and information",
"read": "View knowledge base content",
"write": "Ability to add and change knowledge base content"
}
},
"permission.des.manage": "Can manage the entire knowledge base data and information",
"permission.des.read": "View knowledge base content",
"permission.des.write": "Ability to add and change knowledge base content",
"rebuild_embedding_start_tip": "Index model switching task has started",
"rebuilding_index_count": "Number of indexes being rebuilt: {{count}}",
"tag": {
"Add New": "Add New",
"Add_new_tag": "Add New Tag",
"Edit_tag": "Edit Tag",
"add": "Create",
"cancel": "Cancel",
"delete_tag_confirm": "Confirm to delete the tag?",
"manage": "Tagging",
"searchOrAddTag": "Search or Add Tag",
"tags": "Tags",
"total_tags": "Total {{total}} tags"
},
"tag.Add New": "Add New",
"tag.Add_new_tag": "Add New Tag",
"tag.Edit_tag": "Edit Tag",
"tag.add": "Create",
"tag.cancel": "Cancel",
"tag.delete_tag_confirm": "Confirm to delete the tag?",
"tag.manage": "Tagging",
"tag.searchOrAddTag": "Search or Add Tag",
"tag.tags": "Tags",
"tag.total_tags": "Total {{total}} tags",
"the_knowledge_base_has_indexes_that_are_being_trained_or_being_rebuilt": "The Dataset has indexes that are being trained or rebuilt",
"website_dataset": "Website Sync",
"website_dataset_desc": "Website sync allows you to build a Dataset directly using a web link."
......
......@@ -14,13 +14,11 @@
"key_tips": "You can use the API key to access specific interfaces (cannot access the application, use the in-app API key for that)",
"link_name": "Share Link Name",
"new_feishu_bot": "Add New Feishu Bot",
"official_account": {
"create_modal_title": "Create WeChat Official Account Integration",
"desc": "Connect to WeChat Official Account directly via API",
"edit_modal_title": "Edit WeChat Official Account Integration",
"name": "WeChat Official Account Integration",
"params": "WeChat Official Account Parameters"
},
"official_account.create_modal_title": "Create WeChat Official Account Integration",
"official_account.desc": "Connect to WeChat Official Account directly via API",
"official_account.edit_modal_title": "Edit WeChat Official Account Integration",
"official_account.name": "WeChat Official Account Integration",
"official_account.params": "WeChat Official Account Parameters",
"publish_name": "Name",
"qpm_is_empty": "QPM cannot be empty",
"qpm_tips": "Maximum number of queries per minute per IP",
......@@ -29,12 +27,10 @@
"token_auth": "Token Authentication",
"token_auth_tips": "Token authentication server URL. If provided, a request will be sent to the specified server for authentication before each conversation.",
"token_auth_use_cases": "View Token Authentication Guide",
"wecom": {
"api": "WeCom API",
"bot": "WeCom Bot",
"bot_desc": "Connect to WeCom Bot directly via API",
"create_modal_title": "Create WeCom Bot",
"edit_modal_title": "Edit WeCom Bot",
"title": "Publish to WeCom Bot"
}
"wecom.api": "WeCom API",
"wecom.bot": "WeCom Bot",
"wecom.bot_desc": "Connect to WeCom Bot directly via API",
"wecom.create_modal_title": "Create WeCom Bot",
"wecom.edit_modal_title": "Edit WeCom Bot",
"wecom.title": "Publish to WeCom Bot"
}
\ No newline at end of file
{
"bill": {
"balance": "Balance",
"buy_plan": "Purchase Plan",
"contact_customer_service": "Contact Support",
"conversion": "Conversion",
"convert_error": "Conversion Failed",
"convert_success": "Conversion Successful",
"current_token_price": "Current Token Price",
"not_need_invoice": "Balance payment, invoice not available",
"price": "Price",
"renew_plan": "Renew Plan",
"standard_valid_tip": "Plan Usage Rules: Higher-level plans will be used first. Unused plans will be activated later.",
"token_expire_1year": "Tokens are valid for one year",
"tokens": "Tokens",
"use_balance": "Use Balance",
"use_balance_hint": "Due to system upgrade, the 'Auto-renewal from balance' mode is canceled, and the balance recharge option is closed. Your balance can be used to purchase tokens.",
"valid_time": "Effective Time",
"you_can_convert": "You can convert",
"yuan": "Yuan"
},
"bill.balance": "Balance",
"bill.buy_plan": "Purchase Plan",
"bill.contact_customer_service": "Contact Support",
"bill.conversion": "Conversion",
"bill.convert_error": "Conversion Failed",
"bill.convert_success": "Conversion Successful",
"bill.current_token_price": "Current Token Price",
"bill.not_need_invoice": "Balance payment, invoice not available",
"bill.price": "Price",
"bill.renew_plan": "Renew Plan",
"bill.standard_valid_tip": "Plan Usage Rules: Higher-level plans will be used first. Unused plans will be activated later.",
"bill.token_expire_1year": "Tokens are valid for one year",
"bill.tokens": "Tokens",
"bill.use_balance": "Use Balance",
"bill.use_balance_hint": "Due to system upgrade, the 'Auto-renewal from balance' mode is canceled, and the balance recharge option is closed. Your balance can be used to purchase tokens.",
"bill.valid_time": "Effective Time",
"bill.you_can_convert": "You can convert",
"bill.yuan": "Yuan",
"bill_and_invoices": "Bill & Invoice",
"bind_inform_account_error": "Failed to Bind Notification Account",
"bind_inform_account_success": "Notification Account Bound Successfully",
"delete": {
"admin_failed": "Failed to Delete Admin",
"admin_success": "Admin Deleted Successfully"
},
"delete.admin_failed": "Failed to Delete Admin",
"delete.admin_success": "Admin Deleted Successfully",
"has_chosen": "Selected",
"individuation": "Individuation",
"login": {
"error": "Login Error",
"password_condition": "Password can be up to 60 characters",
"success": "Login Successful"
},
"login.error": "Login Error",
"login.password_condition": "Password can be up to 60 characters",
"login.success": "Login Successful",
"name": "Name",
"notice": "Notice",
"notification": {
"Bind Notification Pipe Hint": "Please bind a notification receiving account to ensure you receive notifications such as plan expiration reminders, ensuring your service runs smoothly.",
"remind_owner_bind": "Please remind the creator to bind a notification account"
},
"notification.Bind Notification Pipe Hint": "Please bind a notification receiving account to ensure you receive notifications such as plan expiration reminders, ensuring your service runs smoothly.",
"notification.remind_owner_bind": "Please remind the creator to bind a notification account",
"operations": "Actions",
"password": {
"code_required": "Verification Code Required",
"code_send_error": "Failed to Send Verification Code",
"code_sended": "Verification Code Sent",
"confirm": "Confirm Password",
"email_phone_error": "Invalid Email/Phone Number Format",
"email_phone_void": "Email/Phone Number Cannot Be Empty",
"get_code": "Get Verification Code",
"get_code_again": "Get Again in s",
"new_password": "New Password (4-20 characters)",
"not_match": "Passwords Do Not Match",
"password_condition": "Password must be between 4 and 20 characters",
"password_required": "Password Cannot Be Empty",
"retrieve": "Retrieve Password",
"retrieved": "Password Retrieved",
"retrieved_account": "Retrieve {{account}} Account",
"to_login": "Go to Login",
"verification_code": "Verification Code"
},
"permission": {
"Manage": "Admin",
"Manage tip": "Team admin with full permissions",
"Read": "Read Only",
"Read desc": "Members can only read related resources, cannot create new resources",
"Write": "Write",
"Write tip": "In addition to read access, can create new resources",
"only_collaborators": "Collaborators Only",
"team_read": "Team Read Access",
"team_write": "Team Write Access"
},
"permission_des": {
"manage": "Can create resources, invite, and delete members",
"read": "Members can only read related resources and cannot create new resources.",
"write": "In addition to readable resources, you can also create new resources"
},
"password.code_required": "Verification Code Required",
"password.code_send_error": "Failed to Send Verification Code",
"password.code_sended": "Verification Code Sent",
"password.confirm": "Confirm Password",
"password.email_phone_error": "Invalid Email/Phone Number Format",
"password.email_phone_void": "Email/Phone Number Cannot Be Empty",
"password.get_code": "Get Verification Code",
"password.get_code_again": "Get Again in s",
"password.new_password": "New Password (4-20 characters)",
"password.not_match": "Passwords Do Not Match",
"password.password_condition": "Password must be between 4 and 20 characters",
"password.password_required": "Password Cannot Be Empty",
"password.retrieve": "Retrieve Password",
"password.retrieved": "Password Retrieved",
"password.retrieved_account": "Retrieve {{account}} Account",
"password.to_login": "Go to Login",
"password.verification_code": "Verification Code",
"permission.Manage": "Admin",
"permission.Manage tip": "Team admin with full permissions",
"permission.Read": "Read Only",
"permission.Read desc": "Members can only read related resources, cannot create new resources",
"permission.Write": "Write",
"permission.Write tip": "In addition to read access, can create new resources",
"permission.only_collaborators": "Collaborators Only",
"permission.team_read": "Team Read Access",
"permission.team_write": "Team Write Access",
"permission_des.manage": "Can create resources, invite, and delete members",
"permission_des.read": "Members can only read related resources and cannot create new resources.",
"permission_des.write": "In addition to readable resources, you can also create new resources",
"permissions": "Permissions",
"personal_information": "Me",
"personalization": "Personalization",
"promotion_records": "Promotion",
"register": {
"confirm": "Confirm Registration",
"register_account": "Register {{account}} Account",
"success": "Registration Successful",
"to_login": "Already have an account? Login"
},
"register.confirm": "Confirm Registration",
"register.register_account": "Register {{account}} Account",
"register.success": "Registration Successful",
"register.to_login": "Already have an account? Login",
"search_user": "Search Username",
"sign_out": "Sign out",
"synchronization": {
"button": "Sync Now",
"placeholder": "Enter Sync Tag",
"title": "Enter the sync tag link and click the sync button to synchronize"
},
"team": {
"Add manager": "Add Admin",
"add_collaborator": "Add Collaborator",
"manage_collaborators": "Manage Collaborators",
"no_collaborators": "No Collaborators"
},
"usage": {
"feishu": "Feishu",
"official_account": "Official Account",
"share": "Share Link",
"wecom": "WeCom"
},
"synchronization.button": "Sync Now",
"synchronization.placeholder": "Enter Sync Tag",
"synchronization.title": "Enter the sync tag link and click the sync button to synchronize",
"team.Add manager": "Add Admin",
"team.add_collaborator": "Add Collaborator",
"team.manage_collaborators": "Manage Collaborators",
"team.no_collaborators": "No Collaborators",
"usage.feishu": "Feishu",
"usage.official_account": "Official Account",
"usage.share": "Share Link",
"usage.wecom": "WeCom",
"usage_record": "Usages"
}
\ No newline at end of file
......@@ -9,10 +9,8 @@
"can_not_loop": "This node can't loop.",
"choose_another_application_to_call": "Select another application to call",
"classification_result": "Classification Result",
"code": {
"Reset template": "Reset Template",
"Reset template confirm": "Confirm reset code template? This will reset all inputs and outputs to template values. Please save your current code."
},
"code.Reset template": "Reset Template",
"code.Reset template confirm": "Confirm reset code template? This will reset all inputs and outputs to template values. Please save your current code.",
"code_execution": "Code Execution",
"collection_metadata_filter": "Collection Metadata Filter",
"complete_extraction_result": "Complete Extraction Result",
......@@ -58,10 +56,8 @@
"http_raw_response_description": "Raw HTTP response. Only accepts string or JSON type response data.",
"http_request": "HTTP Request",
"http_request_error_info": "HTTP request error information, returns empty on success",
"ifelse": {
"Input value": "Input Value",
"Select value": "Select Value"
},
"ifelse.Input value": "Input Value",
"ifelse.Select value": "Select Value",
"input_description": "Field Description",
"input_variable_list": "Type / to invoke variable list",
"intro_assigned_reply": "This module can directly reply with a specified content. Commonly used for guidance or prompts. Non-string content will be converted to string for output.",
......@@ -104,10 +100,8 @@
"optional_value_type_tip": "You can specify one or more data types. When dynamically adding fields, users can only select the configured types.",
"pan_priority": "Touchpad first",
"pass_returned_object_as_output_to_next_nodes": "Pass the object returned in the code as output to the next nodes. The variable name needs to correspond to the return key.",
"plugin": {
"Instruction_Tip": "You can configure an instruction to explain the purpose of the plugin. This instruction will be displayed each time the plugin is used. Supports standard Markdown syntax.",
"Instructions": "Instructions"
},
"plugin.Instruction_Tip": "You can configure an instruction to explain the purpose of the plugin. This instruction will be displayed each time the plugin is used. Supports standard Markdown syntax.",
"plugin.Instructions": "Instructions",
"plugin_input": "Plugin Input",
"question_classification": "Question Classification",
"question_optimization": "Question Optimization",
......@@ -121,29 +115,25 @@
"regex": "Regex",
"reply_text": "Reply Text",
"request_error": "Request Error",
"response": {
"Code log": "Code Log",
"Custom inputs": "Custom Inputs",
"Custom outputs": "Custom Outputs",
"Error": "Error",
"Read file result": "Read File Result",
"read files": "Read Files"
},
"response.Code log": "Code Log",
"response.Custom inputs": "Custom Inputs",
"response.Custom outputs": "Custom Outputs",
"response.Error": "Error",
"response.Read file result": "Read File Result",
"response.read files": "Read Files",
"select_an_application": "Select an Application",
"select_another_application_to_call": "You can choose another application to call",
"special_array_format": "Special array format, returns an empty array when the search result is empty.",
"start_with": "Starts With",
"target_fields_description": "A target field consists of 'description' and 'key'. Multiple target fields can be extracted.",
"template": {
"ai_chat": "AI Chat",
"ai_chat_intro": "AI Large Model Chat",
"dataset_search": "Dataset Search",
"dataset_search_intro": "Use 'semantic search' and 'full-text search' capabilities to find potentially relevant reference content from the 'Dataset'.",
"system_config": "System Configuration",
"tool_call": "Tool Call",
"tool_call_intro": "Automatically select one or more functional blocks for calling through the AI model, or call plugins.",
"workflow_start": "Workflow Start"
},
"template.ai_chat": "AI Chat",
"template.ai_chat_intro": "AI Large Model Chat",
"template.dataset_search": "Dataset Search",
"template.dataset_search_intro": "Use 'semantic search' and 'full-text search' capabilities to find potentially relevant reference content from the 'Dataset'.",
"template.system_config": "System Configuration",
"template.tool_call": "Tool Call",
"template.tool_call_intro": "Automatically select one or more functional blocks for calling through the AI model, or call plugins.",
"template.workflow_start": "Workflow Start",
"template.plugin_output": "Plugin output",
"template.plugin_start": "Plugin start",
"text_concatenation": "Text Concatenation",
......@@ -157,12 +147,11 @@
"update_specified_node_output_or_global_variable": "Can update the output value of a specified node or update global variables",
"use_user_id": "User ID",
"user_question": "User Question",
"value_type": "Value type",
"variable_picker_tips": "Type node name or variable name to search",
"variable_update": "Variable Update",
"workflow": {
"My edit": "My Edit",
"Switch_success": "Switch Successful",
"Team cloud": "Team Cloud",
"exit_tips": "Your changes have not been saved. 'Exit directly' will not save your edits."
}
"workflow.My edit": "My Edit",
"workflow.Switch_success": "Switch Successful",
"workflow.Team cloud": "Team Cloud",
"workflow.exit_tips": "Your changes have not been saved. 'Exit directly' will not save your edits."
}
\ No newline at end of file
......@@ -31,9 +31,7 @@
"no_workflow_response": "没有运行数据",
"plugins_output": "插件输出",
"question_tip": "从上到下,为各个模块的响应顺序",
"response": {
"node_inputs": "节点输入"
},
"response.node_inputs": "节点输入",
"select": "选择",
"select_file": "上传文件",
"select_file_img": "上传文件/图片",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"Enable": "启用",
"collection": {
"Create update time": "创建/更新时间",
"Training type": "训练模式"
},
"collection.Create update time": "创建/更新时间",
"collection.Training type": "训练模式",
"collection_tags": "集合标签",
"common_dataset": "通用知识库",
"common_dataset_desc": "可通过导入文件、网页链接或手动录入形式构建知识库",
"confirm_to_rebuild_embedding_tip": "确认为知识库切换索引?\n切换索引是一个非常重量的操作,需要对您知识库内所有数据进行重新索引,时间可能较长,请确保账号内剩余积分充足。\n\n此外,你还需要注意修改选择该知识库的应用,避免它们与其他索引模型知识库混用。",
"dataset": {
"no_collections": "暂无数据集",
"no_tags": "暂无标签"
},
"dataset.no_collections": "暂无数据集",
"dataset.no_tags": "暂无标签",
"external_file": "外部文件库",
"external_file_dataset_desc": "可以从外部文件库导入文件构建知识库,文件不会进行二次存储",
"external_id": "文件阅读 ID",
......@@ -23,26 +19,20 @@
"folder_dataset": "文件夹",
"rebuild_embedding_start_tip": "切换索引模型任务已开始",
"rebuilding_index_count": "重建中索引数量:{{count}}",
"tag": {
"Add New": "新建",
"Add_new_tag": "新建标签",
"Edit_tag": "编辑标签",
"add": "创建",
"cancel": "取消选择",
"delete_tag_confirm": "确定删除标签?",
"manage": "标签管理",
"searchOrAddTag": "搜索或添加标签",
"tags": "标签",
"total_tags": "共{{total}}个标签"
},
"tag.Add New": "新建",
"tag.Add_new_tag": "新建标签",
"tag.Edit_tag": "编辑标签",
"tag.add": "创建",
"tag.cancel": "取消选择",
"tag.delete_tag_confirm": "确定删除标签?",
"tag.manage": "标签管理",
"tag.searchOrAddTag": "搜索或添加标签",
"tag.tags": "标签",
"tag.total_tags": "共{{total}}个标签",
"the_knowledge_base_has_indexes_that_are_being_trained_or_being_rebuilt": "知识库有训练中或正在重建的索引",
"website_dataset": "Web 站点同步",
"website_dataset_desc": "Web 站点同步允许你直接使用一个网页链接构建知识库",
"permission": {
"des": {
"read": "可查看知识库内容",
"write": "可增加和变更知识库内容",
"manage": "可管理整个知识库数据和信息"
}
}
"permission.des.read": "可查看知识库内容",
"permission.des.write": "可增加和变更知识库内容",
"permission.des.manage": "可管理整个知识库数据和信息"
}
\ No newline at end of file
......@@ -14,13 +14,11 @@
"key_tips": "你可以使用 API 密钥访问一些特定的接口(无法访问应用,访问应用需使用应用内的 API key)",
"link_name": "分享链接的名字",
"new_feishu_bot": "新增飞书机器人",
"official_account": {
"create_modal_title": "创建微信公众号接入",
"desc": "通过 API 直接接入微信公众号",
"edit_modal_title": "编辑微信公众号接入",
"name": "微信公众号接入",
"params": "微信公众号参数"
},
"official_account.create_modal_title": "创建微信公众号接入",
"official_account.desc": "通过 API 直接接入微信公众号",
"official_account.edit_modal_title": "编辑微信公众号接入",
"official_account.name": "微信公众号接入",
"official_account.params": "微信公众号参数",
"publish_name": "名称",
"qpm_is_empty": "QPM 不能为空",
"qpm_tips": "每个 IP 每分钟最多提问多少次",
......@@ -29,12 +27,10 @@
"token_auth": "身份验证",
"token_auth_tips": "身份校验服务器地址,如填写该值,每次对话前都会向指定服务器发送一个请求,进行身份校验",
"token_auth_use_cases": "查看身份验证使用说明",
"wecom": {
"api": "企微 API",
"bot": "企业微信机器人",
"bot_desc": "通过 API 直接接入企业微信机器人",
"create_modal_title": "创建企微机器人",
"edit_modal_title": "编辑企微机器人",
"title": "发布到企业微信机器人"
}
"wecom.api": "企微 API",
"wecom.bot": "企业微信机器人",
"wecom.bot_desc": "通过 API 直接接入企业微信机器人",
"wecom.create_modal_title": "创建企微机器人",
"wecom.edit_modal_title": "编辑企微机器人",
"wecom.title": "发布到企业微信机器人"
}
\ No newline at end of file
{
"bill": {
"balance": "余额",
"buy_plan": "购买套餐",
"contact_customer_service": "联系客服",
"conversion": "兑换",
"convert_error": "兑换失败",
"convert_success": "兑换成功",
"current_token_price": "当前积分价格",
"not_need_invoice": "余额支付,无法开票",
"price": "价格",
"renew_plan": "续费套餐",
"standard_valid_tip": "套餐使用规则:系统优先使用更高级的套餐,原未用完的套餐将延后生效",
"token_expire_1year": "积分有效期一年",
"tokens": "积分",
"use_balance": "使用余额",
"use_balance_hint": "由于系统升级,原“自动续费从余额扣款”模式取消,余额充值入口关闭。您的余额可用于购买积分",
"valid_time": "生效时间",
"you_can_convert": "您可兑换",
"yuan": "元"
},
"bill.balance": "余额",
"bill.buy_plan": "购买套餐",
"bill.contact_customer_service": "联系客服",
"bill.conversion": "兑换",
"bill.convert_error": "兑换失败",
"bill.convert_success": "兑换成功",
"bill.current_token_price": "当前积分价格",
"bill.not_need_invoice": "余额支付,无法开票",
"bill.price": "价格",
"bill.renew_plan": "续费套餐",
"bill.standard_valid_tip": "套餐使用规则:系统优先使用更高级的套餐,原未用完的套餐将延后生效",
"bill.token_expire_1year": "积分有效期一年",
"bill.tokens": "积分",
"bill.use_balance": "使用余额",
"bill.use_balance_hint": "由于系统升级,原“自动续费从余额扣款”模式取消,余额充值入口关闭。您的余额可用于购买积分",
"bill.valid_time": "生效时间",
"bill.you_can_convert": "您可兑换",
"bill.yuan": "元",
"bill_and_invoices": "账单 & 发票",
"bind_inform_account_error": "绑定通知账号异常",
"bind_inform_account_success": "绑定通知账号成功",
"delete": {
"admin_failed": "删除管理员失败",
"admin_success": "删除管理员成功"
},
"delete.admin_failed": "删除管理员失败",
"delete.admin_success": "删除管理员成功",
"has_chosen": "已选择",
"individuation": "个性化",
"login": {
"error": "登录异常",
"password_condition": "密码最多 60 位",
"success": "登录成功"
},
"login.error": "登录异常",
"login.password_condition": "密码最多 60 位",
"login.success": "登录成功",
"name": "名称",
"notice": "通知",
"notification": {
"Bind Notification Pipe Hint": "请绑定通知接收账号,以确保您能正常接收套餐过期提醒等通知,保障您的服务正常运行。",
"remind_owner_bind": "请提醒创建者绑定通知账号"
},
"notification.Bind Notification Pipe Hint": "请绑定通知接收账号,以确保您能正常接收套餐过期提醒等通知,保障您的服务正常运行。",
"notification.remind_owner_bind": "请提醒创建者绑定通知账号",
"operations": "操作",
"password": {
"code_required": "验证码不能为空",
"code_send_error": "验证码发送异常",
"code_sended": "验证码已发送",
"confirm": "确认密码",
"email_phone_error": "邮箱/手机号格式错误",
"email_phone_void": "邮箱/手机号不能为空",
"get_code": "获取验证码",
"get_code_again": "s后重新获取",
"new_password": "新密码(4~20位)",
"not_match": "两次密码不一致",
"password_condition": "密码最少 4 位最多 20 位",
"password_required": "密码不能为空",
"retrieve": "找回密码",
"retrieved": "密码已找回",
"retrieved_account": "找回 {{account}} 账号",
"to_login": "去登录",
"verification_code": "验证码"
},
"permission": {
"Manage": "管理员",
"Manage tip": "团队管理员,拥有全部权限",
"Read": "仅读",
"Read desc": "成员仅可阅读相关资源,无法新建资源",
"Write": "可写",
"Write tip": "除了可读资源外,还可以新建新的资源",
"only_collaborators": "仅协作者访问",
"team_read": "团队可访问",
"team_write": "团队可编辑"
},
"permission_des": {
"manage": "可创建资源、邀请、删除成员",
"read": "成员仅可阅读相关资源,无法新建资源",
"write": "除了可读资源外,还可以新建新的资源"
},
"password.code_required": "验证码不能为空",
"password.code_send_error": "验证码发送异常",
"password.code_sended": "验证码已发送",
"password.confirm": "确认密码",
"password.email_phone_error": "邮箱/手机号格式错误",
"password.email_phone_void": "邮箱/手机号不能为空",
"password.get_code": "获取验证码",
"password.get_code_again": "s后重新获取",
"password.new_password": "新密码(4~20位)",
"password.not_match": "两次密码不一致",
"password.password_condition": "密码最少 4 位最多 20 位",
"password.password_required": "密码不能为空",
"password.retrieve": "找回密码",
"password.retrieved": "密码已找回",
"password.retrieved_account": "找回 {{account}} 账号",
"password.to_login": "去登录",
"password.verification_code": "验证码",
"permission.Manage": "管理员",
"permission.Manage tip": "团队管理员,拥有全部权限",
"permission.Read": "仅读",
"permission.Read desc": "成员仅可阅读相关资源,无法新建资源",
"permission.Write": "可写",
"permission.Write tip": "除了可读资源外,还可以新建新的资源",
"permission.only_collaborators": "仅协作者访问",
"permission.team_read": "团队可访问",
"permission.team_write": "团队可编辑",
"permission_des.manage": "可创建资源、邀请、删除成员",
"permission_des.read": "成员仅可阅读相关资源,无法新建资源",
"permission_des.write": "除了可读资源外,还可以新建新的资源",
"permissions": "权限",
"personal_information": "个人信息",
"personalization": "个性化",
"promotion_records": "推广记录",
"register": {
"confirm": "确认注册",
"register_account": "注册 {{account}} 账号",
"success": "注册成功",
"to_login": "已有账号,去登录"
},
"register.confirm": "确认注册",
"register.register_account": "注册 {{account}} 账号",
"register.success": "注册成功",
"register.to_login": "已有账号,去登录",
"search_user": "搜索用户名",
"sign_out": "登出",
"synchronization": {
"button": "立即同步",
"placeholder": "请输入同步标签",
"title": "填写标签同步链接,点击同步按钮即可同步"
},
"team": {
"Add manager": "添加管理员",
"add_collaborator": "添加协作者",
"manage_collaborators": "管理协作者",
"no_collaborators": "暂无协作者"
},
"usage": {
"feishu": "飞书",
"official_account": "公众号",
"share": "分享链接",
"wecom": "企业微信"
},
"synchronization.button": "立即同步",
"synchronization.placeholder": "请输入同步标签",
"synchronization.title": "填写标签同步链接,点击同步按钮即可同步",
"team.Add manager": "添加管理员",
"team.add_collaborator": "添加协作者",
"team.manage_collaborators": "管理协作者",
"team.no_collaborators": "暂无协作者",
"usage.feishu": "飞书",
"usage.official_account": "公众号",
"usage.share": "分享链接",
"usage.wecom": "企业微信",
"usage_record": "使用记录"
}
\ No newline at end of file
......@@ -9,10 +9,8 @@
"can_not_loop": "该节点不支持循环嵌套",
"choose_another_application_to_call": "选择一个其他应用进行调用",
"classification_result": "分类结果",
"code": {
"Reset template": "还原模板",
"Reset template confirm": "确认还原代码模板?将会重置所有输入和输出至模板值,请注意保存当前代码。"
},
"code.Reset template": "还原模板",
"code.Reset template confirm": "确认还原代码模板?将会重置所有输入和输出至模板值,请注意保存当前代码。",
"code_execution": "代码运行",
"collection_metadata_filter": "集合元数据过滤",
"complete_extraction_result": "完整提取结果",
......@@ -58,10 +56,8 @@
"http_raw_response_description": "HTTP请求的原始响应。只能接受字符串或JSON类型响应数据。",
"http_request": "HTTP 请求",
"http_request_error_info": "HTTP请求错误信息,成功时返回空",
"ifelse": {
"Input value": "输入值",
"Select value": "选择值"
},
"ifelse.Input value": "输入值",
"ifelse.Select value": "选择值",
"input_description": "字段描述",
"input_variable_list": "可输入 / 唤起变量列表",
"intro_assigned_reply": "该模块可以直接回复一段指定的内容。常用于引导、提示。非字符串内容传入时,会转成字符串进行输出。",
......@@ -110,10 +106,8 @@
"optional_value_type_tip": "可以指定 1 个或多个数据类型,用户在动态添加字段时,仅可选择配置的类型",
"pan_priority": "触摸板优先",
"pass_returned_object_as_output_to_next_nodes": "将代码中 return 的对象作为输出,传递给后续的节点。变量名需要对应 return 的 key",
"plugin": {
"Instruction_Tip": "可以配置一段说明,以解释该插件的用途。每次使用插件前,会显示该段说明。支持标准 Markdown 语法。",
"Instructions": "使用说明"
},
"plugin.Instruction_Tip": "可以配置一段说明,以解释该插件的用途。每次使用插件前,会显示该段说明。支持标准 Markdown 语法。",
"plugin.Instructions": "使用说明",
"plugin_input": "插件输入",
"question_classification": "问题分类",
"question_optimization": "问题优化",
......@@ -127,29 +121,25 @@
"regex": "正则",
"reply_text": "回复的文本",
"request_error": "请求错误",
"response": {
"Code log": "Log 日志",
"Custom inputs": "自定义输入",
"Custom outputs": "自定义输出",
"Error": "错误信息",
"Read file result": "文档解析结果预览",
"read files": "解析的文档"
},
"response.Code log": "Log 日志",
"response.Custom inputs": "自定义输入",
"response.Custom outputs": "自定义输出",
"response.Error": "错误信息",
"response.Read file result": "文档解析结果预览",
"response.read files": "解析的文档",
"select_an_application": "选择一个应用",
"select_another_application_to_call": "可以选择一个其他应用进行调用",
"special_array_format": "特殊数组格式,搜索结果为空时,返回空数组。",
"start_with": "开始为",
"target_fields_description": "由 '描述' 和 'key' 组成一个目标字段,可提取多个目标字段",
"template": {
"ai_chat": "AI 对话",
"ai_chat_intro": "AI 大模型对话",
"dataset_search": "知识库搜索",
"dataset_search_intro": "调用“语义检索”和“全文检索”能力,从“知识库”中查找可能与问题相关的参考内容",
"system_config": "系统配置",
"tool_call": "工具调用",
"tool_call_intro": "通过AI模型自动选择一个或多个功能块进行调用,也可以对插件进行调用。",
"workflow_start": "流程开始"
},
"template.ai_chat": "AI 对话",
"template.ai_chat_intro": "AI 大模型对话",
"template.dataset_search": "知识库搜索",
"template.dataset_search_intro": "调用“语义检索”和“全文检索”能力,从“知识库”中查找可能与问题相关的参考内容",
"template.system_config": "系统配置",
"template.tool_call": "工具调用",
"template.tool_call_intro": "通过AI模型自动选择一个或多个功能块进行调用,也可以对插件进行调用。",
"template.workflow_start": "流程开始",
"template.plugin_output": "插件输出",
"template.plugin_start": "插件开始",
"text_concatenation": "文本拼接",
......@@ -163,12 +153,11 @@
"update_specified_node_output_or_global_variable": "可以更新指定节点的输出值或更新全局变量",
"use_user_id": "使用者 ID",
"user_question": "用户问题",
"value_type": "数据类型",
"variable_picker_tips": "可输入节点名或变量名搜索",
"variable_update": "变量更新",
"workflow": {
"My edit": "我的编辑",
"Switch_success": "切换成功",
"Team cloud": "团队云端",
"exit_tips": "您的更改尚未保存,「直接退出」将不会保存您的编辑记录。"
}
"workflow.My edit": "我的编辑",
"workflow.Switch_success": "切换成功",
"workflow.Team cloud": "团队云端",
"workflow.exit_tips": "您的更改尚未保存,「直接退出」将不会保存您的编辑记录。"
}
\ No newline at end of file
......@@ -23,14 +23,8 @@ export interface I18nNamespaces {
export type I18nNsType = (keyof I18nNamespaces)[];
export type NestedKeyOf<ObjectType extends object> = {
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object
? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}`
: `${Key}`;
}[keyof ObjectType & (string | number)];
export type ParseKeys<Ns extends keyof I18nNamespaces = keyof I18nNamespaces> = {
[K in Ns]: `${K}:${NestedKeyOf<I18nNamespaces[K]>}`;
[K in Ns]: `${K}:${keyof I18nNamespaces[K] & string}`;
}[Ns];
export type I18nKeyFunction = {
......
import React, { useMemo, useState } from 'react';
import React, { useCallback, useMemo, useState } from 'react';
import {
Box,
Button,
......@@ -41,6 +41,29 @@ import MyRadio from '@/components/common/MyRadio';
import { formatEditorVariablePickerIcon } from '@fastgpt/global/core/workflow/utils';
import ChatFunctionTip from './Tip';
import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
import { FlowValueTypeMap } from '@fastgpt/global/core/workflow/node/constant';
import MySelect from '@fastgpt/web/components/common/MySelect';
export const defaultVariable: VariableItemType = {
id: nanoid(),
key: 'key',
label: 'label',
type: VariableInputEnum.input,
required: true,
maxLen: 50,
enums: [{ value: '' }],
valueType: WorkflowIOValueTypeEnum.string
};
export const addVariable = () => {
const newVariable = { ...defaultVariable, key: '', id: '' };
return newVariable;
};
const valueTypeMap = {
[VariableInputEnum.input]: WorkflowIOValueTypeEnum.string,
[VariableInputEnum.select]: WorkflowIOValueTypeEnum.string,
[VariableInputEnum.textarea]: WorkflowIOValueTypeEnum.string,
[VariableInputEnum.custom]: WorkflowIOValueTypeEnum.any
};
const VariableEdit = ({
variables = [],
......@@ -65,6 +88,7 @@ const VariableEdit = ({
const { isOpen: isOpenEdit, onOpen: onOpenEdit, onClose: onCloseEdit } = useDisclosure();
const {
setValue,
reset: resetEdit,
register: registerEdit,
getValues: getValuesEdit,
......@@ -75,6 +99,7 @@ const VariableEdit = ({
} = useForm<{ variable: VariableItemType }>();
const variableType = watch('variable.type');
const valueType = watch('variable.valueType');
const {
fields: selectEnums,
......@@ -96,8 +121,85 @@ const VariableEdit = ({
});
}, [variables]);
const valueTypeSelectList = useMemo(
() =>
Object.values(FlowValueTypeMap)
.map((item) => ({
label: t(item.label as any),
value: item.value
}))
.filter(
(item) =>
![
WorkflowIOValueTypeEnum.arrayAny,
WorkflowIOValueTypeEnum.selectApp,
WorkflowIOValueTypeEnum.selectDataset,
WorkflowIOValueTypeEnum.dynamic
].includes(item.value)
),
[t]
);
const showValueTypeSelect = variableType === VariableInputEnum.custom;
const onSubmit = useCallback(
({ variable }: { variable: VariableItemType }) => {
variable.key = variable.key.trim();
// check select
if (variable.type === VariableInputEnum.select) {
const enums = variable.enums.filter((item) => item.value);
if (enums.length === 0) {
toast({
status: 'warning',
title: t('common:core.module.variable.variable option is required')
});
return;
}
}
// check repeat key
const existingVariable = variables.find(
(item) => item.key === variable.key && item.id !== variable.id
);
if (existingVariable) {
toast({
status: 'warning',
title: t('common:core.module.variable.key already exists')
});
return;
}
// set valuetype based on variable.type
variable.valueType =
variable.type === VariableInputEnum.custom
? variable.valueType
: valueTypeMap[variable.type];
// set default required value based on variableType
if (variable.type === VariableInputEnum.custom) {
variable.required = false;
}
const onChangeVariable = [...variables];
// update
if (variable.id) {
const index = variables.findIndex((item) => item.id === variable.id);
onChangeVariable[index] = variable;
} else {
onChangeVariable.push({
...variable,
id: nanoid()
});
}
onChange(onChangeVariable);
onCloseEdit();
},
[onChange, onCloseEdit, t, toast, variables]
);
return (
<Box>
{/* Row box */}
<Flex alignItems={'center'}>
<MyIcon name={'core/app/simpleMode/variable'} w={'20px'} />
<FormLabel ml={2}>{t('common:core.module.Variable')}</FormLabel>
......@@ -117,6 +219,7 @@ const VariableEdit = ({
{t('common:common.Add New')}
</Button>
</Flex>
{/* Form render */}
{formatVariables.length > 0 && (
<Box mt={2} borderRadius={'md'} overflow={'hidden'} borderWidth={'1px'} borderBottom="none">
<TableContainer>
......@@ -171,6 +274,7 @@ const VariableEdit = ({
</TableContainer>
</Box>
)}
{/* Edit modal */}
<MyModal
iconSrc="core/app/simpleMode/variable"
title={t('common:core.module.Variable Setting')}
......@@ -201,6 +305,24 @@ const VariableEdit = ({
})}
/>
</Flex>
<Flex mt={5} alignItems={'center'}>
<FormLabel w={'80px'}>{t('workflow:value_type')}</FormLabel>
{showValueTypeSelect ? (
<Box flex={1}>
<MySelect<WorkflowIOValueTypeEnum>
list={valueTypeSelectList.filter(
(item) => item.value !== WorkflowIOValueTypeEnum.arrayAny
)}
value={valueType}
onchange={(e) => {
setValue('variable.valueType', e);
}}
/>
</Box>
) : (
<Box fontSize={'14px'}>{valueTypeMap[variableType]}</Box>
)}
</Flex>
<FormLabel mt={5} mb={2}>
{t('common:core.workflow.Variable.Variable type')}
......@@ -299,57 +421,7 @@ const VariableEdit = ({
<Button variant={'whiteBase'} mr={3} onClick={onCloseEdit}>
{t('common:common.Close')}
</Button>
<Button
onClick={handleSubmitEdit(({ variable }) => {
variable.key = variable.key.trim();
// check select
if (variable.type === VariableInputEnum.select) {
const enums = variable.enums.filter((item) => item.value);
if (enums.length === 0) {
toast({
status: 'warning',
title: t('common:core.module.variable.variable option is required')
});
return;
}
}
// check repeat key
const existingVariable = variables.find(
(item) => item.key === variable.key && item.id !== variable.id
);
if (existingVariable) {
toast({
status: 'warning',
title: t('common:core.module.variable.key already exists')
});
return;
}
// set valuetype based on variable.type
variable.valueType = valueTypeMap[variable.type];
// set default required value based on variableType
if (variable.type === VariableInputEnum.custom) {
variable.required = false;
}
const onChangeVariable = [...variables];
// update
if (variable.id) {
const index = variables.findIndex((item) => item.id === variable.id);
onChangeVariable[index] = variable;
} else {
onChangeVariable.push({
...variable,
id: nanoid()
});
}
onChange(onChangeVariable);
onCloseEdit();
})}
>
<Button onClick={handleSubmitEdit(onSubmit)}>
{getValuesEdit('variable.id')
? t('common:common.Confirm Update')
: t('common:common.Add New')}
......@@ -361,24 +433,3 @@ const VariableEdit = ({
};
export default React.memo(VariableEdit);
export const defaultVariable: VariableItemType = {
id: nanoid(),
key: 'key',
label: 'label',
type: VariableInputEnum.input,
required: true,
maxLen: 50,
enums: [{ value: '' }],
valueType: WorkflowIOValueTypeEnum.string
};
export const addVariable = () => {
const newVariable = { ...defaultVariable, key: '', id: '' };
return newVariable;
};
const valueTypeMap = {
[VariableInputEnum.input]: WorkflowIOValueTypeEnum.string,
[VariableInputEnum.select]: WorkflowIOValueTypeEnum.string,
[VariableInputEnum.textarea]: WorkflowIOValueTypeEnum.string,
[VariableInputEnum.custom]: WorkflowIOValueTypeEnum.any
};
......@@ -451,13 +451,12 @@ const PlanUsage = () => {
</Button>
</Flex>
<Box px={[5, 7]} pb={[3, 6]}>
{isFreeTeam ? (
<>
<Box mt="2" color={'#485264'} fontSize="sm">
{t('common:info.free_plan')}
</Box>
</>
) : (
{isFreeTeam && (
<Box mt="2" color={'#485264'} fontSize="sm">
{t('common:info.free_plan')}
</Box>
)}
{standardPlan.currentSubLevel !== StandardSubLevelEnum.free && (
<Flex mt="2" color={'#485264'} fontSize="xs">
<Box>{t('common:support.wallet.Plan expired time')}:</Box>
<Box ml={2}>{formatTime2YMD(standardPlan?.expiredTime)}</Box>
......
......@@ -10,7 +10,7 @@ import { Background, NodeProps } from 'reactflow';
import NodeCard from '../render/NodeCard';
import Container from '../../components/Container';
import IOTitle from '../../components/IOTitle';
import { useTranslation } from 'react-i18next';
import { useTranslation } from 'next-i18next';
import RenderInput from '../render/RenderInput';
import { Box } from '@chakra-ui/react';
import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
......
......@@ -12,7 +12,7 @@ import {
import { useContextSelector } from 'use-context-selector';
import { WorkflowContext } from '../../../context';
import { AppContext } from '../../../../context';
import { useTranslation } from 'react-i18next';
import { useTranslation } from 'next-i18next';
import { getGlobalVariableNode } from '@/web/core/workflow/adapt';
const typeMap = {
......
import { FlowNodeItemType } from '@fastgpt/global/core/workflow/type/node';
import { useTranslation } from 'react-i18next';
import { useTranslation } from 'next-i18next';
import { NodeProps } from 'reactflow';
import NodeCard from '../render/NodeCard';
import EmptyTip from '@fastgpt/web/components/common/EmptyTip';
......
......@@ -409,7 +409,7 @@ const FieldEditModal = ({
{/* value type */}
<Flex alignItems={'center'}>
<FormLabel flex={'0 0 100px'} fontWeight={'medium'}>
{t('common:core.module.Data Type')}
{t('workflow:value_type')}
</FormLabel>
{showValueTypeSelect ? (
<Box flex={1}>
......
......@@ -43,7 +43,6 @@ import LightRowTabs from '@fastgpt/web/components/common/Tabs/LightRowTabs';
import { useSystem } from '@fastgpt/web/hooks/useSystem';
import MyIcon from '@fastgpt/web/components/common/Icon';
import TemplateMarketModal from './components/TemplateMarketModal';
import { useSystemStore } from '@/web/common/system/useSystemStore';
const CreateModal = dynamic(() => import('./components/CreateModal'));
const EditFolderModal = dynamic(
......@@ -71,7 +70,6 @@ const MyApps = () => {
setSearchKey
} = useContextSelector(AppListContext, (v) => v);
const { userInfo } = useUserStore();
const { setAppType } = useSystemStore();
const [createAppType, setCreateAppType] = useState<CreateAppType>();
const {
......@@ -173,13 +171,12 @@ const MyApps = () => {
fontSize={['sm', 'md']}
flexShrink={0}
onChange={(e) => {
setAppType(e);
// router.push({
// query: {
// ...router.query,
// type: e
// }
// });
router.push({
query: {
...router.query,
type: e
}
});
}}
/>
<Box flex={1} />
......
import React, { useMemo, useState } from 'react';
import { Box, Flex, Button, IconButton, Input, Textarea, HStack } from '@chakra-ui/react';
import { DeleteIcon } from '@chakra-ui/icons';
import React, { useMemo } from 'react';
import { Box, Flex, Button } from '@chakra-ui/react';
import { useTranslation } from 'next-i18next';
import { useRequest2 } from '@fastgpt/web/hooks/useRequest';
import { getDatasetCollectionById } from '@/web/core/dataset/api';
......@@ -33,7 +32,7 @@ const MetaDataCard = ({ datasetId }: { datasetId: string }) => {
manual: false
}
);
const metadataList = useMemo(() => {
const metadataList = useMemo<{ label?: string; value?: any }[]>(() => {
if (!collection) return [];
const webSelector =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment