fix: preserve template values in custom component updates (#5821)
* fix: preserve template values in custom component updates * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
00dcef2bf1
commit
f34ba4cd95
7 changed files with 4094 additions and 2984 deletions
|
|
@ -720,6 +720,7 @@ async def custom_component_update(
|
||||||
user_id=user.id,
|
user_id=user.id,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
template_data = code_request.model_dump().get("template", {}).copy()
|
||||||
component_node["tool_mode"] = code_request.tool_mode
|
component_node["tool_mode"] = code_request.tool_mode
|
||||||
|
|
||||||
if hasattr(cc_instance, "set_attributes"):
|
if hasattr(cc_instance, "set_attributes"):
|
||||||
|
|
@ -747,6 +748,13 @@ async def custom_component_update(
|
||||||
field_name=code_request.field,
|
field_name=code_request.field,
|
||||||
)
|
)
|
||||||
component_node["template"] = updated_build_config
|
component_node["template"] = updated_build_config
|
||||||
|
|
||||||
|
# Preserve previous field values by merging filtered template data into
|
||||||
|
# the component node's template. Only include entries where the value
|
||||||
|
# is a dictionary containing the key "value".
|
||||||
|
filtered_data = {k: v for k, v in template_data.items() if isinstance(v, dict) and "value" in v}
|
||||||
|
component_node["template"] |= filtered_data
|
||||||
|
|
||||||
if isinstance(cc_instance, Component):
|
if isinstance(cc_instance, Component):
|
||||||
await cc_instance.run_and_validate_update_outputs(
|
await cc_instance.run_and_validate_update_outputs(
|
||||||
frontend_node=component_node,
|
frontend_node=component_node,
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +1,86 @@
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"animated": false,
|
||||||
|
"className": "",
|
||||||
|
"data": {
|
||||||
|
"sourceHandle": {
|
||||||
|
"dataType": "Agent",
|
||||||
|
"id": "Agent-LDhCf",
|
||||||
|
"name": "response",
|
||||||
|
"output_types": [
|
||||||
|
"Message"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"targetHandle": {
|
||||||
|
"fieldName": "input_value",
|
||||||
|
"id": "ChatOutput-YQ7Vi",
|
||||||
|
"inputTypes": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
|
"type": "str"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": "reactflow__edge-Agent-LDhCf{œdataTypeœ:œAgentœ,œidœ:œAgent-LDhCfœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-YQ7Vi{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-YQ7Viœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||||
|
"source": "Agent-LDhCf",
|
||||||
|
"sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-LDhCfœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}",
|
||||||
|
"target": "ChatOutput-YQ7Vi",
|
||||||
|
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-YQ7Viœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"animated": false,
|
||||||
|
"className": "",
|
||||||
|
"data": {
|
||||||
|
"sourceHandle": {
|
||||||
|
"dataType": "Prompt",
|
||||||
|
"id": "Prompt-Pe4nO",
|
||||||
|
"name": "prompt",
|
||||||
|
"output_types": [
|
||||||
|
"Message"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"targetHandle": {
|
||||||
|
"fieldName": "input_value",
|
||||||
|
"id": "Agent-LDhCf",
|
||||||
|
"inputTypes": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
|
"type": "str"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": "reactflow__edge-Prompt-Pe4nO{œdataTypeœ:œPromptœ,œidœ:œPrompt-Pe4nOœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-LDhCf{œfieldNameœ:œinput_valueœ,œidœ:œAgent-LDhCfœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||||
|
"source": "Prompt-Pe4nO",
|
||||||
|
"sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-Pe4nOœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}",
|
||||||
|
"target": "Agent-LDhCf",
|
||||||
|
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-LDhCfœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"sourceHandle": {
|
||||||
|
"dataType": "CalculatorComponent",
|
||||||
|
"id": "CalculatorComponent-unDLj",
|
||||||
|
"name": "component_as_tool",
|
||||||
|
"output_types": [
|
||||||
|
"Tool"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"targetHandle": {
|
||||||
|
"fieldName": "tools",
|
||||||
|
"id": "Agent-LDhCf",
|
||||||
|
"inputTypes": [
|
||||||
|
"Tool"
|
||||||
|
],
|
||||||
|
"type": "other"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"id": "xy-edge__CalculatorComponent-unDLj{œdataTypeœ:œCalculatorComponentœ,œidœ:œCalculatorComponent-unDLjœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-LDhCf{œfieldNameœ:œtoolsœ,œidœ:œAgent-LDhCfœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}",
|
||||||
|
"source": "CalculatorComponent-unDLj",
|
||||||
|
"sourceHandle": "{œdataTypeœ: œCalculatorComponentœ, œidœ: œCalculatorComponent-unDLjœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}",
|
||||||
|
"target": "Agent-LDhCf",
|
||||||
|
"targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-LDhCfœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}"
|
||||||
|
}
|
||||||
|
],
|
||||||
"nodes": [
|
"nodes": [
|
||||||
{
|
{
|
||||||
"data": {
|
"data": {
|
||||||
|
|
@ -7,7 +88,9 @@
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"id": "Prompt-Pe4nO",
|
"id": "Prompt-Pe4nO",
|
||||||
"node": {
|
"node": {
|
||||||
"base_classes": ["Message"],
|
"base_classes": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"beta": false,
|
"beta": false,
|
||||||
"conditional_paths": [],
|
"conditional_paths": [],
|
||||||
"custom_fields": {
|
"custom_fields": {
|
||||||
|
|
@ -23,7 +106,9 @@
|
||||||
"display_name": "Prompt",
|
"display_name": "Prompt",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"edited": false,
|
"edited": false,
|
||||||
"field_order": ["template"],
|
"field_order": [
|
||||||
|
"template"
|
||||||
|
],
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"icon": "prompts",
|
"icon": "prompts",
|
||||||
"legacy": false,
|
"legacy": false,
|
||||||
|
|
@ -37,7 +122,9 @@
|
||||||
"method": "build_prompt",
|
"method": "build_prompt",
|
||||||
"name": "prompt",
|
"name": "prompt",
|
||||||
"selected": "Message",
|
"selected": "Message",
|
||||||
"types": ["Message"],
|
"types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"value": "__UNDEFINED__"
|
"value": "__UNDEFINED__"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -70,7 +157,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"info": "",
|
"info": "",
|
||||||
"input_types": ["Message", "Text"],
|
"input_types": [
|
||||||
|
"Message",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
|
|
@ -90,7 +180,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"info": "",
|
"info": "",
|
||||||
"input_types": ["Message", "Text"],
|
"input_types": [
|
||||||
|
"Message",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
|
|
@ -110,7 +203,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"info": "",
|
"info": "",
|
||||||
"input_types": ["Message", "Text"],
|
"input_types": [
|
||||||
|
"Message",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
|
|
@ -130,7 +226,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"info": "",
|
"info": "",
|
||||||
"input_types": ["Message", "Text"],
|
"input_types": [
|
||||||
|
"Message",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
|
|
@ -150,7 +249,10 @@
|
||||||
"fileTypes": [],
|
"fileTypes": [],
|
||||||
"file_path": "",
|
"file_path": "",
|
||||||
"info": "",
|
"info": "",
|
||||||
"input_types": ["Message", "Text"],
|
"input_types": [
|
||||||
|
"Message",
|
||||||
|
"Text"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
|
|
@ -186,7 +288,9 @@
|
||||||
"display_name": "Tool Placeholder",
|
"display_name": "Tool Placeholder",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "A placeholder input for tool mode.",
|
"info": "A placeholder input for tool mode.",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"name": "tool_placeholder",
|
"name": "tool_placeholder",
|
||||||
|
|
@ -230,7 +334,9 @@
|
||||||
"display_name": "Chat Output",
|
"display_name": "Chat Output",
|
||||||
"id": "ChatOutput-YQ7Vi",
|
"id": "ChatOutput-YQ7Vi",
|
||||||
"node": {
|
"node": {
|
||||||
"base_classes": ["Message"],
|
"base_classes": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"beta": false,
|
"beta": false,
|
||||||
"conditional_paths": [],
|
"conditional_paths": [],
|
||||||
"custom_fields": {},
|
"custom_fields": {},
|
||||||
|
|
@ -262,7 +368,9 @@
|
||||||
"method": "message_response",
|
"method": "message_response",
|
||||||
"name": "message",
|
"name": "message",
|
||||||
"selected": "Message",
|
"selected": "Message",
|
||||||
"types": ["Message"],
|
"types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"value": "__UNDEFINED__"
|
"value": "__UNDEFINED__"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -275,7 +383,9 @@
|
||||||
"display_name": "Background Color",
|
"display_name": "Background Color",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "The background color of the icon.",
|
"info": "The background color of the icon.",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"name": "background_color",
|
"name": "background_color",
|
||||||
|
|
@ -295,7 +405,9 @@
|
||||||
"display_name": "Icon",
|
"display_name": "Icon",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "The icon of the message.",
|
"info": "The icon of the message.",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"name": "chat_icon",
|
"name": "chat_icon",
|
||||||
|
|
@ -333,7 +445,9 @@
|
||||||
"display_name": "Data Template",
|
"display_name": "Data Template",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
"info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"name": "data_template",
|
"name": "data_template",
|
||||||
|
|
@ -353,7 +467,9 @@
|
||||||
"display_name": "Text",
|
"display_name": "Text",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Message to be passed as output.",
|
"info": "Message to be passed as output.",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
|
|
@ -374,7 +490,10 @@
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Type of sender.",
|
"info": "Type of sender.",
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"options": ["Machine", "User"],
|
"options": [
|
||||||
|
"Machine",
|
||||||
|
"User"
|
||||||
|
],
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"required": false,
|
"required": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
|
|
@ -390,7 +509,9 @@
|
||||||
"display_name": "Sender Name",
|
"display_name": "Sender Name",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Name of the sender.",
|
"info": "Name of the sender.",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"name": "sender_name",
|
"name": "sender_name",
|
||||||
|
|
@ -410,7 +531,9 @@
|
||||||
"display_name": "Session ID",
|
"display_name": "Session ID",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"name": "session_id",
|
"name": "session_id",
|
||||||
|
|
@ -446,7 +569,9 @@
|
||||||
"display_name": "Text Color",
|
"display_name": "Text Color",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "The text color of the name",
|
"info": "The text color of the name",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"name": "text_color",
|
"name": "text_color",
|
||||||
|
|
@ -525,7 +650,9 @@
|
||||||
"display_name": "Agent",
|
"display_name": "Agent",
|
||||||
"id": "Agent-LDhCf",
|
"id": "Agent-LDhCf",
|
||||||
"node": {
|
"node": {
|
||||||
"base_classes": ["Message"],
|
"base_classes": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"beta": false,
|
"beta": false,
|
||||||
"conditional_paths": [],
|
"conditional_paths": [],
|
||||||
"custom_fields": {},
|
"custom_fields": {},
|
||||||
|
|
@ -574,7 +701,9 @@
|
||||||
"method": "message_response",
|
"method": "message_response",
|
||||||
"name": "response",
|
"name": "response",
|
||||||
"selected": "Message",
|
"selected": "Message",
|
||||||
"types": ["Message"],
|
"types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"value": "__UNDEFINED__"
|
"value": "__UNDEFINED__"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -603,7 +732,9 @@
|
||||||
"display_name": "Agent Description [Deprecated]",
|
"display_name": "Agent Description [Deprecated]",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
"info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically. This feature is deprecated and will be removed in future versions.",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
|
|
@ -652,7 +783,9 @@
|
||||||
"display_name": "OpenAI API Key",
|
"display_name": "OpenAI API Key",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"name": "api_key",
|
"name": "api_key",
|
||||||
"password": true,
|
"password": true,
|
||||||
|
|
@ -703,7 +836,9 @@
|
||||||
"display_name": "Input",
|
"display_name": "Input",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "The input provided by the user for the agent to process.",
|
"info": "The input provided by the user for the agent to process.",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"name": "input_value",
|
"name": "input_value",
|
||||||
|
|
@ -777,7 +912,9 @@
|
||||||
"display_name": "External Memory",
|
"display_name": "External Memory",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
"info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
|
||||||
"input_types": ["Memory"],
|
"input_types": [
|
||||||
|
"Memory"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"name": "memory",
|
"name": "memory",
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
|
|
@ -871,7 +1008,10 @@
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Order of the messages.",
|
"info": "Order of the messages.",
|
||||||
"name": "order",
|
"name": "order",
|
||||||
"options": ["Ascending", "Descending"],
|
"options": [
|
||||||
|
"Ascending",
|
||||||
|
"Descending"
|
||||||
|
],
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"required": false,
|
"required": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
|
|
@ -905,7 +1045,11 @@
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Filter by sender type.",
|
"info": "Filter by sender type.",
|
||||||
"name": "sender",
|
"name": "sender",
|
||||||
"options": ["Machine", "User", "Machine and User"],
|
"options": [
|
||||||
|
"Machine",
|
||||||
|
"User",
|
||||||
|
"Machine and User"
|
||||||
|
],
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"required": false,
|
"required": false,
|
||||||
"show": true,
|
"show": true,
|
||||||
|
|
@ -921,7 +1065,9 @@
|
||||||
"display_name": "Sender Name",
|
"display_name": "Sender Name",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "Filter by sender name.",
|
"info": "Filter by sender name.",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"name": "sender_name",
|
"name": "sender_name",
|
||||||
|
|
@ -941,7 +1087,9 @@
|
||||||
"display_name": "Session ID",
|
"display_name": "Session ID",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
"info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"name": "session_id",
|
"name": "session_id",
|
||||||
|
|
@ -961,7 +1109,9 @@
|
||||||
"display_name": "Agent Instructions",
|
"display_name": "Agent Instructions",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
"info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
|
|
@ -998,7 +1148,9 @@
|
||||||
"display_name": "Template",
|
"display_name": "Template",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
"info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
"multiline": true,
|
"multiline": true,
|
||||||
|
|
@ -1019,7 +1171,9 @@
|
||||||
"display_name": "Tools",
|
"display_name": "Tools",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "These are the tools that the agent can use to help with tasks.",
|
"info": "These are the tools that the agent can use to help with tasks.",
|
||||||
"input_types": ["Tool"],
|
"input_types": [
|
||||||
|
"Tool"
|
||||||
|
],
|
||||||
"list": true,
|
"list": true,
|
||||||
"name": "tools",
|
"name": "tools",
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
|
|
@ -1074,7 +1228,9 @@
|
||||||
"data": {
|
"data": {
|
||||||
"id": "CalculatorComponent-unDLj",
|
"id": "CalculatorComponent-unDLj",
|
||||||
"node": {
|
"node": {
|
||||||
"base_classes": ["Data"],
|
"base_classes": [
|
||||||
|
"Data"
|
||||||
|
],
|
||||||
"beta": false,
|
"beta": false,
|
||||||
"category": "tools",
|
"category": "tools",
|
||||||
"conditional_paths": [],
|
"conditional_paths": [],
|
||||||
|
|
@ -1083,7 +1239,9 @@
|
||||||
"display_name": "Calculator",
|
"display_name": "Calculator",
|
||||||
"documentation": "",
|
"documentation": "",
|
||||||
"edited": false,
|
"edited": false,
|
||||||
"field_order": ["expression"],
|
"field_order": [
|
||||||
|
"expression"
|
||||||
|
],
|
||||||
"frozen": false,
|
"frozen": false,
|
||||||
"icon": "calculator",
|
"icon": "calculator",
|
||||||
"key": "CalculatorComponent",
|
"key": "CalculatorComponent",
|
||||||
|
|
@ -1093,15 +1251,17 @@
|
||||||
"output_types": [],
|
"output_types": [],
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"types": ["Tool"],
|
|
||||||
"selected": "Tool",
|
|
||||||
"name": "component_as_tool",
|
|
||||||
"hidden": null,
|
|
||||||
"display_name": "Toolset",
|
|
||||||
"method": "to_toolkit",
|
|
||||||
"value": "__UNDEFINED__",
|
|
||||||
"cache": true,
|
"cache": true,
|
||||||
"required_inputs": null
|
"display_name": "Toolset",
|
||||||
|
"hidden": null,
|
||||||
|
"method": "to_toolkit",
|
||||||
|
"name": "component_as_tool",
|
||||||
|
"required_inputs": null,
|
||||||
|
"selected": "Tool",
|
||||||
|
"types": [
|
||||||
|
"Tool"
|
||||||
|
],
|
||||||
|
"value": "__UNDEFINED__"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"pinned": false,
|
"pinned": false,
|
||||||
|
|
@ -1132,7 +1292,9 @@
|
||||||
"display_name": "Expression",
|
"display_name": "Expression",
|
||||||
"dynamic": false,
|
"dynamic": false,
|
||||||
"info": "The arithmetic expression to evaluate (e.g., '4*4*(33/22)+12-20').",
|
"info": "The arithmetic expression to evaluate (e.g., '4*4*(33/22)+12-20').",
|
||||||
"input_types": ["Message"],
|
"input_types": [
|
||||||
|
"Message"
|
||||||
|
],
|
||||||
"list": false,
|
"list": false,
|
||||||
"list_add_label": "Add More",
|
"list_add_label": "Add More",
|
||||||
"load_from_db": false,
|
"load_from_db": false,
|
||||||
|
|
@ -1148,84 +1310,89 @@
|
||||||
"value": ""
|
"value": ""
|
||||||
},
|
},
|
||||||
"tools_metadata": {
|
"tools_metadata": {
|
||||||
"tool_mode": false,
|
"_input_type": "TableInput",
|
||||||
|
"advanced": false,
|
||||||
|
"display_name": "Edit tools",
|
||||||
|
"dynamic": false,
|
||||||
|
"info": "",
|
||||||
"is_list": true,
|
"is_list": true,
|
||||||
"list_add_label": "Add More",
|
"list_add_label": "Add More",
|
||||||
"table_schema": {
|
"name": "tools_metadata",
|
||||||
"columns": [
|
"placeholder": "",
|
||||||
{
|
"real_time_refresh": true,
|
||||||
"name": "name",
|
"required": false,
|
||||||
"display_name": "Tool Name",
|
"show": true,
|
||||||
"sortable": false,
|
|
||||||
"filterable": false,
|
|
||||||
"type": "text",
|
|
||||||
"description": "Specify the name of the tool.",
|
|
||||||
"disable_edit": false,
|
|
||||||
"edit_mode": "inline",
|
|
||||||
"formatter": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "description",
|
|
||||||
"display_name": "Tool Description",
|
|
||||||
"sortable": false,
|
|
||||||
"filterable": false,
|
|
||||||
"type": "text",
|
|
||||||
"description": "Describe the purpose of the tool.",
|
|
||||||
"disable_edit": false,
|
|
||||||
"edit_mode": "popover",
|
|
||||||
"formatter": "text"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "tags",
|
|
||||||
"display_name": "Tool Identifiers",
|
|
||||||
"sortable": false,
|
|
||||||
"filterable": false,
|
|
||||||
"type": "text",
|
|
||||||
"description": "The default identifiers for the tools and cannot be changed.",
|
|
||||||
"disable_edit": true,
|
|
||||||
"edit_mode": "inline",
|
|
||||||
"formatter": "text"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"trigger_text": "",
|
|
||||||
"trigger_icon": "Hammer",
|
|
||||||
"table_icon": "Hammer",
|
"table_icon": "Hammer",
|
||||||
"table_options": {
|
"table_options": {
|
||||||
"block_add": true,
|
"block_add": true,
|
||||||
"block_delete": true,
|
"block_delete": true,
|
||||||
"block_edit": true,
|
"block_edit": true,
|
||||||
"block_sort": true,
|
|
||||||
"block_filter": true,
|
"block_filter": true,
|
||||||
"block_hide": true,
|
"block_hide": true,
|
||||||
"block_select": true,
|
"block_select": true,
|
||||||
"hide_options": true,
|
"block_sort": true,
|
||||||
|
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||||
"field_parsers": {
|
"field_parsers": {
|
||||||
"name": ["snake_case", "no_blank"],
|
"commands": "commands",
|
||||||
"commands": "commands"
|
"name": [
|
||||||
|
"snake_case",
|
||||||
|
"no_blank"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"description": "Modify tool names and descriptions to help agents understand when to use each tool."
|
"hide_options": true
|
||||||
},
|
},
|
||||||
|
"table_schema": {
|
||||||
|
"columns": [
|
||||||
|
{
|
||||||
|
"description": "Specify the name of the tool.",
|
||||||
|
"disable_edit": false,
|
||||||
|
"display_name": "Tool Name",
|
||||||
|
"edit_mode": "inline",
|
||||||
|
"filterable": false,
|
||||||
|
"formatter": "text",
|
||||||
|
"name": "name",
|
||||||
|
"sortable": false,
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Describe the purpose of the tool.",
|
||||||
|
"disable_edit": false,
|
||||||
|
"display_name": "Tool Description",
|
||||||
|
"edit_mode": "popover",
|
||||||
|
"filterable": false,
|
||||||
|
"formatter": "text",
|
||||||
|
"name": "description",
|
||||||
|
"sortable": false,
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "The default identifiers for the tools and cannot be changed.",
|
||||||
|
"disable_edit": true,
|
||||||
|
"display_name": "Tool Identifiers",
|
||||||
|
"edit_mode": "inline",
|
||||||
|
"filterable": false,
|
||||||
|
"formatter": "text",
|
||||||
|
"name": "tags",
|
||||||
|
"sortable": false,
|
||||||
|
"type": "text"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"title_case": false,
|
||||||
|
"tool_mode": false,
|
||||||
"trace_as_metadata": true,
|
"trace_as_metadata": true,
|
||||||
"required": false,
|
"trigger_icon": "Hammer",
|
||||||
"placeholder": "",
|
"trigger_text": "",
|
||||||
"show": true,
|
"type": "table",
|
||||||
"name": "tools_metadata",
|
|
||||||
"value": [
|
"value": [
|
||||||
{
|
{
|
||||||
"description": "evaluate_expression() - Perform basic arithmetic operations on a given expression.",
|
"description": "evaluate_expression() - Perform basic arithmetic operations on a given expression.",
|
||||||
"name": "None-evaluate_expression",
|
"name": "None-evaluate_expression",
|
||||||
"tags": ["None-evaluate_expression"]
|
"tags": [
|
||||||
|
"None-evaluate_expression"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"display_name": "Edit tools",
|
|
||||||
"advanced": false,
|
|
||||||
"dynamic": false,
|
|
||||||
"info": "",
|
|
||||||
"real_time_refresh": true,
|
|
||||||
"title_case": false,
|
|
||||||
"type": "table",
|
|
||||||
"_input_type": "TableInput"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tool_mode": true
|
"tool_mode": true
|
||||||
|
|
@ -1247,75 +1414,6 @@
|
||||||
"type": "genericNode"
|
"type": "genericNode"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"edges": [
|
|
||||||
{
|
|
||||||
"animated": false,
|
|
||||||
"className": "",
|
|
||||||
"data": {
|
|
||||||
"sourceHandle": {
|
|
||||||
"dataType": "Agent",
|
|
||||||
"id": "Agent-LDhCf",
|
|
||||||
"name": "response",
|
|
||||||
"output_types": ["Message"]
|
|
||||||
},
|
|
||||||
"targetHandle": {
|
|
||||||
"fieldName": "input_value",
|
|
||||||
"id": "ChatOutput-YQ7Vi",
|
|
||||||
"inputTypes": ["Message"],
|
|
||||||
"type": "str"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": "reactflow__edge-Agent-LDhCf{œdataTypeœ:œAgentœ,œidœ:œAgent-LDhCfœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-YQ7Vi{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-YQ7Viœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
|
||||||
"source": "Agent-LDhCf",
|
|
||||||
"sourceHandle": "{œdataTypeœ:œAgentœ,œidœ:œAgent-LDhCfœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}",
|
|
||||||
"target": "ChatOutput-YQ7Vi",
|
|
||||||
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-YQ7Viœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"animated": false,
|
|
||||||
"className": "",
|
|
||||||
"data": {
|
|
||||||
"sourceHandle": {
|
|
||||||
"dataType": "Prompt",
|
|
||||||
"id": "Prompt-Pe4nO",
|
|
||||||
"name": "prompt",
|
|
||||||
"output_types": ["Message"]
|
|
||||||
},
|
|
||||||
"targetHandle": {
|
|
||||||
"fieldName": "input_value",
|
|
||||||
"id": "Agent-LDhCf",
|
|
||||||
"inputTypes": ["Message"],
|
|
||||||
"type": "str"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": "reactflow__edge-Prompt-Pe4nO{œdataTypeœ:œPromptœ,œidœ:œPrompt-Pe4nOœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-LDhCf{œfieldNameœ:œinput_valueœ,œidœ:œAgent-LDhCfœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
|
||||||
"source": "Prompt-Pe4nO",
|
|
||||||
"sourceHandle": "{œdataTypeœ:œPromptœ,œidœ:œPrompt-Pe4nOœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}",
|
|
||||||
"target": "Agent-LDhCf",
|
|
||||||
"targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œAgent-LDhCfœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"source": "CalculatorComponent-unDLj",
|
|
||||||
"sourceHandle": "{œdataTypeœ:œCalculatorComponentœ,œidœ:œCalculatorComponent-unDLjœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}",
|
|
||||||
"target": "Agent-LDhCf",
|
|
||||||
"targetHandle": "{œfieldNameœ:œtoolsœ,œidœ:œAgent-LDhCfœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}",
|
|
||||||
"data": {
|
|
||||||
"targetHandle": {
|
|
||||||
"fieldName": "tools",
|
|
||||||
"id": "Agent-LDhCf",
|
|
||||||
"inputTypes": ["Tool"],
|
|
||||||
"type": "other"
|
|
||||||
},
|
|
||||||
"sourceHandle": {
|
|
||||||
"dataType": "CalculatorComponent",
|
|
||||||
"id": "CalculatorComponent-unDLj",
|
|
||||||
"name": "component_as_tool",
|
|
||||||
"output_types": ["Tool"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"id": "xy-edge__CalculatorComponent-unDLj{œdataTypeœ:œCalculatorComponentœ,œidœ:œCalculatorComponent-unDLjœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-LDhCf{œfieldNameœ:œtoolsœ,œidœ:œAgent-LDhCfœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"viewport": {
|
"viewport": {
|
||||||
"x": -412.6248764419154,
|
"x": -412.6248764419154,
|
||||||
"y": 239.5139629945674,
|
"y": 239.5139629945674,
|
||||||
|
|
@ -1330,5 +1428,8 @@
|
||||||
"is_component": false,
|
"is_component": false,
|
||||||
"last_tested_version": "1.1.1",
|
"last_tested_version": "1.1.1",
|
||||||
"name": "SaaS Pricing",
|
"name": "SaaS Pricing",
|
||||||
"tags": ["agents", "assistants"]
|
"tags": [
|
||||||
|
"agents",
|
||||||
|
"assistants"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue