fix: update templates containing Agent and Tool components (#7860)
* refactor: Update Simple Agent configuration and enhance tool integration - Changed source and target handles to improve data flow between components. - Updated input types for better compatibility with new data structures. - Enhanced tool metadata and descriptions for clarity. - Adjusted layout dimensions and properties for improved UI consistency. - Updated agent and tool identifiers to reflect recent changes in the system. * refactor: Update Invoice Summarizer project configuration and component identifiers - Changed component IDs and source/target handles for improved data flow. - Updated tool and agent identifiers to align with recent system changes. - Adjusted layout properties and descriptions for better clarity and consistency. - Enhanced metadata for tools and components to facilitate better integration. * refactor: Update Pokédex Agent configuration and component identifiers - Changed component IDs and source/target handles to enhance data flow. - Updated input types and tool identifiers for improved compatibility with recent system changes. - Enhanced layout properties and descriptions for better clarity and consistency. - Adjusted metadata for tools and components to facilitate better integration. * refactor: Update Search Agent configuration for improved compatibility - Removed input types for the OpenAI API Key to streamline configuration. - Added new model options including "gpt-4.1", "gpt-4.1-mini", and "gpt-4.1-nano" for enhanced flexibility. - Updated default model value to "gpt-4.1" for better alignment with current capabilities. * refactor: Update Financial Agent configuration and component identifiers - Changed component IDs and source/target handles to enhance data flow. - Updated tool and agent identifiers for improved compatibility with recent system changes. - Adjusted layout properties and descriptions for better clarity and consistency. - Enhanced metadata for tools and components to facilitate better integration. * refactor: Update Gmail Agent configuration for improved model options - Removed input types for the OpenAI API Key to streamline the configuration. - Added new model options including "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", and "o1" for enhanced flexibility. - Updated default model value to "gpt-4.1" for better alignment with current capabilities. * refactor: Update Invoice Summarizer project configuration for improved clarity - Standardized formatting of source and target handles for consistency. - Adjusted score representation for better readability. - Removed unnecessary hidden properties to streamline configuration. - Enhanced metadata for components to facilitate better integration. * refactor: Standardize source and target handles in agent configurations - Updated formatting of source and target handles in both Pokédex and Simple Agent configurations for improved consistency. - Removed unnecessary hidden properties to streamline the configuration. - Enhanced metadata for components to facilitate better integration and clarity. * refactor: Streamline OpenAI API Key configuration and enhance model options - Removed input types for the OpenAI API Key to simplify the configuration. - Added new model options including "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", and "o1" for increased flexibility. - Updated default model value to "gpt-4.1" for better alignment with current capabilities. * refactor: Simplify OpenAI API Key configuration and expand model options - Removed input types for the OpenAI API Key to streamline the configuration. - Added new model options "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", and "o1" for enhanced flexibility. - Updated default model value to "gpt-4.1" for better alignment with current capabilities. * refactor: Update YouTube Analysis project configuration for improved model options - Removed input types for the OpenAI API Key to simplify the configuration. - Added new model options "gpt-4.1", "gpt-4.1-mini", "gpt-4.1-nano", and "o1" for enhanced flexibility. - Updated default model value to "gpt-4.1-mini" for better alignment with current capabilities. * fix: update tools in Travel Planning Agents * update mutateTemplate to be debounced by nodeId * update fetch data on mount to fetch node data if its tool mode * Update mutateTemplate instances to contain nodeId * update starter projects to use gpt-4.1-mini model * fix: update test expectation for Portfolio Website Code Generator --------- Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com> Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
This commit is contained in:
parent
2fa6d868a1
commit
28445d0a70
40 changed files with 2779 additions and 2985 deletions
|
|
@ -1486,7 +1486,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
@ -1870,7 +1870,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
@ -2254,7 +2254,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
|
|
@ -1106,7 +1106,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
|
|
@ -989,7 +989,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
|
|
@ -1456,7 +1456,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -355,7 +355,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
|
|
@ -238,9 +238,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": [],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -438,11 +436,15 @@
|
|||
"options": [
|
||||
"gpt-4o-mini",
|
||||
"gpt-4o",
|
||||
"gpt-4.1",
|
||||
"gpt-4.1-mini",
|
||||
"gpt-4.1-nano",
|
||||
"gpt-4.5-preview",
|
||||
"gpt-4-turbo",
|
||||
"gpt-4-turbo-preview",
|
||||
"gpt-4",
|
||||
"gpt-3.5-turbo"
|
||||
"gpt-3.5-turbo",
|
||||
"o1"
|
||||
],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
|
|
@ -453,7 +455,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o"
|
||||
"value": "gpt-4.1"
|
||||
},
|
||||
"n_messages": {
|
||||
"_input_type": "IntInput",
|
||||
|
|
|
|||
|
|
@ -1090,7 +1090,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
|
|
@ -1182,7 +1182,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
|
|
@ -1662,7 +1662,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"n_messages": {
|
||||
"_input_type": "IntInput",
|
||||
|
|
@ -2885,7 +2885,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
@ -3269,7 +3269,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "Prompt",
|
||||
"id": "Prompt-jqHUa",
|
||||
"id": "Prompt-0aGkQ",
|
||||
"name": "prompt",
|
||||
"output_types": [
|
||||
"Message"
|
||||
|
|
@ -15,19 +15,19 @@
|
|||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "system_prompt",
|
||||
"id": "Agent-YDpm0",
|
||||
"id": "Agent-DBNrp",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
"id": "reactflow__edge-Prompt-jqHUa{œdataTypeœ:œPromptœ,œidœ:œPrompt-jqHUaœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-YDpm0{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-YDpm0œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"id": "reactflow__edge-Prompt-0aGkQ{œdataTypeœ:œPromptœ,œidœ:œPrompt-0aGkQœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-DBNrp{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-DBNrpœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"selected": false,
|
||||
"source": "Prompt-jqHUa",
|
||||
"sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-jqHUaœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "Agent-YDpm0",
|
||||
"targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-YDpm0œ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
"source": "Prompt-0aGkQ",
|
||||
"sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-0aGkQœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "Agent-DBNrp",
|
||||
"targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-DBNrpœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
},
|
||||
{
|
||||
"animated": false,
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "needle",
|
||||
"id": "needle-jWdIc",
|
||||
"id": "needle-5GYmd",
|
||||
"name": "component_as_tool",
|
||||
"output_types": [
|
||||
"Tool"
|
||||
|
|
@ -43,19 +43,19 @@
|
|||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "tools",
|
||||
"id": "Agent-YDpm0",
|
||||
"id": "Agent-DBNrp",
|
||||
"inputTypes": [
|
||||
"Tool"
|
||||
],
|
||||
"type": "other"
|
||||
}
|
||||
},
|
||||
"id": "reactflow__edge-needle-jWdIc{œdataTypeœ:œneedleœ,œidœ:œneedle-jWdIcœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-YDpm0{œfieldNameœ:œtoolsœ,œidœ:œAgent-YDpm0œ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}",
|
||||
"id": "reactflow__edge-needle-5GYmd{œdataTypeœ:œneedleœ,œidœ:œneedle-5GYmdœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-DBNrp{œfieldNameœ:œtoolsœ,œidœ:œAgent-DBNrpœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}",
|
||||
"selected": false,
|
||||
"source": "needle-jWdIc",
|
||||
"sourceHandle": "{œdataTypeœ: œneedleœ, œidœ: œneedle-jWdIcœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}",
|
||||
"target": "Agent-YDpm0",
|
||||
"targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-YDpm0œ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}"
|
||||
"source": "needle-5GYmd",
|
||||
"sourceHandle": "{œdataTypeœ: œneedleœ, œidœ: œneedle-5GYmdœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}",
|
||||
"target": "Agent-DBNrp",
|
||||
"targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-DBNrpœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}"
|
||||
},
|
||||
{
|
||||
"animated": false,
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "ChatInput",
|
||||
"id": "ChatInput-r9vuH",
|
||||
"id": "ChatInput-cKEM6",
|
||||
"name": "message",
|
||||
"output_types": [
|
||||
"Message"
|
||||
|
|
@ -71,19 +71,19 @@
|
|||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "Agent-YDpm0",
|
||||
"id": "Agent-DBNrp",
|
||||
"inputTypes": [
|
||||
"Message"
|
||||
],
|
||||
"type": "str"
|
||||
}
|
||||
},
|
||||
"id": "reactflow__edge-ChatInput-r9vuH{œdataTypeœ:œChatInputœ,œidœ:œChatInput-r9vuHœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-YDpm0{œfieldNameœ:œinput_valueœ,œidœ:œAgent-YDpm0œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"id": "reactflow__edge-ChatInput-cKEM6{œdataTypeœ:œChatInputœ,œidœ:œChatInput-cKEM6œ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-DBNrp{œfieldNameœ:œinput_valueœ,œidœ:œAgent-DBNrpœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
|
||||
"selected": false,
|
||||
"source": "ChatInput-r9vuH",
|
||||
"sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-r9vuHœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "Agent-YDpm0",
|
||||
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-YDpm0œ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
"source": "ChatInput-cKEM6",
|
||||
"sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-cKEM6œ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "Agent-DBNrp",
|
||||
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-DBNrpœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
|
||||
},
|
||||
{
|
||||
"animated": false,
|
||||
|
|
@ -91,7 +91,7 @@
|
|||
"data": {
|
||||
"sourceHandle": {
|
||||
"dataType": "Agent",
|
||||
"id": "Agent-YDpm0",
|
||||
"id": "Agent-DBNrp",
|
||||
"name": "response",
|
||||
"output_types": [
|
||||
"Message"
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
},
|
||||
"targetHandle": {
|
||||
"fieldName": "input_value",
|
||||
"id": "ChatOutput-O7uUo",
|
||||
"id": "ChatOutput-LTYD8",
|
||||
"inputTypes": [
|
||||
"Data",
|
||||
"DataFrame",
|
||||
|
|
@ -108,18 +108,18 @@
|
|||
"type": "str"
|
||||
}
|
||||
},
|
||||
"id": "reactflow__edge-Agent-YDpm0{œdataTypeœ:œAgentœ,œidœ:œAgent-YDpm0œ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-O7uUo{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-O7uUoœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}",
|
||||
"id": "reactflow__edge-Agent-DBNrp{œdataTypeœ:œAgentœ,œidœ:œAgent-DBNrpœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-LTYD8{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-LTYD8œ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}",
|
||||
"selected": false,
|
||||
"source": "Agent-YDpm0",
|
||||
"sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-YDpm0œ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "ChatOutput-O7uUo",
|
||||
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-O7uUoœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}"
|
||||
"source": "Agent-DBNrp",
|
||||
"sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-DBNrpœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}",
|
||||
"target": "ChatOutput-LTYD8",
|
||||
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-LTYD8œ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"data": {
|
||||
"id": "note-gpQ5H",
|
||||
"id": "note-n0kSK",
|
||||
"node": {
|
||||
"description": "# Invoice Summarizer\n\nLeverage the **Needle Search API** and an **Agent** to gather and summarize your invoice data quickly and accurately.\n\n## Prerequisites\n\n* A **Collection** and an **API Key** from your [Needle.ai](https://needle-ai.com) deployment\n* An [OpenAI API key](https://platform.openai.com/)\n\n## Quickstart\n\n1. Load your invoices into your Needle Collection. \n\n2. In the **Needle Search** tool, add your **Needle Collection ID** and **Needle API Key**.\n\n3. In the **Agent** component, add your **OpenAI Key**.\n\n4. Open the **Playground** and query your invoices. The **Agent** component determines the correct query and search size for data retrieval.\n",
|
||||
"display_name": "",
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
},
|
||||
"dragging": false,
|
||||
"height": 632,
|
||||
"id": "note-gpQ5H",
|
||||
"id": "note-n0kSK",
|
||||
"measured": {
|
||||
"height": 632,
|
||||
"width": 583
|
||||
|
|
@ -148,7 +148,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "Prompt-jqHUa",
|
||||
"id": "Prompt-0aGkQ",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
|
|
@ -262,7 +262,7 @@
|
|||
"type": "Prompt"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "Prompt-jqHUa",
|
||||
"id": "Prompt-0aGkQ",
|
||||
"measured": {
|
||||
"height": 330,
|
||||
"width": 320
|
||||
|
|
@ -276,7 +276,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "ChatOutput-O7uUo",
|
||||
"id": "ChatOutput-LTYD8",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
|
|
@ -571,7 +571,7 @@
|
|||
"type": "ChatOutput"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "ChatOutput-O7uUo",
|
||||
"id": "ChatOutput-LTYD8",
|
||||
"measured": {
|
||||
"height": 66,
|
||||
"width": 192
|
||||
|
|
@ -585,7 +585,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "note-owux5",
|
||||
"id": "note-PDspc",
|
||||
"node": {
|
||||
"description": "### 💡 Add your OpenAI API key here 👇",
|
||||
"display_name": "",
|
||||
|
|
@ -597,7 +597,7 @@
|
|||
"type": "note"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "note-owux5",
|
||||
"id": "note-PDspc",
|
||||
"measured": {
|
||||
"height": 324,
|
||||
"width": 324
|
||||
|
|
@ -611,7 +611,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "note-b3LuQ",
|
||||
"id": "note-Qcxtt",
|
||||
"node": {
|
||||
"description": "### 💡 Add your Needle Search API key here 👇",
|
||||
"display_name": "",
|
||||
|
|
@ -624,7 +624,7 @@
|
|||
},
|
||||
"dragging": false,
|
||||
"height": 324,
|
||||
"id": "note-b3LuQ",
|
||||
"id": "note-Qcxtt",
|
||||
"measured": {
|
||||
"height": 324,
|
||||
"width": 401
|
||||
|
|
@ -640,7 +640,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "needle-jWdIc",
|
||||
"id": "needle-5GYmd",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
|
|
@ -738,7 +738,7 @@
|
|||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"load_from_db": true,
|
||||
"load_from_db": false,
|
||||
"name": "needle_api_key",
|
||||
"password": true,
|
||||
"placeholder": "",
|
||||
|
|
@ -746,7 +746,7 @@
|
|||
"show": true,
|
||||
"title_case": false,
|
||||
"type": "str",
|
||||
"value": "NEEDLE_API_KEY"
|
||||
"value": ""
|
||||
},
|
||||
"query": {
|
||||
"_input_type": "MessageTextInput",
|
||||
|
|
@ -772,11 +772,11 @@
|
|||
"value": ""
|
||||
},
|
||||
"tools_metadata": {
|
||||
"_input_type": "TableInput",
|
||||
"_input_type": "ToolsInput",
|
||||
"advanced": false,
|
||||
"display_name": "Edit tools",
|
||||
"display_name": "Actions",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"info": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"is_list": true,
|
||||
"list_add_label": "Add More",
|
||||
"name": "tools_metadata",
|
||||
|
|
@ -784,93 +784,20 @@
|
|||
"real_time_refresh": true,
|
||||
"required": false,
|
||||
"show": true,
|
||||
"table_icon": "Hammer",
|
||||
"table_options": {
|
||||
"block_add": true,
|
||||
"block_delete": true,
|
||||
"block_edit": true,
|
||||
"block_filter": true,
|
||||
"block_hide": true,
|
||||
"block_select": true,
|
||||
"block_sort": true,
|
||||
"description": "Modify tool names and descriptions to help agents understand when to use each tool.",
|
||||
"field_parsers": {
|
||||
"commands": "commands",
|
||||
"name": [
|
||||
"snake_case",
|
||||
"no_blank"
|
||||
]
|
||||
},
|
||||
"hide_options": true
|
||||
},
|
||||
"table_schema": {
|
||||
"columns": [
|
||||
{
|
||||
"default": "None",
|
||||
"description": "Specify the name of the tool.",
|
||||
"disable_edit": false,
|
||||
"display_name": "Tool Name",
|
||||
"edit_mode": "inline",
|
||||
"filterable": false,
|
||||
"formatter": "text",
|
||||
"hidden": false,
|
||||
"name": "name",
|
||||
"sortable": false,
|
||||
"type": "str"
|
||||
},
|
||||
{
|
||||
"default": "None",
|
||||
"description": "Describe the purpose of the tool.",
|
||||
"disable_edit": false,
|
||||
"display_name": "Tool Description",
|
||||
"edit_mode": "popover",
|
||||
"filterable": false,
|
||||
"formatter": "text",
|
||||
"hidden": false,
|
||||
"name": "description",
|
||||
"sortable": false,
|
||||
"type": "str"
|
||||
},
|
||||
{
|
||||
"default": "None",
|
||||
"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",
|
||||
"hidden": true,
|
||||
"name": "tags",
|
||||
"sortable": false,
|
||||
"type": "str"
|
||||
},
|
||||
{
|
||||
"default": true,
|
||||
"description": "Indicates whether the tool is currently active. Set to True to activate this tool.",
|
||||
"disable_edit": false,
|
||||
"display_name": "Enable",
|
||||
"edit_mode": "popover",
|
||||
"filterable": true,
|
||||
"formatter": "boolean",
|
||||
"hidden": false,
|
||||
"name": "status",
|
||||
"sortable": true,
|
||||
"type": "boolean"
|
||||
}
|
||||
]
|
||||
},
|
||||
"title_case": false,
|
||||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"trigger_icon": "Hammer",
|
||||
"trigger_text": "",
|
||||
"type": "table",
|
||||
"type": "tools",
|
||||
"value": [
|
||||
{
|
||||
"description": "run(collection_id: Message, needle_api_key: Message, query: Message, top_k: FieldTypes.INTEGER) - A retriever that uses the Needle API to search collections.",
|
||||
"name": "needle-run",
|
||||
"args": {},
|
||||
"description": "needle. run(needle. collection_id: Message, needle. needle_api_key: FieldTypes.TEXT, needle. query: Message, needle. top_k: FieldTypes.INTEGER) - A retriever that uses the Needle API to search collections.",
|
||||
"display_description": "needle. run(needle. collection_id: Message, needle. needle_api_key: FieldTypes.TEXT, needle. query: Message, needle. top_k: FieldTypes.INTEGER) - A retriever that uses the Needle API to search collections.",
|
||||
"display_name": "run",
|
||||
"name": "run",
|
||||
"status": true,
|
||||
"tags": [
|
||||
"needle-run"
|
||||
"run"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -899,9 +826,9 @@
|
|||
"showNode": true,
|
||||
"type": "needle"
|
||||
},
|
||||
"id": "needle-jWdIc",
|
||||
"id": "needle-5GYmd",
|
||||
"measured": {
|
||||
"height": 582,
|
||||
"height": 495,
|
||||
"width": 320
|
||||
},
|
||||
"position": {
|
||||
|
|
@ -913,7 +840,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "ChatInput-r9vuH",
|
||||
"id": "ChatInput-cKEM6",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
|
|
@ -1210,7 +1137,7 @@
|
|||
"type": "ChatInput"
|
||||
},
|
||||
"dragging": false,
|
||||
"id": "ChatInput-r9vuH",
|
||||
"id": "ChatInput-cKEM6",
|
||||
"measured": {
|
||||
"height": 230,
|
||||
"width": 320
|
||||
|
|
@ -1224,7 +1151,7 @@
|
|||
},
|
||||
{
|
||||
"data": {
|
||||
"id": "Agent-YDpm0",
|
||||
"id": "Agent-DBNrp",
|
||||
"node": {
|
||||
"base_classes": [
|
||||
"Message"
|
||||
|
|
@ -1297,6 +1224,7 @@
|
|||
"display_name": "Current Date",
|
||||
"dynamic": false,
|
||||
"info": "If true, will add a tool to the agent that returns the current date.",
|
||||
"input_types": [],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "add_current_date_tool",
|
||||
|
|
@ -1400,9 +1328,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": [],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1437,6 +1363,7 @@
|
|||
"display_name": "Handle Parse Errors",
|
||||
"dynamic": false,
|
||||
"info": "Should the Agent fix errors when reading user input for better processing?",
|
||||
"input_types": [],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "handle_parsing_errors",
|
||||
|
|
@ -1478,6 +1405,7 @@
|
|||
"display_name": "JSON Mode",
|
||||
"dynamic": false,
|
||||
"info": "If True, it will output JSON regardless of passing a schema.",
|
||||
"input_types": [],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "json_mode",
|
||||
|
|
@ -1496,6 +1424,7 @@
|
|||
"display_name": "Max Iterations",
|
||||
"dynamic": false,
|
||||
"info": "The maximum number of attempts the agent can make to complete its task before it stops.",
|
||||
"input_types": [],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "max_iterations",
|
||||
|
|
@ -1514,6 +1443,7 @@
|
|||
"display_name": "Max Retries",
|
||||
"dynamic": false,
|
||||
"info": "The maximum number of retries to make when generating.",
|
||||
"input_types": [],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "max_retries",
|
||||
|
|
@ -1532,6 +1462,7 @@
|
|||
"display_name": "Max Tokens",
|
||||
"dynamic": false,
|
||||
"info": "The maximum number of tokens to generate. Set to 0 for unlimited tokens.",
|
||||
"input_types": [],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "max_tokens",
|
||||
|
|
@ -1576,6 +1507,7 @@
|
|||
"display_name": "Model Kwargs",
|
||||
"dynamic": false,
|
||||
"info": "Additional keyword arguments to pass to the model.",
|
||||
"input_types": [],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "model_kwargs",
|
||||
|
|
@ -1596,15 +1528,20 @@
|
|||
"display_name": "Model Name",
|
||||
"dynamic": false,
|
||||
"info": "To see the model names, first choose a provider. Then, enter your API key and click the refresh button next to the model name.",
|
||||
"input_types": [],
|
||||
"name": "model_name",
|
||||
"options": [
|
||||
"gpt-4o-mini",
|
||||
"gpt-4o",
|
||||
"gpt-4.1",
|
||||
"gpt-4.1-mini",
|
||||
"gpt-4.1-nano",
|
||||
"gpt-4.5-preview",
|
||||
"gpt-4-turbo",
|
||||
"gpt-4-turbo-preview",
|
||||
"gpt-4",
|
||||
"gpt-3.5-turbo"
|
||||
"gpt-3.5-turbo",
|
||||
"o1"
|
||||
],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
|
|
@ -1612,10 +1549,11 @@
|
|||
"required": false,
|
||||
"show": true,
|
||||
"title_case": false,
|
||||
"toggle": false,
|
||||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o"
|
||||
"value": "gpt-4.1"
|
||||
},
|
||||
"n_messages": {
|
||||
"_input_type": "IntInput",
|
||||
|
|
@ -1623,6 +1561,7 @@
|
|||
"display_name": "Number of Messages",
|
||||
"dynamic": false,
|
||||
"info": "Number of messages to retrieve.",
|
||||
"input_types": [],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "n_messages",
|
||||
|
|
@ -1641,6 +1580,7 @@
|
|||
"display_name": "OpenAI API Base",
|
||||
"dynamic": false,
|
||||
"info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1. You can change this to use other APIs like JinaChat, LocalAI and Prem.",
|
||||
"input_types": [],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"load_from_db": false,
|
||||
|
|
@ -1662,6 +1602,7 @@
|
|||
"display_name": "Order",
|
||||
"dynamic": false,
|
||||
"info": "Order of the messages.",
|
||||
"input_types": [],
|
||||
"name": "order",
|
||||
"options": [
|
||||
"Ascending",
|
||||
|
|
@ -1683,6 +1624,7 @@
|
|||
"display_name": "Seed",
|
||||
"dynamic": false,
|
||||
"info": "The seed controls the reproducibility of the job.",
|
||||
"input_types": [],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "seed",
|
||||
|
|
@ -1703,6 +1645,7 @@
|
|||
"display_name": "Sender Type",
|
||||
"dynamic": false,
|
||||
"info": "Filter by sender type.",
|
||||
"input_types": [],
|
||||
"name": "sender",
|
||||
"options": [
|
||||
"Machine",
|
||||
|
|
@ -1796,6 +1739,7 @@
|
|||
"display_name": "Temperature",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [],
|
||||
"max_label": "",
|
||||
"max_label_icon": "",
|
||||
"min_label": "",
|
||||
|
|
@ -1849,6 +1793,7 @@
|
|||
"display_name": "Timeout",
|
||||
"dynamic": false,
|
||||
"info": "The timeout for requests to OpenAI completion API.",
|
||||
"input_types": [],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "timeout",
|
||||
|
|
@ -1887,6 +1832,7 @@
|
|||
"display_name": "Verbose",
|
||||
"dynamic": false,
|
||||
"info": "",
|
||||
"input_types": [],
|
||||
"list": false,
|
||||
"list_add_label": "Add More",
|
||||
"name": "verbose",
|
||||
|
|
@ -1905,7 +1851,7 @@
|
|||
"showNode": true,
|
||||
"type": "Agent"
|
||||
},
|
||||
"id": "Agent-YDpm0",
|
||||
"id": "Agent-DBNrp",
|
||||
"measured": {
|
||||
"height": 624,
|
||||
"width": 320
|
||||
|
|
@ -1919,16 +1865,16 @@
|
|||
}
|
||||
],
|
||||
"viewport": {
|
||||
"x": 176.17345116464503,
|
||||
"y": 410.5061991131597,
|
||||
"zoom": 0.7205422604177993
|
||||
"x": 150.31260070182884,
|
||||
"y": 468.5915273517045,
|
||||
"zoom": 0.6157949221457367
|
||||
}
|
||||
},
|
||||
"description": "Your AI Agent Accountant - Leverage Needle with Langflows Agent.",
|
||||
"endpoint_name": null,
|
||||
"id": "58b6fe7e-22f9-47d8-b0aa-d7a9c752d423",
|
||||
"id": "2803158e-d8ca-4615-bc9a-0299886b7225",
|
||||
"is_component": false,
|
||||
"last_tested_version": "1.2.0",
|
||||
"last_tested_version": "1.3.4",
|
||||
"name": "Invoice Summarizer",
|
||||
"tags": [
|
||||
"chatbots",
|
||||
|
|
|
|||
|
|
@ -1513,7 +1513,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"n_messages": {
|
||||
"_input_type": "IntInput",
|
||||
|
|
@ -2394,7 +2394,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
|
|
@ -667,7 +667,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
@ -1803,7 +1803,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
|
|
@ -1440,7 +1440,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
|
|
@ -1283,7 +1283,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"n_messages": {
|
||||
"_input_type": "IntInput",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1866,7 +1866,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"n_messages": {
|
||||
"_input_type": "IntInput",
|
||||
|
|
|
|||
|
|
@ -1294,7 +1294,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"n_messages": {
|
||||
"_input_type": "IntInput",
|
||||
|
|
@ -2461,7 +2461,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
@ -2845,7 +2845,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
|
|
@ -1094,7 +1094,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
|
|
@ -1016,7 +1016,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"n_messages": {
|
||||
"_input_type": "IntInput",
|
||||
|
|
|
|||
|
|
@ -1183,9 +1183,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": [],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1383,11 +1381,15 @@
|
|||
"options": [
|
||||
"gpt-4o-mini",
|
||||
"gpt-4o",
|
||||
"gpt-4.1",
|
||||
"gpt-4.1-mini",
|
||||
"gpt-4.1-nano",
|
||||
"gpt-4.5-preview",
|
||||
"gpt-4-turbo",
|
||||
"gpt-4-turbo-preview",
|
||||
"gpt-4",
|
||||
"gpt-3.5-turbo"
|
||||
"gpt-3.5-turbo",
|
||||
"o1"
|
||||
],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
|
|
@ -1398,7 +1400,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o"
|
||||
"value": "gpt-4.1"
|
||||
},
|
||||
"n_messages": {
|
||||
"_input_type": "IntInput",
|
||||
|
|
|
|||
|
|
@ -660,7 +660,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"n_messages": {
|
||||
"_input_type": "IntInput",
|
||||
|
|
@ -1282,7 +1282,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"n_messages": {
|
||||
"_input_type": "IntInput",
|
||||
|
|
@ -2726,7 +2726,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"n_messages": {
|
||||
"_input_type": "IntInput",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1429,9 +1429,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": [],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1629,11 +1627,15 @@
|
|||
"options": [
|
||||
"gpt-4o-mini",
|
||||
"gpt-4o",
|
||||
"gpt-4.1",
|
||||
"gpt-4.1-mini",
|
||||
"gpt-4.1-nano",
|
||||
"gpt-4.5-preview",
|
||||
"gpt-4-turbo",
|
||||
"gpt-4-turbo-preview",
|
||||
"gpt-4",
|
||||
"gpt-3.5-turbo"
|
||||
"gpt-3.5-turbo",
|
||||
"o1"
|
||||
],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
|
|
@ -1644,7 +1646,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o"
|
||||
"value": "gpt-4.1"
|
||||
},
|
||||
"n_messages": {
|
||||
"_input_type": "IntInput",
|
||||
|
|
|
|||
|
|
@ -1084,7 +1084,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
@ -1468,7 +1468,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
@ -1981,7 +1981,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -2028,7 +2028,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
|
|
@ -3004,7 +3004,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
|
|||
|
|
@ -966,7 +966,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"openai_api_base": {
|
||||
"_input_type": "StrInput",
|
||||
|
|
@ -1260,9 +1260,7 @@
|
|||
"display_name": "OpenAI API Key",
|
||||
"dynamic": false,
|
||||
"info": "The OpenAI API Key to use for the OpenAI model.",
|
||||
"input_types": [
|
||||
"Message"
|
||||
],
|
||||
"input_types": [],
|
||||
"load_from_db": true,
|
||||
"name": "api_key",
|
||||
"password": true,
|
||||
|
|
@ -1460,11 +1458,15 @@
|
|||
"options": [
|
||||
"gpt-4o-mini",
|
||||
"gpt-4o",
|
||||
"gpt-4.1",
|
||||
"gpt-4.1-mini",
|
||||
"gpt-4.1-nano",
|
||||
"gpt-4.5-preview",
|
||||
"gpt-4-turbo",
|
||||
"gpt-4-turbo-preview",
|
||||
"gpt-4",
|
||||
"gpt-3.5-turbo"
|
||||
"gpt-3.5-turbo",
|
||||
"o1"
|
||||
],
|
||||
"options_metadata": [],
|
||||
"placeholder": "",
|
||||
|
|
@ -1475,7 +1477,7 @@
|
|||
"tool_mode": false,
|
||||
"trace_as_metadata": true,
|
||||
"type": "str",
|
||||
"value": "gpt-4o-mini"
|
||||
"value": "gpt-4.1-mini"
|
||||
},
|
||||
"n_messages": {
|
||||
"_input_type": "IntInput",
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ export const NodeDialog: React.FC<NodeDialogProps> = ({
|
|||
if (dialogTemplate[fieldKey].real_time_refresh) {
|
||||
mutateTemplate(
|
||||
{ [fieldKey]: newValue },
|
||||
nodeId,
|
||||
nodeClass,
|
||||
setNodeClass,
|
||||
postTemplateValue,
|
||||
|
|
@ -136,6 +137,7 @@ export const NodeDialog: React.FC<NodeDialogProps> = ({
|
|||
|
||||
await mutateTemplate(
|
||||
fieldValues,
|
||||
nodeId,
|
||||
nodeClass,
|
||||
setNodeClass,
|
||||
postTemplateValue,
|
||||
|
|
|
|||
|
|
@ -82,7 +82,13 @@ export default function NodeInputField({
|
|||
};
|
||||
}, [data?.node?.id, isAuth, name]);
|
||||
|
||||
useFetchDataOnMount(data.node!, handleNodeClass, name, postTemplateValue);
|
||||
useFetchDataOnMount(
|
||||
data.node!,
|
||||
data.id,
|
||||
handleNodeClass,
|
||||
name,
|
||||
postTemplateValue,
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (optionalHandle && optionalHandle.length === 0) {
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ export default function NodeStatus({
|
|||
pollingInterval.current = setInterval(() => {
|
||||
mutateTemplate(
|
||||
{ validate: data.node?.template?.auth?.value || "" },
|
||||
data.id,
|
||||
data.node,
|
||||
(newNode) => {
|
||||
setNode(nodeId, (old) => ({
|
||||
|
|
@ -136,6 +137,7 @@ export default function NodeStatus({
|
|||
setIsPolling(true);
|
||||
mutateTemplate(
|
||||
"disconnect",
|
||||
data.id,
|
||||
data.node,
|
||||
(newNode) => {
|
||||
setNode(nodeId, (old) => ({
|
||||
|
|
|
|||
|
|
@ -7,42 +7,79 @@ import { APIClassType, ResponseErrorDetailAPI } from "@/types/api";
|
|||
import { UseMutationResult } from "@tanstack/react-query";
|
||||
import { cloneDeep, debounce } from "lodash";
|
||||
|
||||
export const mutateTemplate = debounce(
|
||||
async (
|
||||
// Map to store debounced functions for each node ID
|
||||
const debouncedFunctions = new Map<string, ReturnType<typeof debounce>>();
|
||||
|
||||
export const mutateTemplate = async (
|
||||
newValue,
|
||||
nodeId: string,
|
||||
node: APIClassType,
|
||||
setNodeClass,
|
||||
postTemplateValue: UseMutationResult<
|
||||
APIClassType | undefined,
|
||||
ResponseErrorDetailAPI,
|
||||
any
|
||||
>,
|
||||
setErrorData,
|
||||
parameterName?: string,
|
||||
callback?: () => void,
|
||||
toolMode?: boolean,
|
||||
) => {
|
||||
// Get or create a debounced function for this node ID
|
||||
if (!debouncedFunctions.has(nodeId)) {
|
||||
debouncedFunctions.set(
|
||||
nodeId,
|
||||
debounce(
|
||||
async (
|
||||
newValue,
|
||||
node: APIClassType,
|
||||
setNodeClass,
|
||||
postTemplateValue: UseMutationResult<
|
||||
APIClassType | undefined,
|
||||
ResponseErrorDetailAPI,
|
||||
any
|
||||
>,
|
||||
setErrorData,
|
||||
parameterName?: string,
|
||||
callback?: () => void,
|
||||
toolMode?: boolean,
|
||||
) => {
|
||||
try {
|
||||
const newNode = cloneDeep(node);
|
||||
const newTemplate = await postTemplateValue.mutateAsync({
|
||||
value: newValue,
|
||||
field_name: parameterName,
|
||||
tool_mode: toolMode ?? node.tool_mode,
|
||||
});
|
||||
if (newTemplate) {
|
||||
newNode.template = newTemplate.template;
|
||||
newNode.outputs = newTemplate.outputs;
|
||||
newNode.tool_mode = toolMode ?? node.tool_mode;
|
||||
}
|
||||
setNodeClass(newNode);
|
||||
callback?.();
|
||||
} catch (e) {
|
||||
const error = e as ResponseErrorDetailAPI;
|
||||
setErrorData({
|
||||
title: TITLE_ERROR_UPDATING_COMPONENT,
|
||||
list: [error.response?.data?.detail || ERROR_UPDATING_COMPONENT],
|
||||
});
|
||||
}
|
||||
},
|
||||
SAVE_DEBOUNCE_TIME,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// Call the debounced function for this specific node
|
||||
debouncedFunctions.get(nodeId)?.(
|
||||
newValue,
|
||||
node: APIClassType,
|
||||
node,
|
||||
setNodeClass,
|
||||
postTemplateValue: UseMutationResult<
|
||||
APIClassType | undefined,
|
||||
ResponseErrorDetailAPI,
|
||||
any
|
||||
>,
|
||||
postTemplateValue,
|
||||
setErrorData,
|
||||
parameterName?: string,
|
||||
callback?: () => void,
|
||||
toolMode?: boolean,
|
||||
) => {
|
||||
try {
|
||||
const newNode = cloneDeep(node);
|
||||
const newTemplate = await postTemplateValue.mutateAsync({
|
||||
value: newValue,
|
||||
field_name: parameterName,
|
||||
tool_mode: toolMode ?? node.tool_mode,
|
||||
});
|
||||
if (newTemplate) {
|
||||
newNode.template = newTemplate.template;
|
||||
newNode.outputs = newTemplate.outputs;
|
||||
newNode.tool_mode = toolMode ?? node.tool_mode;
|
||||
}
|
||||
setNodeClass(newNode);
|
||||
callback?.();
|
||||
} catch (e) {
|
||||
const error = e as ResponseErrorDetailAPI;
|
||||
setErrorData({
|
||||
title: TITLE_ERROR_UPDATING_COMPONENT,
|
||||
list: [error.response?.data?.detail || ERROR_UPDATING_COMPONENT],
|
||||
});
|
||||
}
|
||||
},
|
||||
SAVE_DEBOUNCE_TIME,
|
||||
);
|
||||
parameterName,
|
||||
callback,
|
||||
toolMode,
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import { mutateTemplate } from "../helpers/mutate-template";
|
|||
|
||||
const useFetchDataOnMount = (
|
||||
node: APIClassType,
|
||||
nodeId: string,
|
||||
setNodeClass: (node: APIClassType) => void,
|
||||
name: string,
|
||||
postTemplateValue: UseMutationResult<
|
||||
|
|
@ -20,16 +21,22 @@ const useFetchDataOnMount = (
|
|||
async function fetchData() {
|
||||
const template = node.template[name];
|
||||
if (
|
||||
(template?.real_time_refresh || template?.refresh_button) &&
|
||||
(template?.real_time_refresh ||
|
||||
template?.refresh_button ||
|
||||
(node.tool_mode && name === "tools_metadata")) &&
|
||||
// options can be undefined but not an empty array
|
||||
(template?.options?.length ?? 0) === 0
|
||||
) {
|
||||
mutateTemplate(
|
||||
template?.value,
|
||||
nodeId,
|
||||
node,
|
||||
setNodeClass,
|
||||
postTemplateValue,
|
||||
setErrorData,
|
||||
name,
|
||||
() => {},
|
||||
node.tool_mode,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ const useHandleOnNewValue = ({
|
|||
) => {
|
||||
await mutateTemplate(
|
||||
value,
|
||||
nodeId,
|
||||
node,
|
||||
setNodeClassFn,
|
||||
postTemplateFn,
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ export default function Dropdown({
|
|||
|
||||
await mutateTemplate(
|
||||
value,
|
||||
nodeId,
|
||||
nodeClass!,
|
||||
handleNodeClass,
|
||||
postTemplateValue,
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ const ConnectionComponent = ({
|
|||
pollingInterval.current = setInterval(() => {
|
||||
mutateTemplate(
|
||||
{ validate: selectedItem[0]?.name || "" },
|
||||
nodeId,
|
||||
nodeClass,
|
||||
handleNodeClass,
|
||||
postTemplateValue,
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ export function RefreshParameterComponent({
|
|||
const handleRefreshButtonPress = () =>
|
||||
mutateTemplate(
|
||||
templateData.value,
|
||||
nodeId,
|
||||
nodeClass,
|
||||
handleNodeClass,
|
||||
postTemplateValue,
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ const NodeToolbarComponent = memo(
|
|||
setToolMode(newValue);
|
||||
mutateTemplate(
|
||||
newValue,
|
||||
data.id,
|
||||
data.node!,
|
||||
handleNodeClass,
|
||||
postToolModeValue,
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ withEventDeliveryModes(
|
|||
|
||||
expect(concatAllText.length).toBeGreaterThan(200);
|
||||
|
||||
expect(concatAllText).toContain("html");
|
||||
expect(concatAllText).toContain("div");
|
||||
expect(concatAllText).toContain("body");
|
||||
},
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue