Skip to content

Commit

Permalink
feat: plan index;flat i18n and add variable value type (labring#2762)
Browse files Browse the repository at this point in the history
* feat: plan index

* flat i18n and add variable value type

* fix: ts

* perf: free plan tip
  • Loading branch information
c121914yu authored Sep 20, 2024
1 parent 75af549 commit 9eb02b7
Show file tree
Hide file tree
Showing 25 changed files with 2,830 additions and 3,545 deletions.
7 changes: 7 additions & 0 deletions packages/global/common/string/textSplitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 3 additions & 0 deletions packages/service/support/wallet/sub/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
193 changes: 78 additions & 115 deletions packages/web/i18n/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@
"Run": "Execute",
"ai_settings": "AI Configuration",
"all_apps": "All Applications",
"app": {
"Version name": "Version Name",
"modules": {
"click to update": "Click to Refresh",
"has new version": "New Version Available"
},
"version_back": "Revert to Original State",
"version_copy": "Duplicate",
"version_current": "Current Version",
"version_initial": "Initial Version",
"version_initial_copy": "Duplicate - Original State",
"version_name_tips": "Version name cannot be empty",
"version_past": "Previously Published",
"version_publish_tips": "This version will be saved to the team cloud, synchronized with the entire team, and update the app version on all release channels."
},
"app.Version name": "Version Name",
"app.modules.click to update": "Click to Refresh",
"app.modules.has new version": "New Version Available",
"app.version_back": "Revert to Original State",
"app.version_copy": "Duplicate",
"app.version_current": "Current Version",
"app.version_initial": "Initial Version",
"app.version_initial_copy": "Duplicate - Original State",
"app.version_name_tips": "Version name cannot be empty",
"app.version_past": "Previously Published",
"app.version_publish_tips": "This version will be saved to the team cloud, synchronized with the entire team, and update the app version on all release channels.",
"app_detail": "Application Details",
"chat_debug": "Chat Preview",
"chat_logs": "Conversation Logs",
Expand All @@ -30,12 +26,10 @@
"create_empty_app": "Create Default App",
"create_empty_plugin": "Create Default Plugin",
"create_empty_workflow": "Create Default Workflow",
"cron": {
"every_day": "Run Daily",
"every_month": "Run Monthly",
"every_week": "Run Weekly",
"interval": "Run at Intervals"
},
"cron.every_day": "Run Daily",
"cron.every_month": "Run Monthly",
"cron.every_week": "Run Weekly",
"cron.interval": "Run at Intervals",
"current_settings": "Current Configuration",
"day": "Day",
"document_quote": "Document Reference",
Expand All @@ -57,14 +51,12 @@
"import_configs": "Import Configurations",
"import_configs_failed": "Import configuration failed, please ensure the configuration is correct!",
"import_configs_success": "Import Successful",
"interval": {
"12_hours": "Every 12 Hours",
"2_hours": "Every 2 Hours",
"3_hours": "Every 3 Hours",
"4_hours": "Every 4 Hours",
"6_hours": "Every 6 Hours",
"per_hour": "Every Hour"
},
"interval.12_hours": "Every 12 Hours",
"interval.2_hours": "Every 2 Hours",
"interval.3_hours": "Every 3 Hours",
"interval.4_hours": "Every 4 Hours",
"interval.6_hours": "Every 6 Hours",
"interval.per_hour": "Every Hour",
"intro": "A comprehensive model application orchestration system that offers out-of-the-box data processing and model invocation capabilities. It allows for rapid Dataset construction and workflow orchestration through Flow visualization, enabling complex Dataset scenarios!",
"llm_not_support_vision": "This model does not support image recognition",
"llm_use_vision": "Enable Image Recognition",
Expand All @@ -73,29 +65,19 @@
"logs_message_total": "Total Messages",
"logs_title": "Title",
"mark_count": "Number of Marked Answers",
"module": {
"Confirm Sync": "Will update to the latest template configuration. Fields not in the template will be deleted (including all custom fields). It is recommended to copy a node first, then update the original node version.",
"Custom Title Tip": "This title will be displayed during the conversation.",
"No Modules": "No Plugins Found",
"type": "\"{{type}}\" type\n{{description}}"
},
"modules": {
"Title is required": "Module name cannot be empty"
},
"month": {
"unit": "Day"
},
"module.Confirm Sync": "Will update to the latest template configuration. Fields not in the template will be deleted (including all custom fields). It is recommended to copy a node first, then update the original node version.",
"module.Custom Title Tip": "This title will be displayed during the conversation.",
"module.No Modules": "No Plugins Found",
"module.type": "\"{{type}}\" type\n{{description}}",
"modules.Title is required": "Module name cannot be empty",
"month.unit": "Day",
"move_app": "Move Application",
"not_json_file": "Please select a JSON file",
"or_drag_JSON": "or drag in JSON file",
"paste_config": "Paste Configuration",
"permission": {
"des": {
"manage": "Based on write permissions, you can configure publishing channels, view conversation logs, and assign permissions to the application.",
"read": "Use the app to have conversations",
"write": "Can view and edit apps"
}
},
"permission.des.manage": "Based on write permissions, you can configure publishing channels, view conversation logs, and assign permissions to the application.",
"permission.des.read": "Use the app to have conversations",
"permission.des.write": "Can view and edit apps",
"plugin_cost_per_times": "{{cost}}/time",
"plugin_dispatch": "Plugin Invocation",
"plugin_dispatch_tip": "Adds extra capabilities to the model. The specific plugins to be invoked will be autonomously decided by the model.\nIf a plugin is selected, the Dataset invocation will automatically be treated as a special plugin.",
Expand All @@ -105,32 +87,25 @@
"search_app": "Search Application",
"setting_app": "Application Settings",
"setting_plugin": "Plugin Settings",
"template": {
"simple_robot": "Simple Robot"
},
"template.simple_robot": "Simple robot",
"template.hard_strict": "Strict Q&A template",
"template.hard_strict_des": "Based on the question and answer template, stricter requirements are imposed on the model's answers.",
"template.qa_template": "Q&A template",
"template.qa_template_des": "A knowledge base suitable for QA question and answer structure, which allows AI to answer strictly according to preset content",
"template.simple_robot": "Simple robot",
"template.standard_strict": "Standard strict template",
"template.standard_strict_des": "Based on the standard template, stricter requirements are imposed on the model's answers.",
"template.standard_template": "Standard template",
"template.standard_template_des": "Standard prompt words for knowledge bases with unfixed structures.",
"templateMarket": {
"Search_template": "Search Template",
"Template_market": "Template Market",
"Use": "Use",
"no_intro": "No introduction yet~",
"templateTags": {
"Image_generation": "Image Generation",
"Office_services": "Office Services",
"Recommendation": "Recommendation",
"Roleplay": "Roleplay",
"Web_search": "Web Search",
"Writing": "Writing"
}
},
"templateMarket.Search_template": "Search Template",
"templateMarket.Template_market": "Template Market",
"templateMarket.Use": "Use",
"templateMarket.no_intro": "No introduction yet~",
"templateMarket.templateTags.Image_generation": "Image Generation",
"templateMarket.templateTags.Office_services": "Office Services",
"templateMarket.templateTags.Recommendation": "Recommendation",
"templateMarket.templateTags.Roleplay": "Roleplay",
"templateMarket.templateTags.Web_search": "Web Search",
"templateMarket.templateTags.Writing": "Writing",
"template_market": "Template Market",
"template_market_description": "Explore more features in the template market, with configuration tutorials and usage guides to help you understand and get started with various applications.",
"template_market_empty_data": "No suitable templates found",
Expand All @@ -139,56 +114,44 @@
"transition_to_workflow": "Convert to Workflow",
"transition_to_workflow_create_new_placeholder": "Create a new app instead of modifying the current app",
"transition_to_workflow_create_new_tip": "Once converted to a workflow, it cannot be reverted to simple mode. Please confirm!",
"type": {
"All": "All",
"Create http plugin tip": "Batch create plugins through OpenAPI Schema, compatible with GPTs format.",
"Create one plugin tip": "Customizable input and output workflows, usually used to encapsulate reusable workflows.",
"Create plugin bot": "Create Plugin",
"Create simple bot": "Create Simple App",
"Create simple bot tip": "Create a simple AI app by filling out a form, suitable for beginners.",
"Create workflow bot": "Create Workflow",
"Create workflow tip": "Build complex multi-turn dialogue AI applications through low-code methods, recommended for advanced users.",
"Http plugin": "HTTP Plugin",
"Plugin": "Plugin",
"Simple bot": "Simple App",
"Workflow bot": "Workflow"
},
"type.All": "All",
"type.Create http plugin tip": "Batch create plugins through OpenAPI Schema, compatible with GPTs format.",
"type.Create one plugin tip": "Customizable input and output workflows, usually used to encapsulate reusable workflows.",
"type.Create plugin bot": "Create Plugin",
"type.Create simple bot": "Create Simple App",
"type.Create simple bot tip": "Create a simple AI app by filling out a form, suitable for beginners.",
"type.Create workflow bot": "Create Workflow",
"type.Create workflow tip": "Build complex multi-turn dialogue AI applications through low-code methods, recommended for advanced users.",
"type.Http plugin": "HTTP Plugin",
"type.Plugin": "Plugin",
"type.Simple bot": "Simple App",
"type.Workflow bot": "Workflow",
"upload_file_max_amount": "Maximum File Quantity",
"upload_file_max_amount_tip": "1. The maximum number of files that can be uploaded at one time.\n2. The maximum number of files remembered by the chat window: each round of dialogue will automatically retrieve files from history, files beyond the range will be forgotten.",
"variable": {
"select type_desc": "A global variable that does not require user input can be defined.\nThe value of this variable can come from an API interface, a query in a shared link, or be assigned through the [Variable Update] module.",
"textarea_type_desc": "Allows users to input up to 4000 characters in the dialogue box."
},
"version": {
"Revert success": "Revert Successful"
},
"variable.select type_desc": "You can define a global variable that does not need to be filled in by the user.\n\nThe value of this variable can come from the API interface, the Query of the shared link, or assigned through the [Variable Update] module.",
"variable.textarea_type_desc": "Allows users to input up to 4000 characters in the dialogue box.",
"version.Revert success": "Revert Successful",
"vision_model_title": "Enable Image Recognition",
"week": {
"Friday": "Friday",
"Monday": "Monday",
"Saturday": "Saturday",
"Sunday": "Sunday",
"Thursday": "Thursday",
"Tuesday": "Tuesday",
"Wednesday": "Wednesday"
},
"workflow": {
"Input guide": "Input Guide",
"file_url": "Document Link",
"read_files": "Document Parsing",
"read_files_result": "Document Parsing Result",
"read_files_result_desc": "Original document text, consisting of file names and document content, separated by hyphens between multiple files.",
"read_files_tip": "Parse all uploaded documents in the dialogue and return the corresponding document content.",
"select_description": "Description Text",
"select_description_placeholder": "For example: \nAre there tomatoes in the fridge?",
"select_description_tip": "You can add a description text to explain the meaning of each option to the user.",
"select_result": "Selected Result",
"template": {
"communication": "Communication"
},
"user_file_input": "File Link",
"user_file_input_desc": "Links to documents and images uploaded by users.",
"user_select": "User Selection",
"user_select_tip": "This module can configure multiple options for selection during the dialogue. Different options can lead to different workflow branches."
}
"week.Friday": "Friday",
"week.Monday": "Monday",
"week.Saturday": "Saturday",
"week.Sunday": "Sunday",
"week.Thursday": "Thursday",
"week.Tuesday": "Tuesday",
"week.Wednesday": "Wednesday",
"workflow.Input guide": "Input Guide",
"workflow.file_url": "Document Link",
"workflow.read_files": "Document Parsing",
"workflow.read_files_result": "Document Parsing Result",
"workflow.read_files_result_desc": "Original document text, consisting of file names and document content, separated by hyphens between multiple files.",
"workflow.read_files_tip": "Parse all uploaded documents in the dialogue and return the corresponding document content.",
"workflow.select_description": "Description Text",
"workflow.select_description_placeholder": "For example: \nAre there tomatoes in the fridge?",
"workflow.select_description_tip": "You can add a description text to explain the meaning of each option to the user.",
"workflow.select_result": "Selected Result",
"workflow.template.communication": "Communication",
"workflow.user_file_input": "File Link",
"workflow.user_file_input_desc": "Links to documents and images uploaded by users.",
"workflow.user_select": "User Selection",
"workflow.user_select_tip": "This module can configure multiple options for selection during the dialogue. Different options can lead to different workflow branches."
}
4 changes: 1 addition & 3 deletions packages/web/i18n/en/chat.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading

0 comments on commit 9eb02b7

Please sign in to comment.