feat: deprecate Parsing component and replace them in starter projects (#6697)
* fix: fixed the parser component * fix: fixed parser component test * fix: ruff error * chore: rename input * chore: remove beta attribute * update * updated template with legacy as true * updated templates * [autofix.ci] apply automated fixes * ✨ (freeze.spec.ts): add new test steps to check sidebar options and legacy switch functionality ✨ (similarity.spec.ts): add new test steps to check sidebar options and legacy switch functionality ✨ (loop-component.spec.ts): add new test steps to check sidebar options and legacy switch functionality, as well as zoom out and expand button modal functionality * remove-copy-numbers-from-template-titles * update-blog-writer-template-readme * update-document-qa-template-notes * update-market-research-template-notes * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes * ✨ (filterEdge-shard-0.spec.ts, freeze.spec.ts, Portfolio Website Code Generator.spec.ts, decisionFlow.spec.ts, similarity.spec.ts, generalBugs-shard-9.spec.ts, codeAreaModalComponent.spec.ts, fileUploadComponent.spec.ts, nestedComponent.spec.ts, filterEdge-shard-1.spec.ts, loop-component.spec.ts, generalBugs-shard-12.spec.ts, add-legacy-components.ts): add function to handle legacy components in tests for improved test readability and maintainability * remove duplicated graph rag template * update changes * update Templates with new parser component * [autofix.ci] apply automated fixes * fix: remove name attribute * fix: autofix.ci patch * ✨ (stop-building.spec.ts): add new function addLegacyComponents to include legacy components in the test scenario 🔧 (decisionFlow.spec.ts): increase timeout from 500ms to 2000ms for better stability and reliability in waiting for selectors to appear --------- Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: cristhianzl <cristhian.lousa@gmail.com> Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
This commit is contained in:
parent
85787cf53e
commit
017a0a463b
27 changed files with 4022 additions and 3811 deletions
|
|
@ -10,6 +10,7 @@ class ParseDataComponent(Component):
|
|||
description = "Convert Data objects into Messages using any {field_name} from input data."
|
||||
icon = "message-square"
|
||||
name = "ParseData"
|
||||
legacy = True
|
||||
metadata = {
|
||||
"legacy_name": "Parse Data",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ class ParseDataFrameComponent(Component):
|
|||
)
|
||||
icon = "braces"
|
||||
name = "ParseDataFrame"
|
||||
legacy = True
|
||||
|
||||
inputs = [
|
||||
DataFrameInput(name="df", display_name="DataFrame", info="The DataFrame to convert to text rows."),
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,69 +1,13 @@
|
|||
{
|
||||
"data": {
|
||||
"edges": [
|
||||
{
|
||||
"animated": false,
|
||||
"className": "",
|
||||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "File",
|
||||
"id": "File-Ktatn",
|
||||
"name": "data",
|
||||
"output_types": [
|
||||
"Data"
|
||||
]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "data",
|
||||
"id": "ParseData-gouVC",
|
||||
"inputTypes": [
|
||||
"Data"
|
||||
],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
"id": "reactflow__edge-File-Ktatn{œdataTypeœ:œFileœ,œidœ:œFile-Ktatnœ,œnameœ:œdataœ,œoutput_typesœ:[œDataœ]}-ParseData-gouVC{œfieldNameœ:œdataœ,œidœ:œParseData-gouVCœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}",
|
||||
"selected": false,
|
||||
"source": "File-Ktatn",
|
||||
"sourceHandle": "{œdataTypeœ: œFileœ, œidœ: œFile-Ktatnœ, œnameœ: œdataœ, œoutput_typesœ: [œDataœ]}",
|
||||
"target": "ParseData-gouVC",
|
||||
"targetHandle": "{œfieldNameœ: œdataœ, œidœ: œParseData-gouVCœ, œinputTypesœ: [œDataœ], œtypeœ: œotherœ}"
|
||||
},
|
||||
{
|
||||
"animated": false,
|
||||
"className": "",
|
||||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "ParseData",
|
||||
"id": "ParseData-gouVC",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "text",
|
||||
"id": "Prompt-epiSD",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
"id": "reactflow__edge-ParseData-gouVC{œdataTypeœ:œParseDataœ,œidœ:œParseData-gouVCœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-epiSD{œfieldNameœ:œtextœ,œidœ:œPrompt-epiSDœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"selected": false,
|
||||
"source": "ParseData-gouVC",
|
||||
"sourceHandle": "{œdataTypeœ: œParseDataœ, œidœ: œParseData-gouVCœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "Prompt-epiSD",
|
||||
"targetHandle": "{œfieldNameœ: œtextœ, œidœ: œPrompt-epiSDœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
},
|
||||
{
|
||||
"animated": false,
|
||||
"className": "",
|
||||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "Prompt",
|
||||
"id": "Prompt-epiSD",
|
||||
"id": "Prompt-AJxY8",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
|
|
@ -71,19 +15,19 @@
|
|||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_message",
|
||||
"id": "OpenAIModel-ppS3O",
|
||||
"id": "OpenAIModel-zVeWr",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
"id": "reactflow__edge-Prompt-epiSD{œdataTypeœ:œPromptœ,œidœ:œPrompt-epiSDœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-ppS3O{œfieldNameœ:œsystem_messageœ,œidœ:œOpenAIModel-ppS3Oœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"id": "reactflow__edge-Prompt-AJxY8{œdataTypeœ:œPromptœ,œidœ:œPrompt-AJxY8œ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-zVeWr{œfieldNameœ:œsystem_messageœ,œidœ:œOpenAIModel-zVeWrœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"selected": false,
|
||||
"source": "Prompt-epiSD",
|
||||
"sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-epiSDœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "OpenAIModel-ppS3O",
|
||||
"targetHandle": "{œfieldNameœ: œsystem_messageœ, œidœ: œOpenAIModel-ppS3Oœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
"source": "Prompt-AJxY8",
|
||||
"sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-AJxY8œ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "OpenAIModel-zVeWr",
|
||||
"targetHandle": "{œfieldNameœ: œsystem_messageœ, œidœ: œOpenAIModel-zVeWrœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
},
|
||||
{
|
||||
"animated": false,
|
||||
|
|
@ -91,7 +35,7 @@
|
|||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-ppS3O",
|
||||
"id": "OpenAIModel-zVeWr",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
|
|
@ -99,19 +43,19 @@
|
|||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "summary",
|
||||
"id": "Prompt-l9XAo",
|
||||
"id": "Prompt-nmNbi",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
"id": "reactflow__edge-OpenAIModel-ppS3O{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-ppS3Oœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-Prompt-l9XAo{œfieldNameœ:œsummaryœ,œidœ:œPrompt-l9XAoœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"id": "reactflow__edge-OpenAIModel-zVeWr{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-zVeWrœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-Prompt-nmNbi{œfieldNameœ:œsummaryœ,œidœ:œPrompt-nmNbiœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"selected": false,
|
||||
"source": "OpenAIModel-ppS3O",
|
||||
"sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-ppS3Oœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "Prompt-l9XAo",
|
||||
"targetHandle": "{œfieldNameœ: œsummaryœ, œidœ: œPrompt-l9XAoœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
"source": "OpenAIModel-zVeWr",
|
||||
"sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-zVeWrœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "Prompt-nmNbi",
|
||||
"targetHandle": "{œfieldNameœ: œsummaryœ, œidœ: œPrompt-nmNbiœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
},
|
||||
{
|
||||
"animated": false,
|
||||
|
|
@ -119,7 +63,7 @@
|
|||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "Prompt",
|
||||
"id": "Prompt-l9XAo",
|
||||
"id": "Prompt-nmNbi",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
|
|
@ -127,19 +71,19 @@
|
|||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_message",
|
||||
"id": "OpenAIModel-DxfrQ",
|
||||
"id": "OpenAIModel-Izkdb",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
"id": "reactflow__edge-Prompt-l9XAo{œdataTypeœ:œPromptœ,œidœ:œPrompt-l9XAoœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-DxfrQ{œfieldNameœ:œsystem_messageœ,œidœ:œOpenAIModel-DxfrQœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"id": "reactflow__edge-Prompt-nmNbi{œdataTypeœ:œPromptœ,œidœ:œPrompt-nmNbiœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-Izkdb{œfieldNameœ:œsystem_messageœ,œidœ:œOpenAIModel-Izkdbœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"selected": false,
|
||||
"source": "Prompt-l9XAo",
|
||||
"sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-l9XAoœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "OpenAIModel-DxfrQ",
|
||||
"targetHandle": "{œfieldNameœ: œsystem_messageœ, œidœ: œOpenAIModel-DxfrQœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
"source": "Prompt-nmNbi",
|
||||
"sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-nmNbiœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "OpenAIModel-Izkdb",
|
||||
"targetHandle": "{œfieldNameœ: œsystem_messageœ, œidœ: œOpenAIModel-Izkdbœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
},
|
||||
{
|
||||
"animated": false,
|
||||
|
|
@ -147,7 +91,7 @@
|
|||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "Prompt",
|
||||
"id": "Prompt-LKleN",
|
||||
"id": "Prompt-LXvg7",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
|
|
@ -155,47 +99,19 @@
|
|||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_message",
|
||||
"id": "OpenAIModel-W1vhv",
|
||||
"id": "OpenAIModel-Hl8vG",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
"id": "reactflow__edge-Prompt-LKleN{œdataTypeœ:œPromptœ,œidœ:œPrompt-LKleNœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-W1vhv{œfieldNameœ:œsystem_messageœ,œidœ:œOpenAIModel-W1vhvœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"id": "reactflow__edge-Prompt-LXvg7{œdataTypeœ:œPromptœ,œidœ:œPrompt-LXvg7œ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-Hl8vG{œfieldNameœ:œsystem_messageœ,œidœ:œOpenAIModel-Hl8vGœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"selected": false,
|
||||
"source": "Prompt-LKleN",
|
||||
"sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-LKleNœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "OpenAIModel-W1vhv",
|
||||
"targetHandle": "{œfieldNameœ: œsystem_messageœ, œidœ: œOpenAIModel-W1vhvœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
},
|
||||
{
|
||||
"animated": false,
|
||||
"className": "",
|
||||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "ParseData",
|
||||
"id": "ParseData-gouVC",
|
||||
"name": "text",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "OpenAIModel-W1vhv",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
"id": "reactflow__edge-ParseData-gouVC{œdataTypeœ:œParseDataœ,œidœ:œParseData-gouVCœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-W1vhv{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-W1vhvœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"selected": false,
|
||||
"source": "ParseData-gouVC",
|
||||
"sourceHandle": "{œdataTypeœ: œParseDataœ, œidœ: œParseData-gouVCœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "OpenAIModel-W1vhv",
|
||||
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-W1vhvœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
"source": "Prompt-LXvg7",
|
||||
"sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-LXvg7œ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "OpenAIModel-Hl8vG",
|
||||
"targetHandle": "{œfieldNameœ: œsystem_messageœ, œidœ: œOpenAIModel-Hl8vGœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
},
|
||||
{
|
||||
"animated": false,
|
||||
|
|
@ -203,7 +119,7 @@
|
|||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-W1vhv",
|
||||
"id": "OpenAIModel-Hl8vG",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
|
|
@ -211,7 +127,7 @@
|
|||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-V5ZFA",
|
||||
"id": "ChatOutput-NS8z5",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
|
|
@ -220,12 +136,12 @@
|
|||
"type": "other"
|
||||
}
|
||||
},
|
||||
"id": "reactflow__edge-OpenAIModel-W1vhv{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-W1vhvœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-V5ZFA{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-V5ZFAœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œotherœ}",
|
||||
"id": "reactflow__edge-OpenAIModel-Hl8vG{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-Hl8vGœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-NS8z5{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-NS8z5œ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œotherœ}",
|
||||
"selected": false,
|
||||
"source": "OpenAIModel-W1vhv",
|
||||
"sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-W1vhvœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "ChatOutput-V5ZFA",
|
||||
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-V5ZFAœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œotherœ}"
|
||||
"source": "OpenAIModel-Hl8vG",
|
||||
"sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-Hl8vGœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "ChatOutput-NS8z5",
|
||||
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-NS8z5œ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œotherœ}"
|
||||
},
|
||||
{
|
||||
"animated": false,
|
||||
|
|
@ -233,7 +149,7 @@
|
|||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "OpenAIModel",
|
||||
"id": "OpenAIModel-DxfrQ",
|
||||
"id": "OpenAIModel-Izkdb",
|
||||
"name": "text_output",
|
||||
"output_types": [
|
||||
"Message"
|
||||
|
|
@ -241,7 +157,7 @@
|
|||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-8y94b",
|
||||
"id": "ChatOutput-GzAXT",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
|
|
@ -250,18 +166,74 @@
|
|||
"type": "other"
|
||||
}
|
||||
},
|
||||
"id": "reactflow__edge-OpenAIModel-DxfrQ{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-DxfrQœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-8y94b{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-8y94bœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œotherœ}",
|
||||
"id": "reactflow__edge-OpenAIModel-Izkdb{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-Izkdbœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-GzAXT{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-GzAXTœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œotherœ}",
|
||||
"selected": false,
|
||||
"source": "OpenAIModel-DxfrQ",
|
||||
"sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-DxfrQœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "ChatOutput-8y94b",
|
||||
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-8y94bœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œotherœ}"
|
||||
"source": "OpenAIModel-Izkdb",
|
||||
"sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-Izkdbœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "ChatOutput-GzAXT",
|
||||
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-GzAXTœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œotherœ}"
|
||||
},
|
||||
{
|
||||
"animated": false,
|
||||
"className": "",
|
||||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "File",
|
||||
"id": "File-m5GWE",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "OpenAIModel-Hl8vG",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
"id": "xy-edge__File-m5GWE{œdataTypeœ:œFileœ,œidœ:œFile-m5GWEœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-Hl8vG{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-Hl8vGœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"selected": false,
|
||||
"source": "File-m5GWE",
|
||||
"sourceHandle": "{œdataTypeœ: œFileœ, œidœ: œFile-m5GWEœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "OpenAIModel-Hl8vG",
|
||||
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-Hl8vGœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
},
|
||||
{
|
||||
"animated": false,
|
||||
"className": "",
|
||||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "File",
|
||||
"id": "File-m5GWE",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
]
|
||||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "text",
|
||||
"id": "Prompt-AJxY8",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
"id": "xy-edge__File-m5GWE{œdataTypeœ:œFileœ,œidœ:œFile-m5GWEœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Prompt-AJxY8{œfieldNameœ:œtextœ,œidœ:œPrompt-AJxY8œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"selected": false,
|
||||
"source": "File-m5GWE",
|
||||
"sourceHandle": "{œdataTypeœ: œFileœ, œidœ: œFile-m5GWEœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "Prompt-AJxY8",
|
||||
"targetHandle": "{œfieldNameœ: œtextœ, œidœ: œPrompt-AJxY8œ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"data": {
|
||||
"id": "File-Ktatn",
|
||||
"id": "File-m5GWE",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data"
|
||||
|
|
@ -481,7 +453,7 @@
|
|||
"bz2",
|
||||
"gz"
|
||||
],
|
||||
"file_path": "43bb2a52-8dbf-4edf-a200-c54ee0e7fa1f\\2025-02-21_09-35-24_messages.json",
|
||||
"file_path": [],
|
||||
"info": "Supported file extensions: txt, md, mdx, csv, json, yaml, yml, xml, html, htm, pdf, docx, py, sh, sql, js, ts, tsx; optionally bundled in file extensions: zip, tar, tgz, bz2, gz",
|
||||
"list": true,
|
||||
"list_add_label": "Add More",
|
||||
|
|
@ -556,183 +528,21 @@
|
|||
"type": "File"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "File-Ktatn",
|
||||
"id": "File-m5GWE",
|
||||
"measured": {
|
||||
"height": 228,
|
||||
"height": 336,
|
||||
"width": 320
|
||||
},
|
||||
"position": {
|
||||
"x": -2423.1133566137846,
|
||||
"y": 736.6681755311793
|
||||
"x": -2283.1962393600293,
|
||||
"y": 660.3497479382216
|
||||
},
|
||||
"selected": false,
|
||||
"type": "genericNode"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "ParseData-gouVC",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Data",
|
||||
"Message"
|
||||
],
|
||||
"beta": false,
|
||||
"conditional_paths": [],
|
||||
"custom_fields": {},
|
||||
"description": "Convert Data objects into Messages using any {field_name} from input data.",
|
||||
"display_name": "Data to Message",
|
||||
"documentation": "",
|
||||
"edited": false,
|
||||
"field_order": [
|
||||
"data",
|
||||
"template",
|
||||
"sep"
|
||||
],
|
||||
"frozen": false,
|
||||
"icon": "message-square",
|
||||
"legacy": false,
|
||||
"lf_version": "1.2.0",
|
||||
"metadata": {
|
||||
"legacy_name": "Parse Data"
|
||||
},
|
||||
"minimized": false,
|
||||
"output_types": [],
|
||||
"outputs": [
|
||||
{
|
||||
"allows_loop": false,
|
||||
"cache": true,
|
||||
"display_name": "Message",
|
||||
"method": "parse_data",
|
||||
"name": "text",
|
||||
"selected": "Message",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Message"
|
||||
],
|
||||
"value": "__UNDEFINED__"
|
||||
},
|
||||
{
|
||||
"allows_loop": false,
|
||||
"cache": true,
|
||||
"display_name": "Data List",
|
||||
"method": "parse_data_as_list",
|
||||
"name": "data_list",
|
||||
"selected": "Data",
|
||||
"tool_mode": true,
|
||||
"types": [
|
||||
"Data"
|
||||
],
|
||||
"value": "__UNDEFINED__"
|
||||
}
|
||||
],
|
||||
"pinned": false,
|
||||
"template": {
|
||||
"_type": "Component",
|
||||
"code": {
|
||||
"advanced": true,
|
||||
"dynamic": true,
|
||||
"fileTypes": [],
|
||||
"file_path": "",
|
||||
"info": "",
|
||||
"list": false,
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
"name": "code",
|
||||
"password": false,
|
||||
"placeholder": "",
|
||||
"required": true,
|
||||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "code",
|
||||
"value": "from langflow.custom import Component\nfrom langflow.helpers.data import data_to_text, data_to_text_list\nfrom langflow.io import DataInput, MultilineInput, Output, StrInput\nfrom langflow.schema import Data\nfrom langflow.schema.message import Message\n\n\nclass ParseDataComponent(Component):\n display_name = \"Data to Message\"\n description = \"Convert Data objects into Messages using any {field_name} from input data.\"\n icon = \"message-square\"\n name = \"ParseData\"\n metadata = {\n \"legacy_name\": \"Parse Data\",\n }\n\n inputs = [\n DataInput(\n name=\"data\",\n display_name=\"Data\",\n info=\"The data to convert to text.\",\n is_list=True,\n required=True,\n ),\n MultilineInput(\n name=\"template\",\n display_name=\"Template\",\n info=\"The template to use for formatting the data. \"\n \"It can contain the keys {text}, {data} or any other key in the Data.\",\n value=\"{text}\",\n required=True,\n ),\n StrInput(name=\"sep\", display_name=\"Separator\", advanced=True, value=\"\\n\"),\n ]\n\n outputs = [\n Output(\n display_name=\"Message\",\n name=\"text\",\n info=\"Data as a single Message, with each input Data separated by Separator\",\n method=\"parse_data\",\n ),\n Output(\n display_name=\"Data List\",\n name=\"data_list\",\n info=\"Data as a list of new Data, each having `text` formatted by Template\",\n method=\"parse_data_as_list\",\n ),\n ]\n\n def _clean_args(self) -> tuple[list[Data], str, str]:\n data = self.data if isinstance(self.data, list) else [self.data]\n template = self.template\n sep = self.sep\n return data, template, sep\n\n def parse_data(self) -> Message:\n data, template, sep = self._clean_args()\n result_string = data_to_text(template, data, sep)\n self.status = result_string\n return Message(text=result_string)\n\n def parse_data_as_list(self) -> list[Data]:\n data, template, _ = self._clean_args()\n text_list, data_list = data_to_text_list(template, data)\n for item, text in zip(data_list, text_list, strict=True):\n item.set_text(text)\n self.status = data_list\n return data_list\n"
|
||||
},
|
||||
"data": {
|
||||
"_input_type": "DataInput",
|
||||
"advanced": false,
|
||||
"display_name": "Data",
|
||||
"dynamic": false,
|
||||
"info": "The data to convert to text.",
|
||||
"input_types": [
|
||||
"Data"
|
||||
],
|
||||
"list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "data",
|
||||
"placeholder": "",
|
||||
"required": true,
|
||||
"show": true,
|
||||
"title_case": false,
|
||||
"tool_mode": false,
|
||||
"trace_as_input": true,
|
||||
"trace_as_metadata": true,
|
||||
"type": "other",
|
||||
"value": ""
|
||||
},
|
||||
"sep": {
|
||||
"_input_type": "StrInput",
|
||||
"advanced": true,
|
||||
"display_name": "Separator",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
"name": "sep",
|
||||
"placeholder": "",
|
||||
"required": false,
|
||||
"show": true,
|
||||
"title_case": false,
|
||||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "\n"
|
||||
},
|
||||
"template": {
|
||||
"_input_type": "MultilineInput",
|
||||
"advanced": false,
|
||||
"display_name": "Template",
|
||||
"dynamic": false,
|
||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the Data.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
"multiline": true,
|
||||
"name": "template",
|
||||
"placeholder": "",
|
||||
"required": true,
|
||||
"show": true,
|
||||
"title_case": false,
|
||||
"tool_mode": false,
|
||||
"trace_as_input": true,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "list of messages details: {file_path}"
|
||||
}
|
||||
},
|
||||
"tool_mode": false
|
||||
},
|
||||
"showNode": true,
|
||||
"type": "ParseData"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "ParseData-gouVC",
|
||||
"measured": {
|
||||
"height": 342,
|
||||
"width": 320
|
||||
},
|
||||
"position": {
|
||||
"x": -2048.092643605176,
|
||||
"y": 650.2904629519279
|
||||
},
|
||||
"selected": false,
|
||||
"type": "genericNode"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "Prompt-l9XAo",
|
||||
"id": "Prompt-nmNbi",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
|
|
@ -871,9 +681,9 @@
|
|||
"type": "Prompt"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "Prompt-l9XAo",
|
||||
"id": "Prompt-nmNbi",
|
||||
"measured": {
|
||||
"height": 339,
|
||||
"height": 413,
|
||||
"width": 320
|
||||
},
|
||||
"position": {
|
||||
|
|
@ -885,7 +695,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "Prompt-epiSD",
|
||||
"id": "Prompt-AJxY8",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
|
|
@ -1024,9 +834,9 @@
|
|||
"type": "Prompt"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "Prompt-epiSD",
|
||||
"id": "Prompt-AJxY8",
|
||||
"measured": {
|
||||
"height": 339,
|
||||
"height": 413,
|
||||
"width": 320
|
||||
},
|
||||
"position": {
|
||||
|
|
@ -1038,7 +848,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "OpenAIModel-ppS3O",
|
||||
"id": "OpenAIModel-zVeWr",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
|
|
@ -1117,7 +927,7 @@
|
|||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"load_from_db": false,
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
"placeholder": "",
|
||||
|
|
@ -1406,9 +1216,9 @@
|
|||
"type": "OpenAIModel"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "OpenAIModel-ppS3O",
|
||||
"id": "OpenAIModel-zVeWr",
|
||||
"measured": {
|
||||
"height": 656,
|
||||
"height": 525,
|
||||
"width": 320
|
||||
},
|
||||
"position": {
|
||||
|
|
@ -1420,7 +1230,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "OpenAIModel-DxfrQ",
|
||||
"id": "OpenAIModel-Izkdb",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
|
|
@ -1499,7 +1309,7 @@
|
|||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"load_from_db": false,
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
"placeholder": "",
|
||||
|
|
@ -1788,9 +1598,9 @@
|
|||
"type": "OpenAIModel"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "OpenAIModel-DxfrQ",
|
||||
"id": "OpenAIModel-Izkdb",
|
||||
"measured": {
|
||||
"height": 656,
|
||||
"height": 525,
|
||||
"width": 320
|
||||
},
|
||||
"position": {
|
||||
|
|
@ -1802,7 +1612,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "Prompt-LKleN",
|
||||
"id": "Prompt-LXvg7",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
|
|
@ -1917,9 +1727,9 @@
|
|||
"type": "Prompt"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "Prompt-LKleN",
|
||||
"id": "Prompt-LXvg7",
|
||||
"measured": {
|
||||
"height": 256,
|
||||
"height": 330,
|
||||
"width": 320
|
||||
},
|
||||
"position": {
|
||||
|
|
@ -1931,7 +1741,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "OpenAIModel-W1vhv",
|
||||
"id": "OpenAIModel-Hl8vG",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"LanguageModel",
|
||||
|
|
@ -2010,7 +1820,7 @@
|
|||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"load_from_db": false,
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
"placeholder": "",
|
||||
|
|
@ -2299,9 +2109,9 @@
|
|||
"type": "OpenAIModel"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "OpenAIModel-W1vhv",
|
||||
"id": "OpenAIModel-Hl8vG",
|
||||
"measured": {
|
||||
"height": 656,
|
||||
"height": 525,
|
||||
"width": 320
|
||||
},
|
||||
"position": {
|
||||
|
|
@ -2313,7 +2123,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "note-oqDGB",
|
||||
"id": "note-D3g3A",
|
||||
"node": {
|
||||
"description": "# Sentiment Analysis Flow \n\nThis flow processes text data, analyzes sentiment, and provides structured insights. \n\n## Prerequisite\n\n* [OpenAI API key](https://platform.openai.com/docs/)\n\n## Quickstart\n\n1. Add your [OpenAI API key](https://platform.openai.com/docs/) to the OpenAI model components.\n2. In the **File Component**, load text data in `.txt`, `.csv`, or `.json` formats.\n3. Open the **Playground** to see the analysis and recommendation the flow constructs.\n\n## How It Works \n\n1. The **Data to Message** component converts raw data into structured messages. \n\n2. The **NLP expert** prompt provides sentiment analysis, while the **Analyzing messages** prompt summarizes messages from a discussion board.\n\n3. The final **Prompt Component** creates a structured recommendation prompt to ensure that the AI model receives well-formatted input. \n\n4. The **OpenAI Model Component** processes the text and classifies the sentiment as **Positive, Neutral, or Negative**. \n\n",
|
||||
"display_name": "",
|
||||
|
|
@ -2324,7 +2134,7 @@
|
|||
},
|
||||
"dragging": false,
|
||||
"height": 574,
|
||||
"id": "note-oqDGB",
|
||||
"id": "note-D3g3A",
|
||||
"measured": {
|
||||
"height": 574,
|
||||
"width": 413
|
||||
|
|
@ -2340,7 +2150,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "ChatOutput-V5ZFA",
|
||||
"id": "ChatOutput-NS8z5",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
|
|
@ -2633,7 +2443,7 @@
|
|||
"type": "ChatOutput"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "ChatOutput-V5ZFA",
|
||||
"id": "ChatOutput-NS8z5",
|
||||
"measured": {
|
||||
"height": 192,
|
||||
"width": 320
|
||||
|
|
@ -2647,7 +2457,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "ChatOutput-8y94b",
|
||||
"id": "ChatOutput-GzAXT",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
|
|
@ -2940,7 +2750,7 @@
|
|||
"type": "ChatOutput"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "ChatOutput-8y94b",
|
||||
"id": "ChatOutput-GzAXT",
|
||||
"measured": {
|
||||
"height": 192,
|
||||
"width": 320
|
||||
|
|
@ -2954,7 +2764,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "note-fOJpn",
|
||||
"id": "note-Sg6zZ",
|
||||
"node": {
|
||||
"description": "### 💡 Add your OpenAI API key here 👇",
|
||||
"display_name": "",
|
||||
|
|
@ -2967,7 +2777,7 @@
|
|||
},
|
||||
"dragging": false,
|
||||
"height": 326,
|
||||
"id": "note-fOJpn",
|
||||
"id": "note-Sg6zZ",
|
||||
"measured": {
|
||||
"height": 326,
|
||||
"width": 352
|
||||
|
|
@ -2983,7 +2793,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "note-PJ0gY",
|
||||
"id": "note-oCG60",
|
||||
"node": {
|
||||
"description": "### 💡 Add your OpenAI API key here 👇",
|
||||
"display_name": "",
|
||||
|
|
@ -2995,7 +2805,7 @@
|
|||
"type": "note"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "note-PJ0gY",
|
||||
"id": "note-oCG60",
|
||||
"measured": {
|
||||
"height": 324,
|
||||
"width": 324
|
||||
|
|
@ -3009,7 +2819,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "note-yzNaN",
|
||||
"id": "note-hEufz",
|
||||
"node": {
|
||||
"description": "### 💡 Add your OpenAI API key here 👇",
|
||||
"display_name": "",
|
||||
|
|
@ -3021,7 +2831,7 @@
|
|||
"type": "note"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "note-yzNaN",
|
||||
"id": "note-hEufz",
|
||||
"measured": {
|
||||
"height": 324,
|
||||
"width": 324
|
||||
|
|
@ -3030,19 +2840,19 @@
|
|||
"x": -1309.8036340068625,
|
||||
"y": 925.6888138443481
|
||||
},
|
||||
"selected": true,
|
||||
"selected": false,
|
||||
"type": "noteNode"
|
||||
}
|
||||
],
|
||||
"viewport": {
|
||||
"x": 1436.086487750284,
|
||||
"y": 17.453112924488266,
|
||||
"zoom": 0.48563499996133874
|
||||
"x": 1195.5900912340421,
|
||||
"y": 170.90395042473165,
|
||||
"zoom": 0.5503258036709812
|
||||
}
|
||||
},
|
||||
"description": "Load text data from various file formats, process it into structured messages, and analyze sentiment using AI-powered classification.",
|
||||
"endpoint_name": null,
|
||||
"id": "4d068861-cb44-46b0-a70f-15467baab096",
|
||||
"id": "ee875a1c-3b8a-4500-8a6b-bb5d1534b5de",
|
||||
"is_component": false,
|
||||
"last_tested_version": "1.2.0",
|
||||
"name": "Text Sentiment Analysis",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,5 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { addLegacyComponents } from "../../utils/add-legacy-components";
|
||||
import { adjustScreenView } from "../../utils/adjust-screen-view";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
|
||||
|
|
@ -12,13 +13,7 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("retrievalqa");
|
||||
|
||||
await page.getByTestId("sidebar-options-trigger").click();
|
||||
await page
|
||||
.getByTestId("sidebar-legacy-switch")
|
||||
.isVisible({ timeout: 5000 });
|
||||
await page.getByTestId("sidebar-legacy-switch").click();
|
||||
await expect(page.getByTestId("sidebar-legacy-switch")).toBeChecked();
|
||||
await page.getByTestId("sidebar-options-trigger").click();
|
||||
await addLegacyComponents(page);
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
await page
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { addLegacyComponents } from "../../utils/add-legacy-components";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
import { zoomOut } from "../../utils/zoom-out";
|
||||
|
||||
|
|
@ -11,8 +12,9 @@ test(
|
|||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
|
||||
//first component
|
||||
await addLegacyComponents(page);
|
||||
|
||||
//first component
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("text input");
|
||||
await page.waitForSelector('[data-testid="inputsText Input"]', {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { test } from "@playwright/test";
|
||||
import { addLegacyComponents } from "../../utils/add-legacy-components";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
import { removeOldApiKeys } from "../../utils/remove-old-api-keys";
|
||||
import { updateOldComponents } from "../../utils/update-old-components";
|
||||
|
|
@ -11,6 +12,8 @@ test(
|
|||
await awaitBootstrapTest(page);
|
||||
await page.getByTestId("blank-flow").click();
|
||||
|
||||
await addLegacyComponents(page);
|
||||
|
||||
//first component
|
||||
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ withEventDeliveryModes(
|
|||
|
||||
expect(concatAllText.length).toBeGreaterThan(200);
|
||||
|
||||
expect(concatAllText).toContain("div");
|
||||
expect(concatAllText).toContain("class=");
|
||||
expect(concatAllText).toContain("html");
|
||||
expect(concatAllText).toContain("body");
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { test } from "@playwright/test";
|
||||
import * as dotenv from "dotenv";
|
||||
import path from "path";
|
||||
import { addLegacyComponents } from "../../utils/add-legacy-components";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
import { zoomOut } from "../../utils/zoom-out";
|
||||
|
||||
|
|
@ -23,17 +24,13 @@ test(
|
|||
});
|
||||
await page.getByTestId("blank-flow").click();
|
||||
|
||||
await page.getByTestId("sidebar-options-trigger").click();
|
||||
await page
|
||||
.getByTestId("sidebar-legacy-switch")
|
||||
.isVisible({ timeout: 5000 });
|
||||
await page.getByTestId("sidebar-legacy-switch").click();
|
||||
await addLegacyComponents(page);
|
||||
|
||||
//---------------------------------- CHAT INPUT
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("chat input");
|
||||
await page.waitForSelector('[data-testid="inputsChat Input"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
|
||||
await zoomOut(page, 6);
|
||||
|
|
@ -48,7 +45,7 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("list");
|
||||
await page.waitForSelector('[data-testid="helpersCreate List"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
await page
|
||||
.getByTestId("helpersCreate List")
|
||||
|
|
@ -97,7 +94,7 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("data to message");
|
||||
await page.waitForSelector('[data-testid="processingData to Message"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
await page
|
||||
.getByTestId("processingData to Message")
|
||||
|
|
@ -114,7 +111,7 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("pass");
|
||||
await page.waitForSelector('[data-testid="logicPass"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
await page
|
||||
.getByTestId("logicPass")
|
||||
|
|
@ -122,13 +119,13 @@ test(
|
|||
targetPosition: { x: 800, y: 100 },
|
||||
});
|
||||
await page.waitForSelector('[data-testid="logicPass"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
//---------------------------------- PASS
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("pass");
|
||||
await page.waitForSelector('[data-testid="logicPass"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
await page
|
||||
.getByTestId("logicPass")
|
||||
|
|
@ -136,13 +133,13 @@ test(
|
|||
targetPosition: { x: 50, y: 200 },
|
||||
});
|
||||
await page.waitForSelector('[data-testid="logicPass"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
//---------------------------------- PASS
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("pass");
|
||||
await page.waitForSelector('[data-testid="logicPass"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
await page
|
||||
.getByTestId("logicPass")
|
||||
|
|
@ -150,13 +147,13 @@ test(
|
|||
targetPosition: { x: 200, y: 300 },
|
||||
});
|
||||
await page.waitForSelector('[data-testid="logicPass"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
//---------------------------------- PROMPT
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("prompt");
|
||||
await page.waitForSelector('[data-testid="promptsPrompt"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
await page
|
||||
.getByTestId("promptsPrompt")
|
||||
|
|
@ -168,7 +165,7 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("openai");
|
||||
await page.waitForSelector('[data-testid="modelsOpenAI"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
await page
|
||||
.getByTestId("modelsOpenAI")
|
||||
|
|
@ -180,7 +177,7 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("if else");
|
||||
await page.waitForSelector('[data-testid="logicIf-Else"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
await page
|
||||
.getByTestId("logicIf-Else")
|
||||
|
|
@ -191,7 +188,7 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("chat output");
|
||||
await page.waitForSelector('[data-testid="outputsChat Output"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
await page
|
||||
.getByTestId("outputsChat Output")
|
||||
|
|
@ -199,13 +196,13 @@ test(
|
|||
targetPosition: { x: 800, y: 300 },
|
||||
});
|
||||
await page.waitForSelector('[data-testid="outputsChat Output"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
//---------------------------------- CHAT OUTPUT
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("chat output");
|
||||
await page.waitForSelector('[data-testid="outputsChat Output"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
await page
|
||||
.getByTestId("outputsChat Output")
|
||||
|
|
@ -213,7 +210,7 @@ test(
|
|||
targetPosition: { x: 800, y: 400 },
|
||||
});
|
||||
await page.waitForSelector('[data-testid="outputsChat Output"]', {
|
||||
timeout: 500,
|
||||
timeout: 2000,
|
||||
});
|
||||
//----------------------------------
|
||||
await page.getByTestId("fit_view").click();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { addLegacyComponents } from "../../utils/add-legacy-components";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
import { updateOldComponents } from "../../utils/update-old-components";
|
||||
import { zoomOut } from "../../utils/zoom-out";
|
||||
|
|
@ -16,7 +17,10 @@ test(
|
|||
|
||||
await page.getByTestId("blank-flow").click();
|
||||
|
||||
await addLegacyComponents(page);
|
||||
|
||||
//first component
|
||||
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("openai embedding");
|
||||
await page.waitForSelector("text=OpenAI Embeddings", {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import * as dotenv from "dotenv";
|
||||
import path from "path";
|
||||
import { addLegacyComponents } from "../../utils/add-legacy-components";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
import { initialGPTsetup } from "../../utils/initialGPTsetup";
|
||||
test(
|
||||
|
|
@ -28,11 +29,7 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("message history");
|
||||
|
||||
await page.getByTestId("sidebar-options-trigger").click();
|
||||
await page
|
||||
.getByTestId("sidebar-legacy-switch")
|
||||
.isVisible({ timeout: 5000 });
|
||||
await page.getByTestId("sidebar-legacy-switch").click();
|
||||
await addLegacyComponents(page);
|
||||
|
||||
// Locate the canvas element
|
||||
const canvas = page.locator("#react-flow-id"); // Update the selector if needed
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { test } from "@playwright/test";
|
||||
import { addLegacyComponents } from "../../utils/add-legacy-components";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
|
||||
test(
|
||||
|
|
@ -19,11 +20,7 @@ test(
|
|||
timeout: 3000,
|
||||
});
|
||||
|
||||
await page.getByTestId("sidebar-options-trigger").click();
|
||||
await page
|
||||
.getByTestId("sidebar-legacy-switch")
|
||||
.isVisible({ timeout: 5000 });
|
||||
await page.getByTestId("sidebar-legacy-switch").click();
|
||||
await addLegacyComponents(page);
|
||||
|
||||
await page.waitForSelector('[data-testid="prototypesPython Function"]', {
|
||||
timeout: 3000,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { addLegacyComponents } from "../../utils/add-legacy-components";
|
||||
import { adjustScreenView } from "../../utils/adjust-screen-view";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
import { generateRandomFilename } from "../../utils/generate-filename";
|
||||
|
|
@ -29,6 +30,8 @@ test(
|
|||
});
|
||||
await page.getByTestId("blank-flow").click();
|
||||
|
||||
await addLegacyComponents(page);
|
||||
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("file");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { addLegacyComponents } from "../../utils/add-legacy-components";
|
||||
import { adjustScreenView } from "../../utils/adjust-screen-view";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
|
||||
|
|
@ -15,13 +16,7 @@ test(
|
|||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("alter metadata");
|
||||
|
||||
await page.getByTestId("sidebar-options-trigger").click();
|
||||
await page
|
||||
.getByTestId("sidebar-legacy-switch")
|
||||
.isVisible({ timeout: 5000 });
|
||||
await page.getByTestId("sidebar-legacy-switch").click();
|
||||
await expect(page.getByTestId("sidebar-legacy-switch")).toBeChecked();
|
||||
await page.getByTestId("sidebar-options-trigger").click();
|
||||
await addLegacyComponents(page);
|
||||
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { addLegacyComponents } from "../../utils/add-legacy-components";
|
||||
import { adjustScreenView } from "../../utils/adjust-screen-view";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
|
||||
|
|
@ -14,14 +15,7 @@ test(
|
|||
timeout: 3000,
|
||||
});
|
||||
|
||||
await page.getByTestId("sidebar-options-trigger").click();
|
||||
|
||||
await expect(page.getByTestId("sidebar-legacy-switch")).toBeVisible({
|
||||
timeout: 5000,
|
||||
});
|
||||
await page.getByTestId("sidebar-legacy-switch").click();
|
||||
await expect(page.getByTestId("sidebar-legacy-switch")).toBeChecked();
|
||||
await page.getByTestId("sidebar-options-trigger").click();
|
||||
await addLegacyComponents(page);
|
||||
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("retrievalqa");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { addLegacyComponents } from "../../utils/add-legacy-components";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
import { zoomOut } from "../../utils/zoom-out";
|
||||
|
||||
|
|
@ -9,6 +10,8 @@ test(
|
|||
await awaitBootstrapTest(page);
|
||||
await page.getByTestId("blank-flow").click();
|
||||
|
||||
await addLegacyComponents(page);
|
||||
|
||||
await page.waitForSelector(
|
||||
'[data-testid="sidebar-custom-component-button"]',
|
||||
{
|
||||
|
|
@ -146,13 +149,23 @@ test(
|
|||
.first()
|
||||
.click();
|
||||
|
||||
await zoomOut(page, 4);
|
||||
|
||||
await page.getByTestId("div-generic-node").nth(5).click();
|
||||
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.waitForSelector('[data-testid="more-options-modal"]', {
|
||||
timeout: 100000,
|
||||
});
|
||||
|
||||
await page.getByTestId("more-options-modal").click();
|
||||
|
||||
await page.waitForTimeout(500);
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
await page.waitForSelector('[data-testid="expand-button-modal"]', {
|
||||
timeout: 100000,
|
||||
});
|
||||
|
||||
await page.getByTestId("expand-button-modal").click();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { expect, test } from "@playwright/test";
|
||||
import { addLegacyComponents } from "../../utils/add-legacy-components";
|
||||
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
|
||||
|
||||
test(
|
||||
|
|
@ -18,13 +19,7 @@ test(
|
|||
timeout: 30000,
|
||||
});
|
||||
|
||||
await page.getByTestId("sidebar-options-trigger").click();
|
||||
await page
|
||||
.getByTestId("sidebar-legacy-switch")
|
||||
.isVisible({ timeout: 5000 });
|
||||
await page.getByTestId("sidebar-legacy-switch").click();
|
||||
await expect(page.getByTestId("sidebar-legacy-switch")).toBeChecked();
|
||||
await page.getByTestId("sidebar-options-trigger").click();
|
||||
await addLegacyComponents(page);
|
||||
|
||||
let modelElement = await page.getByTestId(
|
||||
"langchain_utilitiesRetrieverTool",
|
||||
|
|
|
|||
9
src/frontend/tests/utils/add-legacy-components.ts
Normal file
9
src/frontend/tests/utils/add-legacy-components.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { expect, Page } from "playwright/test";
|
||||
|
||||
export const addLegacyComponents = async (page: Page) => {
|
||||
await page.getByTestId("sidebar-options-trigger").click();
|
||||
await page.getByTestId("sidebar-legacy-switch").isVisible({ timeout: 5000 });
|
||||
await page.getByTestId("sidebar-legacy-switch").click();
|
||||
await expect(page.getByTestId("sidebar-legacy-switch")).toBeChecked();
|
||||
await page.getByTestId("sidebar-options-trigger").click();
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue