FEAT: NEW WORKFLOW ENGINE (#3160)

Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: Yeuoly <admin@srmxy.cn>
Co-authored-by: JzoNg <jzongcode@gmail.com>
Co-authored-by: StyleZhang <jasonapring2015@outlook.com>
Co-authored-by: jyong <jyong@dify.ai>
Co-authored-by: nite-knite <nkCoding@gmail.com>
Co-authored-by: jyong <718720800@qq.com>
This commit is contained in:
takatost
2024-04-08 18:51:46 +08:00
committed by GitHub
parent 2fb9850af5
commit 7753ba2d37
1161 changed files with 103836 additions and 10327 deletions

View File

@@ -266,18 +266,32 @@ const translation = {
queryNoBeEmpty: 'Query must be set in the prompt',
},
variableConig: {
modalTitle: 'Field settings',
description: 'Setting for variable {{varName}}',
fieldType: 'Field type',
string: 'Short Text',
paragraph: 'Paragraph',
select: 'Select',
notSet: 'Not set, try typing {{input}} in the prefix prompt',
stringTitle: 'Form text box options',
maxLength: 'Max length',
options: 'Options',
addOption: 'Add option',
apiBasedVar: 'API-based Variable',
'addModalTitle': 'Add Input Field',
'editModalTitle': 'Edit Input Field',
'description': 'Setting for variable {{varName}}',
'fieldType': 'Field type',
'string': 'Short Text',
'text-input': 'Short Text',
'paragraph': 'Paragraph',
'select': 'Select',
'number': 'Number',
'notSet': 'Not set, try typing {{input}} in the prefix prompt',
'stringTitle': 'Form text box options',
'maxLength': 'Max length',
'options': 'Options',
'addOption': 'Add option',
'apiBasedVar': 'API-based Variable',
'varName': 'Variable Name',
'labelName': 'Label Name',
'inputPlaceholder': 'Please input',
'required': 'Required',
'errorMsg': {
varNameRequired: 'Variable name is required',
labelNameRequired: 'Label name is required',
varNameCanBeRepeat: 'Variable name can not be repeated',
atLeastOneOption: 'At least one option is required',
optionRepeat: 'Has repeat options',
},
},
vision: {
name: 'Vision',
@@ -348,6 +362,7 @@ const translation = {
result: 'Output Text',
datasetConfig: {
settingTitle: 'Retrieval settings',
knowledgeTip: 'Click the “+” button to add knowledge',
retrieveOneWay: {
title: 'N-to-1 retrieval',
description: 'Based on user intent and Knowledge descriptions, the Agent autonomously selects the best Knowledge for querying. Best for applications with distinct, limited Knowledge.',

View File

@@ -12,6 +12,12 @@ const translation = {
messageCount: 'Message Count',
userRate: 'User Rate',
adminRate: 'Op. Rate',
startTime: 'START TIME',
status: 'STATUS',
runtime: 'RUN TIME',
tokens: 'TOKENS',
user: 'END-USER',
version: 'VERSION',
},
pagination: {
previous: 'Prev',
@@ -64,6 +70,14 @@ const translation = {
not_annotated: 'Not Annotated',
},
},
workflowTitle: 'Workflow Logs',
workflowSubtitle: 'The log recorded the operation of Automate.',
runDetail: {
title: 'Conversation Log',
workflowTitle: 'Log Detail',
},
promptLog: 'Prompt Log',
viewLog: 'View Log',
}
export default translation

View File

@@ -121,6 +121,10 @@ const translation = {
title: 'Avg. Session Interactions',
explanation: 'Continuous user-AI communication count; for conversation-based apps.',
},
avgUserInteractions: {
title: 'Avg. User Interactions',
explanation: 'Reflects the daily usage frequency of users. This metric reflects user stickiness.',
},
userSatisfactionRate: {
title: 'User Satisfaction Rate',
explanation: 'The number of likes per 1,000 messages. This indicates the proportion of answers that users are highly satisfied with.',

View File

@@ -1,15 +1,18 @@
const translation = {
createApp: 'Create new App',
createApp: 'CREATE APP',
types: {
all: 'All',
assistant: 'Assistant',
chatbot: 'Chatbot',
agent: 'Agent',
workflow: 'Workflow',
completion: 'Completion',
},
modes: {
completion: 'Text Generator',
chat: 'Basic Assistant',
},
createFromConfigFile: 'Create app from config file',
duplicate: 'Duplicate',
duplicateTitle: 'Duplicate App',
export: 'Export DSL',
exportFailed: 'Export DSL failed.',
importDSL: 'Import DSL file',
createFromConfigFile: 'Create from DSL file',
deleteAppConfirmTitle: 'Delete this app?',
deleteAppConfirmContent:
'Deleting the app is irreversible. Users will no longer be able to access your app, and all prompt configurations and logs will be permanently deleted.',
@@ -19,11 +22,29 @@ const translation = {
communityIntro:
'Discuss with team members, contributors and developers on different channels.',
roadmap: 'See our roadmap',
appNamePlaceholder: 'Please enter the name of the app',
newApp: {
startToCreate: 'Let\'s start with your new app',
captionName: 'App icon & name',
startFromBlank: 'Create from Blank',
startFromTemplate: 'Create from Template',
captionAppType: 'What type of app do you want to create?',
chatbotDescription: 'Build a chat-based application. This app uses a question-and-answer format, allowing for multiple rounds of continuous conversation.',
completionDescription: 'Build an application that generates high-quality text based on prompts, such as generating articles, summaries, translations, and more.',
completionWarning: 'This type of app will no longer be supported.',
agentDescription: 'Build an intelligent Agent which can autonomously choose tools to complete the tasks',
workflowDescription: 'Build an application that generates high-quality text based on workflow orchestrates with a high degree of customization. It is suitable for experienced users.',
workflowWarning: 'Currently in beta',
chatbotType: 'Chatbot orchestrate method',
basic: 'Basic',
basicTip: 'For beginners, can switch to Chatflow later',
basicFor: 'FOR BEGINNERS',
basicDescription: 'Basic Orchestrate allows for the orchestration of a Chatbot app using simple settings, without the ability to modify built-in prompts. It is suitable for beginners.',
advanced: 'Chatflow',
advancedFor: 'For advanced users',
advancedDescription: 'Workflow Orchestrate orchestrates Chatbots in the form of workflows, offering a high degree of customization, including the ability to edit built-in prompts. It is suitable for experienced users.',
captionName: 'App icon & name',
appNamePlaceholder: 'Give your app a name',
captionDescription: 'Description',
appDescriptionPlaceholder: 'Enter the description of the app',
useTemplate: 'Use this template',
previewDemo: 'Preview demo',
chatApp: 'Assistant',
chatAppIntro:
@@ -42,13 +63,28 @@ const translation = {
appCreated: 'App created',
appCreateFailed: 'Failed to create app',
},
editApp: {
startToEdit: 'Edit App',
},
editApp: 'Edit Info',
editAppTitle: 'Edit App Info',
editDone: 'App info updated',
editFailed: 'Failed to update app info',
emoji: {
ok: 'OK',
cancel: 'Cancel',
},
switch: 'Switch to Workflow Orchestrate',
switchTipStart: 'A new app copy will be created for you, and the new copy will switch to Workflow Orchestrate. The new copy will ',
switchTip: 'not allow',
switchTipEnd: ' switching back to Basic Orchestrate.',
switchLabel: 'The app copy to be created',
removeOriginal: 'Delete the original app',
switchStart: 'Start swtich',
typeSelector: {
all: 'ALL Types',
chatbot: 'Chatbot',
agent: 'Agent',
workflow: 'Workflow',
completion: 'Completion',
},
}
export default translation

View File

@@ -400,6 +400,7 @@ const translation = {
promptEng: 'Orchestrate',
apiAccess: 'API Access',
logAndAnn: 'Logs & Ann.',
logs: 'Logs',
},
environment: {
testing: 'TESTING',
@@ -477,6 +478,10 @@ const translation = {
title: 'Variables & External Tools',
desc: 'Insert Variables & External Tools',
},
outputToolDisabledItem: {
title: 'Variables',
desc: 'Insert Variables',
},
modal: {
add: 'New variable',
addTool: 'New tool',

View File

@@ -18,7 +18,7 @@ const translation = {
apps: {
title: 'Explore Apps by Dify',
description: 'Use these template apps instantly or customize your own apps based on the templates.',
allCategories: 'All Categories',
allCategories: 'Recommended',
},
appCard: {
addToWorkspace: 'Add to Workspace',

23
web/i18n/en-US/run-log.ts Normal file
View File

@@ -0,0 +1,23 @@
const translation = {
input: 'INPUT',
result: 'RESULT',
detail: 'DETAIL',
tracing: 'TRACING',
resultPanel: {
status: 'STATUS',
time: 'ELAPSED TIME',
tokens: 'TOTAL TOKENS',
},
meta: {
title: 'METADATA',
status: 'Status',
version: 'Version',
executor: 'Executor',
startTime: 'Start Time',
time: 'Elapsed Time',
tokens: 'Total Tokens',
steps: 'Run Steps',
},
}
export default translation

333
web/i18n/en-US/workflow.ts Normal file
View File

@@ -0,0 +1,333 @@
const translation = {
common: {
editing: 'Editing',
autoSaved: 'Auto-Saved',
unpublished: 'Unpublished',
published: 'Published',
publish: 'Publish',
update: 'Update',
run: 'Run',
running: 'Running',
inRunMode: 'In Run Mode',
inPreview: 'In Preview',
inPreviewMode: 'In Preview Mode',
preview: 'Preview',
viewRunHistory: 'View run history',
runHistory: 'Run History',
goBackToEdit: 'Go back to editor',
conversationLog: 'Conversation Log',
features: 'Features',
debugAndPreview: 'Debug and Preview',
restart: 'Restart',
currentDraft: 'Current Draft',
currentDraftUnpublished: 'Current Draft Unpublished',
latestPublished: 'Latest Published',
publishedAt: 'Published',
restore: 'Restore',
runApp: 'Run App',
batchRunApp: 'Batch Run App',
accessAPIReference: 'Access API Reference',
embedIntoSite: 'Embed Into Site',
addTitle: 'Add title...',
addDescription: 'Add description...',
noVar: 'No variable',
searchVar: 'Search variable',
variableNamePlaceholder: 'Variable name',
setVarValuePlaceholder: 'Set variable',
needConnecttip: 'This step is not connected to anything',
maxTreeDepth: 'Maximum limit of {{depth}} nodes per branch',
needEndNode: 'The End block must be added',
needAnswerNode: 'The Answer block must be added',
workflowProcess: 'Workflow Process',
notRunning: 'Not running yet',
previewPlaceholder: 'Enter content in the box below to start debugging the Chatbot',
effectVarConfirm: {
title: 'Remove Variable',
content: 'The variable is used in other nodes. Do you still want to remove it?',
},
insertVarTip: 'Press the \'/\' key to insert quickly',
},
errorMsg: {
fieldRequired: '{{field}} is required',
authRequired: 'Authorization is required',
invalidJson: '{{field}} is invalid JSON',
fields: {
variable: 'Variable Name',
variableValue: 'Variable Value',
code: 'Code',
model: 'Model',
rerankModel: 'Rerank Model',
},
invalidVariable: 'Invalid variable',
},
singleRun: {
testRun: 'Test Run ',
startRun: 'Start Run',
running: 'Running',
},
tabs: {
'searchBlock': 'Search block',
'blocks': 'Blocks',
'builtInTool': 'Built-in Tool',
'customTool': 'Custom Tool',
'question-understand': 'Question Understand',
'logic': 'Logic',
'transform': 'Transform',
'utilities': 'Utilities',
'noResult': 'No match found',
},
blocks: {
'start': 'Start',
'end': 'End',
'answer': 'Answer',
'llm': 'LLM',
'knowledge-retrieval': 'Knowledge Retrieval',
'question-classifier': 'Question Classifier',
'if-else': 'IF/ELSE',
'code': 'Code',
'template-transform': 'Template',
'http-request': 'HTTP Request',
'variable-assigner': 'Variable Assigner',
},
blocksAbout: {
'start': 'Define the initial parameters for launching a workflow',
'end': 'Define the end and result type of a workflow',
'answer': 'Define the reply content of a chat conversation',
'llm': 'Invoking large language models to answer questions or process natural language',
'knowledge-retrieval': 'Allows you to query text content related to user questions from the Knowledge',
'question-classifier': 'Define the classification conditions of user questions, LLM can define how the conversation progresses based on the classification description',
'if-else': 'Allows you to split the workflow into two branches based on if/else conditions',
'code': 'Execute a piece of Python or NodeJS code to implement custom logic',
'template-transform': 'Convert data to string using Jinja template syntax',
'http-request': 'Allow server requests to be sent over the HTTP protocol',
'variable-assigner': 'Assign variables in different branches to the same variable to achieve unified configuration of post-nodes',
},
operator: {
zoomIn: 'Zoom In',
zoomOut: 'Zoom Out',
zoomTo50: 'Zoom to 50%',
zoomTo100: 'Zoom to 100%',
zoomToFit: 'Zoom to Fit',
},
panel: {
userInputField: 'User Input Field',
changeBlock: 'Change Block',
helpLink: 'Help Link',
about: 'About',
createdBy: 'Created By ',
nextStep: 'Next Step',
addNextStep: 'Add the next block in this workflow',
selectNextStep: 'Select Next Block',
runThisStep: 'Run this step',
checklist: 'Checklist',
checklistTip: 'Make sure all issues are resolved before publishing',
checklistResolved: 'All issues are resolved',
organizeBlocks: 'Organize blocks',
change: 'Change',
},
nodes: {
common: {
outputVars: 'Output Variables',
insertVarTip: 'Insert Variable',
memory: {
memory: 'Memory',
memoryTip: 'Chat memory settings',
windowSize: 'Window Size',
conversationRoleName: 'Conversation Role Name',
user: 'User prefix',
assistant: 'Assistant prefix',
},
memories: {
title: 'Memories',
tip: 'Chat memory',
builtIn: 'Built-in',
},
},
start: {
required: 'required',
inputField: 'Input Field',
builtInVar: 'Built-in Variables',
outputVars: {
query: 'User input',
memories: {
des: 'Conversation history',
type: 'message type',
content: 'message content',
},
files: 'File list',
},
noVarTip: 'Set inputs that can be used in the Workflow',
},
end: {
outputs: 'Outputs',
output: {
type: 'output type',
variable: 'output variable',
},
type: {
'none': 'None',
'plain-text': 'Plain Text',
'structured': 'Structured',
},
},
answer: {
answer: 'Answer',
outputVars: 'Output Variables',
},
llm: {
model: 'model',
variables: 'variables',
context: 'context',
contextTooltip: 'You can import Knowledge as context',
notSetContextInPromptTip: 'To enable the context feature, please fill in the context variable in PROMPT.',
prompt: 'prompt',
roleDescription: {
system: 'Give high level instructions for the conversation',
user: 'Provide instructions, queries, or any text-based input to the model',
assistant: 'The models responses based on the user messages',
},
addMessage: 'Add Message',
vision: 'vision',
files: 'Files',
resolution: {
name: 'Resolution',
high: 'High',
low: 'Low',
},
outputVars: {
output: 'Generate content',
usage: 'Model Usage Information',
},
singleRun: {
variable: 'Variable',
},
},
knowledgeRetrieval: {
queryVariable: 'Query Variable',
knowledge: 'Knowledge',
outputVars: {
output: 'Retrieval segmented data',
content: 'Segmented content',
title: 'Segmented title',
icon: 'Segmented icon',
url: 'Segmented URL',
metadata: 'Other metadata',
},
},
http: {
inputVars: 'Input Variables',
api: 'API',
apiPlaceholder: 'Enter URL, type / insert variable',
notStartWithHttp: 'API should start with http:// or https://',
key: 'Key',
value: 'Value',
bulkEdit: 'Bulk Edit',
keyValueEdit: 'Key-Value Edit',
headers: 'Headers',
params: 'Params',
body: 'Body',
outputVars: {
body: 'Response Content',
statusCode: 'Response Status Code',
headers: 'Response Header List JSON',
files: 'Files List',
},
authorization: {
'authorization': 'Authorization',
'authorizationType': 'Authorization Type',
'no-auth': 'None',
'api-key': 'API-Key',
'auth-type': 'Auth Type',
'basic': 'Basic',
'bearer': 'Bearer',
'custom': 'Custom',
'api-key-title': 'API Key',
'header': 'Header',
},
insertVarPlaceholder: 'type \'/\' to insert variable',
},
code: {
inputVars: 'Input Variables',
outputVars: 'Output Variables',
},
templateTransform: {
inputVars: 'Input Variables',
code: 'Code',
codeSupportTip: 'Only supports Jinja2',
outputVars: {
output: 'Transformed content',
},
},
ifElse: {
if: 'If',
else: 'Else',
elseDescription: 'Used to define the logic that should be executed when the if condition is not met.',
and: 'and',
or: 'or',
operator: 'Operator',
notSetVariable: 'Please set variable first',
comparisonOperator: {
'contains': 'contains',
'not contains': 'not contains',
'start with': 'start with',
'end with': 'end with',
'is': 'is',
'is not': 'is not',
'empty': 'is empty',
'not empty': 'is not empty',
'null': 'is null',
'not null': 'is not null',
},
enterValue: 'Enter value',
addCondition: 'Add Condition',
conditionNotSetup: 'Condition NOT setup',
},
variableAssigner: {
title: 'Assign variables',
outputType: 'Output Type',
outputVarType: 'Output Variable Type',
varNotSet: 'Variable not set',
noVarTip: 'Add the variables to be assigned',
type: {
string: 'String',
number: 'Number',
object: 'Object',
array: 'Array',
},
outputVars: {
output: 'Assigned variable value',
},
},
tool: {
toAuthorize: 'To authorize',
inputVars: 'Input Variables',
outputVars: {
text: 'tool generated content',
files: {
title: 'tool generated files',
type: 'Support type. Now only support image',
transfer_method: 'Transfer method.Value is remote_url or local_file',
url: 'Image url',
upload_file_id: 'Upload file id',
},
},
},
questionClassifiers: {
model: 'model',
inputVars: 'Input Variables',
class: 'Class',
classNamePlaceholder: 'Write your class name',
advancedSetting: 'Advanced Setting',
topicName: 'Topic Name',
topicPlaceholder: 'Write your topic name',
addClass: 'Add Class',
instruction: 'Instruction',
instructionPlaceholder: 'Write your instruction',
},
},
tracing: {
stopBy: 'Stop by {{user}}',
},
}
export default translation