diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json b/src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json index 82733dcea..570056441 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Custom Component Maker.json @@ -7,7 +7,7 @@ "data": { "sourceHandle": { "dataType": "Memory", - "id": "Memory-v5bRq", + "id": "Memory-lzTrH", "name": "messages_text", "output_types": [ "Message" @@ -15,7 +15,7 @@ }, "targetHandle": { "fieldName": "CHAT_HISTORY", - "id": "Prompt-QIyYT", + "id": "Prompt-mySXT", "inputTypes": [ "Message", "Text" @@ -23,12 +23,12 @@ "type": "str" } }, - "id": "reactflow__edge-Memory-v5bRq{œdataTypeœ:œMemoryœ,œidœ:œMemory-v5bRqœ,œnameœ:œmessages_textœ,œoutput_typesœ:[œMessageœ]}-Prompt-QIyYT{œfieldNameœ:œCHAT_HISTORYœ,œidœ:œPrompt-QIyYTœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-Memory-lzTrH{œdataTypeœ:œMemoryœ,œidœ:œMemory-lzTrHœ,œnameœ:œmessages_textœ,œoutput_typesœ:[œMessageœ]}-Prompt-mySXT{œfieldNameœ:œCHAT_HISTORYœ,œidœ:œPrompt-mySXTœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", "selected": false, - "source": "Memory-v5bRq", - "sourceHandle": "{œdataTypeœ: œMemoryœ, œidœ: œMemory-v5bRqœ, œnameœ: œmessages_textœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-QIyYT", - "targetHandle": "{œfieldNameœ: œCHAT_HISTORYœ, œidœ: œPrompt-QIyYTœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "source": "Memory-lzTrH", + "sourceHandle": "{œdataTypeœ: œMemoryœ, œidœ: œMemory-lzTrHœ, œnameœ: œmessages_textœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-mySXT", + "targetHandle": "{œfieldNameœ: œCHAT_HISTORYœ, œidœ: œPrompt-mySXTœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -36,7 +36,7 @@ "data": { "sourceHandle": { "dataType": "ChatInput", - "id": "ChatInput-Z88lk", + "id": "ChatInput-99hxg", "name": "message", "output_types": [ "Message" @@ -44,7 +44,7 @@ }, "targetHandle": { "fieldName": "USER_INPUT", - "id": "Prompt-QIyYT", + "id": "Prompt-mySXT", "inputTypes": [ "Message", "Text" @@ -52,12 +52,12 @@ "type": "str" } }, - "id": "reactflow__edge-ChatInput-Z88lk{œdataTypeœ:œChatInputœ,œidœ:œChatInput-Z88lkœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Prompt-QIyYT{œfieldNameœ:œUSER_INPUTœ,œidœ:œPrompt-QIyYTœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-ChatInput-99hxg{œdataTypeœ:œChatInputœ,œidœ:œChatInput-99hxgœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Prompt-mySXT{œfieldNameœ:œUSER_INPUTœ,œidœ:œPrompt-mySXTœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", "selected": false, - "source": "ChatInput-Z88lk", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-Z88lkœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-QIyYT", - "targetHandle": "{œfieldNameœ: œUSER_INPUTœ, œidœ: œPrompt-QIyYTœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "source": "ChatInput-99hxg", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-99hxgœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-mySXT", + "targetHandle": "{œfieldNameœ: œUSER_INPUTœ, œidœ: œPrompt-mySXTœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -65,7 +65,7 @@ "data": { "sourceHandle": { "dataType": "URL", - "id": "URL-wNOPd", + "id": "URL-ap9ge", "name": "text", "output_types": [ "Message" @@ -73,7 +73,7 @@ }, "targetHandle": { "fieldName": "EXAMPLE_COMPONENTS", - "id": "Prompt-QIyYT", + "id": "Prompt-mySXT", "inputTypes": [ "Message", "Text" @@ -81,11 +81,12 @@ "type": "str" } }, - "id": "reactflow__edge-URL-wNOPd{œdataTypeœ:œURLœ,œidœ:œURL-wNOPdœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-QIyYT{œfieldNameœ:œEXAMPLE_COMPONENTSœ,œidœ:œPrompt-QIyYTœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", - "source": "URL-wNOPd", - "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-wNOPdœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-QIyYT", - "targetHandle": "{œfieldNameœ: œEXAMPLE_COMPONENTSœ, œidœ: œPrompt-QIyYTœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-URL-ap9ge{œdataTypeœ:œURLœ,œidœ:œURL-ap9geœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-mySXT{œfieldNameœ:œEXAMPLE_COMPONENTSœ,œidœ:œPrompt-mySXTœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "selected": false, + "source": "URL-ap9ge", + "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-ap9geœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-mySXT", + "targetHandle": "{œfieldNameœ: œEXAMPLE_COMPONENTSœ, œidœ: œPrompt-mySXTœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -93,7 +94,7 @@ "data": { "sourceHandle": { "dataType": "URL", - "id": "URL-pFAuR", + "id": "URL-1bNqm", "name": "text", "output_types": [ "Message" @@ -101,7 +102,7 @@ }, "targetHandle": { "fieldName": "BASE_COMPONENT_CODE", - "id": "Prompt-QIyYT", + "id": "Prompt-mySXT", "inputTypes": [ "Message", "Text" @@ -109,11 +110,12 @@ "type": "str" } }, - "id": "reactflow__edge-URL-pFAuR{œdataTypeœ:œURLœ,œidœ:œURL-pFAuRœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-QIyYT{œfieldNameœ:œBASE_COMPONENT_CODEœ,œidœ:œPrompt-QIyYTœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", - "source": "URL-pFAuR", - "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-pFAuRœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-QIyYT", - "targetHandle": "{œfieldNameœ: œBASE_COMPONENT_CODEœ, œidœ: œPrompt-QIyYTœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-URL-1bNqm{œdataTypeœ:œURLœ,œidœ:œURL-1bNqmœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-mySXT{œfieldNameœ:œBASE_COMPONENT_CODEœ,œidœ:œPrompt-mySXTœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "selected": false, + "source": "URL-1bNqm", + "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-1bNqmœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-mySXT", + "targetHandle": "{œfieldNameœ: œBASE_COMPONENT_CODEœ, œidœ: œPrompt-mySXTœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -121,7 +123,7 @@ "data": { "sourceHandle": { "dataType": "URL", - "id": "URL-KARv3", + "id": "URL-CIWR9", "name": "text", "output_types": [ "Message" @@ -129,7 +131,7 @@ }, "targetHandle": { "fieldName": "CUSTOM_COMPONENT_CODE", - "id": "Prompt-QIyYT", + "id": "Prompt-mySXT", "inputTypes": [ "Message", "Text" @@ -137,18 +139,20 @@ "type": "str" } }, - "id": "reactflow__edge-URL-KARv3{œdataTypeœ:œURLœ,œidœ:œURL-KARv3œ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-QIyYT{œfieldNameœ:œCUSTOM_COMPONENT_CODEœ,œidœ:œPrompt-QIyYTœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", - "source": "URL-KARv3", - "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-KARv3œ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-QIyYT", - "targetHandle": "{œfieldNameœ: œCUSTOM_COMPONENT_CODEœ, œidœ: œPrompt-QIyYTœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-URL-CIWR9{œdataTypeœ:œURLœ,œidœ:œURL-CIWR9œ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-mySXT{œfieldNameœ:œCUSTOM_COMPONENT_CODEœ,œidœ:œPrompt-mySXTœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "selected": false, + "source": "URL-CIWR9", + "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-CIWR9œ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-mySXT", + "targetHandle": "{œfieldNameœ: œCUSTOM_COMPONENT_CODEœ, œidœ: œPrompt-mySXTœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { + "animated": false, "className": "", "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-QIyYT", + "id": "Prompt-mySXT", "name": "prompt", "output_types": [ "Message" @@ -156,25 +160,27 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "AnthropicModel-RQQCm", + "id": "AnthropicModel-rdklm", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-QIyYT{œdataTypeœ:œPromptœ,œidœ:œPrompt-QIyYTœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-AnthropicModel-RQQCm{œfieldNameœ:œinput_valueœ,œidœ:œAnthropicModel-RQQCmœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "Prompt-QIyYT", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-QIyYTœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "AnthropicModel-RQQCm", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAnthropicModel-RQQCmœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Prompt-mySXT{œdataTypeœ:œPromptœ,œidœ:œPrompt-mySXTœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-AnthropicModel-rdklm{œfieldNameœ:œinput_valueœ,œidœ:œAnthropicModel-rdklmœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "selected": false, + "source": "Prompt-mySXT", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-mySXTœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "AnthropicModel-rdklm", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAnthropicModel-rdklmœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { + "animated": false, "className": "", "data": { "sourceHandle": { "dataType": "AnthropicModel", - "id": "AnthropicModel-RQQCm", + "id": "AnthropicModel-rdklm", "name": "text_output", "output_types": [ "Message" @@ -182,7 +188,7 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-Jj8M6", + "id": "ChatOutput-SPhqv", "inputTypes": [ "Data", "DataFrame", @@ -191,11 +197,12 @@ "type": "str" } }, - "id": "reactflow__edge-AnthropicModel-RQQCm{œdataTypeœ:œAnthropicModelœ,œidœ:œAnthropicModel-RQQCmœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-Jj8M6{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-Jj8M6œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "AnthropicModel-RQQCm", - "sourceHandle": "{œdataTypeœ: œAnthropicModelœ, œidœ: œAnthropicModel-RQQCmœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", - "target": "ChatOutput-Jj8M6", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-Jj8M6œ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-AnthropicModel-rdklm{œdataTypeœ:œAnthropicModelœ,œidœ:œAnthropicModel-rdklmœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-SPhqv{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-SPhqvœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}", + "selected": false, + "source": "AnthropicModel-rdklm", + "sourceHandle": "{œdataTypeœ: œAnthropicModelœ, œidœ: œAnthropicModel-rdklmœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-SPhqv", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-SPhqvœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" } ], "nodes": [ @@ -203,7 +210,7 @@ "data": { "description": "Get chat inputs from the Playground.", "display_name": "Chat Input", - "id": "ChatInput-Z88lk", + "id": "ChatInput-99hxg", "node": { "base_classes": [ "Message" @@ -485,14 +492,14 @@ }, "dragging": false, "height": 231, - "id": "ChatInput-Z88lk", + "id": "ChatInput-99hxg", "measured": { "height": 231, "width": 320 }, "position": { - "x": 1436.7228707197569, - "y": 1045.2749109595 + "x": 1425.511811793499, + "y": 1250.8109912742284 }, "positionAbsolute": { "x": 1436.7228707197569, @@ -506,7 +513,7 @@ "data": { "description": "Retrieves stored chat messages from Langflow tables or an external memory.", "display_name": "Chat Memory", - "id": "Memory-v5bRq", + "id": "Memory-lzTrH", "node": { "base_classes": [ "Data", @@ -735,14 +742,14 @@ }, "dragging": false, "height": 262, - "id": "Memory-v5bRq", + "id": "Memory-lzTrH", "measured": { "height": 262, "width": 320 }, "position": { - "x": 1830.6888981898887, - "y": 946.1205963195098 + "x": 1832.6206210738642, + "y": 1150.8832220209044 }, "positionAbsolute": { "x": 1830.6888981898887, @@ -756,7 +763,7 @@ "data": { "description": "Create a prompt template with dynamic variables.", "display_name": "Prompt", - "id": "Prompt-QIyYT", + "id": "Prompt-mySXT", "node": { "base_classes": [ "Message" @@ -983,20 +990,20 @@ }, "dragging": false, "height": 685, - "id": "Prompt-QIyYT", + "id": "Prompt-mySXT", "measured": { "height": 685, "width": 320 }, "position": { - "x": 2219.5265974825707, - "y": 521.6320563271215 + "x": 2214.0288118788944, + "y": 514.3016755222201 }, "positionAbsolute": { "x": 2219.5265974825707, "y": 521.6320563271215 }, - "selected": false, + "selected": true, "type": "genericNode", "width": 320 }, @@ -1004,7 +1011,7 @@ "data": { "description": "Display a chat message in the Playground.", "display_name": "Chat Output", - "id": "ChatOutput-Jj8M6", + "id": "ChatOutput-SPhqv", "node": { "base_classes": [ "Message" @@ -1285,7 +1292,7 @@ }, "dragging": false, "height": 232, - "id": "ChatOutput-Jj8M6", + "id": "ChatOutput-SPhqv", "measured": { "height": 232, "width": 320 @@ -1304,7 +1311,7 @@ }, { "data": { - "id": "note-M2lYQ", + "id": "note-FI4hN", "node": { "description": "# Fetch Components code \n\nUsing the URL component we are extracting from Github, the code from a few classes to provide as example to the LLM. \n\nThis ensures we are always up to date with recent information from the codebase.", "display_name": "", @@ -1315,14 +1322,14 @@ }, "dragging": false, "height": 324, - "id": "note-M2lYQ", + "id": "note-FI4hN", "measured": { "height": 324, "width": 325 }, "position": { - "x": 1430.2014058924922, - "y": -19.30392196909918 + "x": 1428.2696830085167, + "y": -263.5483680075372 }, "positionAbsolute": { "x": 1430.2014058924922, @@ -1334,7 +1341,7 @@ }, { "data": { - "id": "note-nxR1T", + "id": "note-rp8sO", "node": { "description": "# 🛠️ Custom Component Generator 🚀\n\nHi! I'm here to help you create custom components for Langflow. Think of me as your technical partner who can help turn your ideas into working components! \n\n## 🎯 How to Work With Me\n\n### 1. 💭 Tell Me What You Want to Build\nSimply describe what you want your component to do in plain English. For example:\n- \"I need a component that sends Slack messages\"\n- \"I want to create a tool that can process CSV files\"\n- \"I need something that can translate text\"\n\n### 2. 📚 Share Any Relevant Information\nIf you're working with a specific:\n- 🔑 API or service (just share the documentation link or main endpoints)\n- 📄 File format\n- 🔄 Data structure\n- 🔧 Existing component you want to modify\n\n### 3. 🎨 Let Me Help Design It\nI'll help by:\n- 📊 Breaking down complex requirements into manageable pieces\n- 💡 Suggesting the best way to structure inputs and outputs\n- ⚙️ Creating the component code\n- 📝 Explaining how to use it\n\n### 4. 🔄 Iterative Refinement\nWe can then:\n- ✅ Test and refine the component\n- ⭐ Add features\n- 🔧 Modify behavior\n- 🛡️ Improve error handling\n- 📖 Add documentation\n\n## 🚀 What I Can Help With\n\nI can help create components that:\n- 📊 Process different file types (CSV, JSON, Excel, etc.)\n- 🔌 Integrate with external APIs\n- 🔄 Transform data\n- 🔀 Route messages\n- 🌐 Handle web requests\n- 🎯 Parse structured data\n- ✨ And much more!\n\n## 💡 Tips for Best Results\n\n1. **Be Specific** 🎯: The more details you provide about what you want to accomplish, the better I can help.\n\n2. **Share Examples** 📋: If you have example data or specific use cases, share them.\n\n3. **Ask Questions** ❓: Don't hesitate to ask for clarification or modifications.\n\nJust start by telling me what kind of component you'd like to create, and I'll guide you through the process! \n\nReady to build something awesome? 🚀 Let's get started!", "display_name": "", @@ -1345,21 +1352,21 @@ }, "dragging": false, "height": 573, - "id": "note-nxR1T", + "id": "note-rp8sO", "measured": { "height": 573, - "width": 324 + "width": 325 }, "position": { - "x": 807.6293964045135, - "y": 605.6504562080672 + "x": 1002.7334076860311, + "y": 538.0401552689275 }, "positionAbsolute": { "x": 807.6293964045135, "y": 605.6504562080672 }, "resizing": false, - "selected": true, + "selected": false, "style": { "height": 573, "width": 324 @@ -1369,7 +1376,7 @@ }, { "data": { - "id": "URL-pFAuR", + "id": "URL-1bNqm", "node": { "base_classes": [ "Data", @@ -1544,14 +1551,14 @@ }, "dragging": false, "height": 365, - "id": "URL-pFAuR", + "id": "URL-1bNqm", "measured": { "height": 365, "width": 320 }, "position": { - "x": 1436.3617127766433, - "y": 264.218898085405 + "x": 1428.8876734924713, + "y": 32.523680276074714 }, "positionAbsolute": { "x": 1436.3617127766433, @@ -1563,7 +1570,7 @@ }, { "data": { - "id": "URL-wNOPd", + "id": "URL-ap9ge", "node": { "base_classes": [ "Data", @@ -1744,7 +1751,7 @@ }, "dragging": false, "height": 661, - "id": "URL-wNOPd", + "id": "URL-ap9ge", "measured": { "height": 661, "width": 320 @@ -1763,7 +1770,7 @@ }, { "data": { - "id": "URL-KARv3", + "id": "URL-CIWR9", "node": { "base_classes": [ "Data", @@ -1938,14 +1945,14 @@ }, "dragging": false, "height": 365, - "id": "URL-KARv3", + "id": "URL-CIWR9", "measured": { "height": 365, "width": 320 }, "position": { - "x": 1436.982480021523, - "y": 651.1409296825055 + "x": 1429.5084407373513, + "y": 632.4558314720756 }, "positionAbsolute": { "x": 1436.982480021523, @@ -1957,7 +1964,7 @@ }, { "data": { - "id": "AnthropicModel-RQQCm", + "id": "AnthropicModel-rdklm", "node": { "base_classes": [ "LanguageModel", @@ -2278,9 +2285,9 @@ "type": "AnthropicModel" }, "dragging": false, - "id": "AnthropicModel-RQQCm", + "id": "AnthropicModel-rdklm", "measured": { - "height": 797, + "height": 801, "width": 320 }, "position": { @@ -2292,18 +2299,16 @@ } ], "viewport": { - "x": -366.41363591649906, - "y": 264.64346206947675, - "zoom": 0.5351858410044688 + "x": -312.5858922909906, + "y": 143.0557404215083, + "zoom": 0.5176725959481484 } }, "description": "Generates well-structured code for custom components following Langflow's specifications.", "endpoint_name": null, - "gradient": "1", - "icon": "SquareCode", - "id": "5155918c-68b1-4013-8d7b-61f31ffa931c", + "id": "4e7e8184-1a8c-4e04-ae99-b9c9ba48be53", "is_component": false, - "last_tested_version": "1.1.0", + "last_tested_version": "1.2.0", "name": "Custom Component Generator", "tags": [ "coding", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Graph Vector Store RAG.json b/src/backend/base/langflow/initial_setup/starter_projects/Graph Vector Store RAG.json index 96d7baaa4..04206a2c1 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Graph Vector Store RAG.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Graph Vector Store RAG.json @@ -7,7 +7,7 @@ "data": { "sourceHandle": { "dataType": "OpenAIEmbeddings", - "id": "OpenAIEmbeddings-fcwMC", + "id": "OpenAIEmbeddings-Z4ej5", "name": "embeddings", "output_types": [ "Embeddings" @@ -15,47 +15,19 @@ }, "targetHandle": { "fieldName": "embedding_model", - "id": "AstraDBGraph-jr8pY", + "id": "AstraDBGraph-WdeLY", "inputTypes": [ "Embeddings" ], "type": "other" } }, - "id": "reactflow__edge-OpenAIEmbeddings-jyvkr{œdataTypeœ:œOpenAIEmbeddingsœ,œidœ:œOpenAIEmbeddings-jyvkrœ,œnameœ:œembeddingsœ,œoutput_typesœ:[œEmbeddingsœ]}-AstraDBGraph-jr8pY{œfieldNameœ:œembedding_modelœ,œidœ:œAstraDBGraph-jr8pYœ,œinputTypesœ:[œEmbeddingsœ],œtypeœ:œotherœ}", + "id": "reactflow__edge-OpenAIEmbeddings-Z4ej5{œdataTypeœ:œOpenAIEmbeddingsœ,œidœ:œOpenAIEmbeddings-Z4ej5œ,œnameœ:œembeddingsœ,œoutput_typesœ:[œEmbeddingsœ]}-AstraDBGraph-WdeLY{œfieldNameœ:œembedding_modelœ,œidœ:œAstraDBGraph-WdeLYœ,œinputTypesœ:[œEmbeddingsœ],œtypeœ:œotherœ}", "selected": false, - "source": "OpenAIEmbeddings-fcwMC", - "sourceHandle": "{œdataTypeœ: œOpenAIEmbeddingsœ, œidœ: œOpenAIEmbeddings-fcwMCœ, œnameœ: œembeddingsœ, œoutput_typesœ: [œEmbeddingsœ]}", - "target": "AstraDBGraph-jr8pY", - "targetHandle": "{œfieldNameœ: œembedding_modelœ, œidœ: œAstraDBGraph-jr8pYœ, œinputTypesœ: [œEmbeddingsœ], œtypeœ: œotherœ}" - }, - { - "animated": false, - "className": "", - "data": { - "sourceHandle": { - "dataType": "ChatInput", - "id": "ChatInput-DA114", - "name": "message", - "output_types": [ - "Message" - ] - }, - "targetHandle": { - "fieldName": "search_query", - "id": "AstraDBGraph-jr8pY", - "inputTypes": [ - "Message" - ], - "type": "str" - } - }, - "id": "reactflow__edge-ChatInput-ZCSfi{œdataTypeœ:œChatInputœ,œidœ:œChatInput-ZCSfiœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-AstraDBGraph-jr8pY{œfieldNameœ:œsearch_queryœ,œidœ:œAstraDBGraph-jr8pYœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "selected": false, - "source": "ChatInput-DA114", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-DA114œ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "AstraDBGraph-jr8pY", - "targetHandle": "{œfieldNameœ: œsearch_queryœ, œidœ: œAstraDBGraph-jr8pYœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "OpenAIEmbeddings-Z4ej5", + "sourceHandle": "{œdataTypeœ: œOpenAIEmbeddingsœ, œidœ: œOpenAIEmbeddings-Z4ej5œ, œnameœ: œembeddingsœ, œoutput_typesœ: [œEmbeddingsœ]}", + "target": "AstraDBGraph-WdeLY", + "targetHandle": "{œfieldNameœ: œembedding_modelœ, œidœ: œAstraDBGraph-WdeLYœ, œinputTypesœ: [œEmbeddingsœ], œtypeœ: œotherœ}" }, { "animated": false, @@ -63,7 +35,7 @@ "data": { "sourceHandle": { "dataType": "AstraDBGraph", - "id": "AstraDBGraph-jr8pY", + "id": "AstraDBGraph-WdeLY", "name": "search_results", "output_types": [ "Data" @@ -71,19 +43,19 @@ }, "targetHandle": { "fieldName": "data", - "id": "ParseData-alciW", + "id": "ParseData-s05ib", "inputTypes": [ "Data" ], "type": "other" } }, - "id": "reactflow__edge-AstraDBGraph-jr8pY{œdataTypeœ:œAstraDBGraphœ,œidœ:œAstraDBGraph-jr8pYœ,œnameœ:œsearch_resultsœ,œoutput_typesœ:[œDataœ]}-ParseData-T6FGT{œfieldNameœ:œdataœ,œidœ:œParseData-T6FGTœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", + "id": "reactflow__edge-AstraDBGraph-WdeLY{œdataTypeœ:œAstraDBGraphœ,œidœ:œAstraDBGraph-WdeLYœ,œnameœ:œsearch_resultsœ,œoutput_typesœ:[œDataœ]}-ParseData-s05ib{œfieldNameœ:œdataœ,œidœ:œParseData-s05ibœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", "selected": false, - "source": "AstraDBGraph-jr8pY", - "sourceHandle": "{œdataTypeœ: œAstraDBGraphœ, œidœ: œAstraDBGraph-jr8pYœ, œnameœ: œsearch_resultsœ, œoutput_typesœ: [œDataœ]}", - "target": "ParseData-alciW", - "targetHandle": "{œfieldNameœ: œdataœ, œidœ: œParseData-alciWœ, œinputTypesœ: [œDataœ], œtypeœ: œotherœ}" + "source": "AstraDBGraph-WdeLY", + "sourceHandle": "{œdataTypeœ: œAstraDBGraphœ, œidœ: œAstraDBGraph-WdeLYœ, œnameœ: œsearch_resultsœ, œoutput_typesœ: [œDataœ]}", + "target": "ParseData-s05ib", + "targetHandle": "{œfieldNameœ: œdataœ, œidœ: œParseData-s05ibœ, œinputTypesœ: [œDataœ], œtypeœ: œotherœ}" }, { "animated": false, @@ -91,7 +63,7 @@ "data": { "sourceHandle": { "dataType": "ParseData", - "id": "ParseData-alciW", + "id": "ParseData-s05ib", "name": "text", "output_types": [ "Message" @@ -99,7 +71,7 @@ }, "targetHandle": { "fieldName": "context", - "id": "Prompt-2M2d5", + "id": "Prompt-KZb70", "inputTypes": [ "Message", "Text" @@ -107,41 +79,12 @@ "type": "str" } }, - "id": "reactflow__edge-ParseData-alciW{œdataTypeœ:œParseDataœ,œidœ:œParseData-alciWœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-rmO8w{œfieldNameœ:œcontextœ,œidœ:œPrompt-rmO8wœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-ParseData-s05ib{œdataTypeœ:œParseDataœ,œidœ:œParseData-s05ibœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-KZb70{œfieldNameœ:œcontextœ,œidœ:œPrompt-KZb70œ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", "selected": false, - "source": "ParseData-alciW", - "sourceHandle": "{œdataTypeœ: œParseDataœ, œidœ: œParseData-alciWœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-rmO8w", - "targetHandle": "{œfieldNameœ: œcontextœ, œidœ: œPrompt-2M2d5œ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" - }, - { - "animated": false, - "className": "", - "data": { - "sourceHandle": { - "dataType": "ChatInput", - "id": "ChatInput-DA114", - "name": "message", - "output_types": [ - "Message" - ] - }, - "targetHandle": { - "fieldName": "question", - "id": "Prompt-2M2d5", - "inputTypes": [ - "Message", - "Text" - ], - "type": "str" - } - }, - "id": "reactflow__edge-ChatInput-DA114{œdataTypeœ:œChatInputœ,œidœ:œChatInput-DA114œ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Prompt-rmO8w{œfieldNameœ:œquestionœ,œidœ:œPrompt-rmO8wœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", - "selected": false, - "source": "ChatInput-DA114", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-DA114œ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-rmO8w", - "targetHandle": "{œfieldNameœ: œquestionœ, œidœ: œPrompt-2M2d5œ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "source": "ParseData-s05ib", + "sourceHandle": "{œdataTypeœ: œParseDataœ, œidœ: œParseData-s05ibœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-KZb70", + "targetHandle": "{œfieldNameœ: œcontextœ, œidœ: œPrompt-KZb70œ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -149,7 +92,7 @@ "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-rmO8w", + "id": "Prompt-KZb70", "name": "prompt", "output_types": [ "Message" @@ -157,19 +100,19 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "OpenAIModel-a26gL", + "id": "OpenAIModel-hhsjV", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-rmO8w{œdataTypeœ:œPromptœ,œidœ:œPrompt-rmO8wœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-LnWKb{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-LnWKbœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-Prompt-KZb70{œdataTypeœ:œPromptœ,œidœ:œPrompt-KZb70œ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-hhsjV{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-hhsjVœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "Prompt-rmO8w", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-rmO8wœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "OpenAIModel-LnWKb", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-a26gLœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "Prompt-KZb70", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-KZb70œ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "OpenAIModel-hhsjV", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-hhsjVœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -177,7 +120,7 @@ "data": { "sourceHandle": { "dataType": "OpenAIModel", - "id": "OpenAIModel-LnWKb", + "id": "OpenAIModel-hhsjV", "name": "text_output", "output_types": [ "Message" @@ -185,7 +128,7 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-KIkbc", + "id": "ChatOutput-yHZfU", "inputTypes": [ "Data", "DataFrame", @@ -194,12 +137,12 @@ "type": "str" } }, - "id": "reactflow__edge-OpenAIModel-LnWKb{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-LnWKbœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-KIkbc{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-KIkbcœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-OpenAIModel-hhsjV{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-hhsjVœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-yHZfU{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-yHZfUœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "OpenAIModel-LnWKb", - "sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-LnWKbœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", - "target": "ChatOutput-KIkbc", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-KIkbcœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" + "source": "OpenAIModel-hhsjV", + "sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-hhsjVœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-yHZfU", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-yHZfUœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -207,7 +150,7 @@ "data": { "sourceHandle": { "dataType": "URL", - "id": "URL-qOh1r", + "id": "URL-eBpyO", "name": "data", "output_types": [ "Data" @@ -215,7 +158,7 @@ }, "targetHandle": { "fieldName": "data_input", - "id": "LanguageRecursiveTextSplitter-jefpx", + "id": "LanguageRecursiveTextSplitter-TG6vC", "inputTypes": [ "Document", "Data" @@ -223,12 +166,12 @@ "type": "other" } }, - "id": "reactflow__edge-URL-qOh1r{œdataTypeœ:œURLœ,œidœ:œURL-qOh1rœ,œnameœ:œdataœ,œoutput_typesœ:[œDataœ]}-LanguageRecursiveTextSplitter-KDtC3{œfieldNameœ:œdata_inputœ,œidœ:œLanguageRecursiveTextSplitter-KDtC3œ,œinputTypesœ:[œDocumentœ,œDataœ],œtypeœ:œotherœ}", + "id": "reactflow__edge-URL-eBpyO{œdataTypeœ:œURLœ,œidœ:œURL-eBpyOœ,œnameœ:œdataœ,œoutput_typesœ:[œDataœ]}-LanguageRecursiveTextSplitter-TG6vC{œfieldNameœ:œdata_inputœ,œidœ:œLanguageRecursiveTextSplitter-TG6vCœ,œinputTypesœ:[œDocumentœ,œDataœ],œtypeœ:œotherœ}", "selected": false, - "source": "URL-qOh1r", - "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-qOh1rœ, œnameœ: œdataœ, œoutput_typesœ: [œDataœ]}", - "target": "LanguageRecursiveTextSplitter-KDtC3", - "targetHandle": "{œfieldNameœ: œdata_inputœ, œidœ: œLanguageRecursiveTextSplitter-jefpxœ, œinputTypesœ: [œDocumentœ, œDataœ], œtypeœ: œotherœ}" + "source": "URL-eBpyO", + "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-eBpyOœ, œnameœ: œdataœ, œoutput_typesœ: [œDataœ]}", + "target": "LanguageRecursiveTextSplitter-TG6vC", + "targetHandle": "{œfieldNameœ: œdata_inputœ, œidœ: œLanguageRecursiveTextSplitter-TG6vCœ, œinputTypesœ: [œDocumentœ, œDataœ], œtypeœ: œotherœ}" }, { "animated": false, @@ -236,7 +179,7 @@ "data": { "sourceHandle": { "dataType": "LanguageRecursiveTextSplitter", - "id": "LanguageRecursiveTextSplitter-KDtC3", + "id": "LanguageRecursiveTextSplitter-TG6vC", "name": "data", "output_types": [ "Data" @@ -244,7 +187,7 @@ }, "targetHandle": { "fieldName": "data_input", - "id": "HtmlLinkExtractor-exHgk", + "id": "HtmlLinkExtractor-I8rzh", "inputTypes": [ "Document", "Data" @@ -252,41 +195,20 @@ "type": "other" } }, - "id": "reactflow__edge-LanguageRecursiveTextSplitter-KDtC3{œdataTypeœ:œLanguageRecursiveTextSplitterœ,œidœ:œLanguageRecursiveTextSplitter-KDtC3œ,œnameœ:œdataœ,œoutput_typesœ:[œDataœ]}-HtmlLinkExtractor-LWuvQ{œfieldNameœ:œdata_inputœ,œidœ:œHtmlLinkExtractor-LWuvQœ,œinputTypesœ:[œDocumentœ,œDataœ],œtypeœ:œotherœ}", + "id": "reactflow__edge-LanguageRecursiveTextSplitter-TG6vC{œdataTypeœ:œLanguageRecursiveTextSplitterœ,œidœ:œLanguageRecursiveTextSplitter-TG6vCœ,œnameœ:œdataœ,œoutput_typesœ:[œDataœ]}-HtmlLinkExtractor-I8rzh{œfieldNameœ:œdata_inputœ,œidœ:œHtmlLinkExtractor-I8rzhœ,œinputTypesœ:[œDocumentœ,œDataœ],œtypeœ:œotherœ}", "selected": false, - "source": "LanguageRecursiveTextSplitter-KDtC3", - "sourceHandle": "{œdataTypeœ: œLanguageRecursiveTextSplitterœ, œidœ: œLanguageRecursiveTextSplitter-KDtC3œ, œnameœ: œdataœ, œoutput_typesœ: [œDataœ]}", - "target": "HtmlLinkExtractor-LWuvQ", - "targetHandle": "{œfieldNameœ: œdata_inputœ, œidœ: œHtmlLinkExtractor-exHgkœ, œinputTypesœ: [œDocumentœ, œDataœ], œtypeœ: œotherœ}" - }, - { - "data": { - "sourceHandle": { - "dataType": "HtmlLinkExtractor", - "id": "HtmlLinkExtractor-exHgk", - "name": "data", - "output_types": [] - }, - "targetHandle": { - "fieldName": "ingest_data", - "id": "AstraDBGraph-FX0tA", - "inputTypes": [ - "Data" - ], - "type": "other" - } - }, - "id": "xy-edge__ChatInput-DA114{œdataTypeœ:œChatInputœ,œidœ:œChatInput-DA114œ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-AstraDBGraph-xJiDN{œfieldNameœ:œsearch_queryœ,œidœ:œAstraDBGraph-xJiDNœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "ChatInput-DA114", - "sourceHandle": "{œdataTypeœ: œHtmlLinkExtractorœ, œidœ: œHtmlLinkExtractor-exHgkœ, œnameœ: œdataœ, œoutput_typesœ: []}", - "target": "AstraDBGraph-xJiDN", - "targetHandle": "{œfieldNameœ: œingest_dataœ, œidœ: œAstraDBGraph-FX0tAœ, œinputTypesœ: [œDataœ], œtypeœ: œotherœ}" + "source": "LanguageRecursiveTextSplitter-TG6vC", + "sourceHandle": "{œdataTypeœ: œLanguageRecursiveTextSplitterœ, œidœ: œLanguageRecursiveTextSplitter-TG6vCœ, œnameœ: œdataœ, œoutput_typesœ: [œDataœ]}", + "target": "HtmlLinkExtractor-I8rzh", + "targetHandle": "{œfieldNameœ: œdata_inputœ, œidœ: œHtmlLinkExtractor-I8rzhœ, œinputTypesœ: [œDocumentœ, œDataœ], œtypeœ: œotherœ}" }, { + "animated": false, + "className": "", "data": { "sourceHandle": { "dataType": "OpenAIEmbeddings", - "id": "OpenAIEmbeddings-fcwMC", + "id": "OpenAIEmbeddings-RD7F8", "name": "embeddings", "output_types": [ "Embeddings" @@ -294,74 +216,27 @@ }, "targetHandle": { "fieldName": "embedding_model", - "id": "AstraDBGraph-FX0tA", + "id": "AstraDBGraph-OBH6o", "inputTypes": [ "Embeddings" ], "type": "other" } }, - "id": "xy-edge__OpenAIEmbeddings-fcwMC{œdataTypeœ:œOpenAIEmbeddingsœ,œidœ:œOpenAIEmbeddings-fcwMCœ,œnameœ:œembeddingsœ,œoutput_typesœ:[œEmbeddingsœ]}-AstraDBGraph-xJiDN{œfieldNameœ:œembedding_modelœ,œidœ:œAstraDBGraph-xJiDNœ,œinputTypesœ:[œEmbeddingsœ],œtypeœ:œotherœ}", - "source": "OpenAIEmbeddings-fcwMC", - "sourceHandle": "{œdataTypeœ: œOpenAIEmbeddingsœ, œidœ: œOpenAIEmbeddings-fcwMCœ, œnameœ: œembeddingsœ, œoutput_typesœ: [œEmbeddingsœ]}", - "target": "AstraDBGraph-xJiDN", - "targetHandle": "{œfieldNameœ: œembedding_modelœ, œidœ: œAstraDBGraph-FX0tAœ, œinputTypesœ: [œEmbeddingsœ], œtypeœ: œotherœ}" - }, - { - "data": { - "sourceHandle": { - "dataType": "AstraDBGraph", - "id": "AstraDBGraph-xJiDN", - "name": "search_results", - "output_types": [ - "Data" - ] - }, - "targetHandle": { - "fieldName": "data", - "id": "ParseData-alciW", - "inputTypes": [ - "Data" - ], - "type": "other" - } - }, - "id": "xy-edge__AstraDBGraph-xJiDN{œdataTypeœ:œAstraDBGraphœ,œidœ:œAstraDBGraph-xJiDNœ,œnameœ:œsearch_resultsœ,œoutput_typesœ:[œDataœ]}-ParseData-alciW{œfieldNameœ:œdataœ,œidœ:œParseData-alciWœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", - "source": "AstraDBGraph-xJiDN", - "sourceHandle": "{œdataTypeœ: œAstraDBGraphœ, œidœ: œAstraDBGraph-xJiDNœ, œnameœ: œsearch_resultsœ, œoutput_typesœ: [œDataœ]}", - "target": "ParseData-alciW", - "targetHandle": "{œfieldNameœ: œdataœ, œidœ: œParseData-alciWœ, œinputTypesœ: [œDataœ], œtypeœ: œotherœ}" - }, - { - "data": { - "sourceHandle": { - "dataType": "OpenAIEmbeddings", - "id": "OpenAIEmbeddings-XKhhV", - "name": "embeddings", - "output_types": [ - "Embeddings" - ] - }, - "targetHandle": { - "fieldName": "embedding_model", - "id": "AstraDBGraph-uza6S", - "inputTypes": [ - "Embeddings" - ], - "type": "other" - } - }, - "id": "xy-edge__OpenAIEmbeddings-XKhhV{œdataTypeœ:œOpenAIEmbeddingsœ,œidœ:œOpenAIEmbeddings-XKhhVœ,œnameœ:œembeddingsœ,œoutput_typesœ:[œEmbeddingsœ]}-AstraDBGraph-uza6S{œfieldNameœ:œembedding_modelœ,œidœ:œAstraDBGraph-uza6Sœ,œinputTypesœ:[œEmbeddingsœ],œtypeœ:œotherœ}", - "source": "OpenAIEmbeddings-XKhhV", - "sourceHandle": "{œdataTypeœ: œOpenAIEmbeddingsœ, œidœ: œOpenAIEmbeddings-XKhhVœ, œnameœ: œembeddingsœ, œoutput_typesœ: [œEmbeddingsœ]}", - "target": "AstraDBGraph-uza6S", - "targetHandle": "{œfieldNameœ: œembedding_modelœ, œidœ: œAstraDBGraph-uza6Sœ, œinputTypesœ: [œEmbeddingsœ], œtypeœ: œotherœ}" + "id": "reactflow__edge-OpenAIEmbeddings-RD7F8{œdataTypeœ:œOpenAIEmbeddingsœ,œidœ:œOpenAIEmbeddings-RD7F8œ,œnameœ:œembeddingsœ,œoutput_typesœ:[œEmbeddingsœ]}-AstraDBGraph-OBH6o{œfieldNameœ:œembedding_modelœ,œidœ:œAstraDBGraph-OBH6oœ,œinputTypesœ:[œEmbeddingsœ],œtypeœ:œotherœ}", + "selected": false, + "source": "OpenAIEmbeddings-RD7F8", + "sourceHandle": "{œdataTypeœ: œOpenAIEmbeddingsœ, œidœ: œOpenAIEmbeddings-RD7F8œ, œnameœ: œembeddingsœ, œoutput_typesœ: [œEmbeddingsœ]}", + "target": "AstraDBGraph-OBH6o", + "targetHandle": "{œfieldNameœ: œembedding_modelœ, œidœ: œAstraDBGraph-OBH6oœ, œinputTypesœ: [œEmbeddingsœ], œtypeœ: œotherœ}" }, { + "animated": false, + "className": "", "data": { "sourceHandle": { "dataType": "HtmlLinkExtractor", - "id": "HtmlLinkExtractor-LWuvQ", + "id": "HtmlLinkExtractor-I8rzh", "name": "data", "output_types": [ "Data" @@ -369,325 +244,80 @@ }, "targetHandle": { "fieldName": "ingest_data", - "id": "AstraDBGraph-uza6S", + "id": "AstraDBGraph-OBH6o", "inputTypes": [ "Data" ], "type": "other" } }, - "id": "xy-edge__HtmlLinkExtractor-LWuvQ{œdataTypeœ:œHtmlLinkExtractorœ,œidœ:œHtmlLinkExtractor-LWuvQœ,œnameœ:œdataœ,œoutput_typesœ:[œDataœ]}-AstraDBGraph-uza6S{œfieldNameœ:œingest_dataœ,œidœ:œAstraDBGraph-uza6Sœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", - "source": "HtmlLinkExtractor-LWuvQ", - "sourceHandle": "{œdataTypeœ: œHtmlLinkExtractorœ, œidœ: œHtmlLinkExtractor-LWuvQœ, œnameœ: œdataœ, œoutput_typesœ: [œDataœ]}", - "target": "AstraDBGraph-uza6S", - "targetHandle": "{œfieldNameœ: œingest_dataœ, œidœ: œAstraDBGraph-uza6Sœ, œinputTypesœ: [œDataœ], œtypeœ: œotherœ}" + "id": "reactflow__edge-HtmlLinkExtractor-I8rzh{œdataTypeœ:œHtmlLinkExtractorœ,œidœ:œHtmlLinkExtractor-I8rzhœ,œnameœ:œdataœ,œoutput_typesœ:[œDataœ]}-AstraDBGraph-OBH6o{œfieldNameœ:œingest_dataœ,œidœ:œAstraDBGraph-OBH6oœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", + "selected": false, + "source": "HtmlLinkExtractor-I8rzh", + "sourceHandle": "{œdataTypeœ: œHtmlLinkExtractorœ, œidœ: œHtmlLinkExtractor-I8rzhœ, œnameœ: œdataœ, œoutput_typesœ: [œDataœ]}", + "target": "AstraDBGraph-OBH6o", + "targetHandle": "{œfieldNameœ: œingest_dataœ, œidœ: œAstraDBGraph-OBH6oœ, œinputTypesœ: [œDataœ], œtypeœ: œotherœ}" + }, + { + "animated": false, + "data": { + "sourceHandle": { + "dataType": "ChatInput", + "id": "ChatInput-2dZuD", + "name": "message", + "output_types": [ + "Message" + ] + }, + "targetHandle": { + "fieldName": "search_query", + "id": "AstraDBGraph-WdeLY", + "inputTypes": [ + "Message" + ], + "type": "str" + } + }, + "id": "xy-edge__ChatInput-2dZuD{œdataTypeœ:œChatInputœ,œidœ:œChatInput-2dZuDœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-AstraDBGraph-WdeLY{œfieldNameœ:œsearch_queryœ,œidœ:œAstraDBGraph-WdeLYœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "selected": false, + "source": "ChatInput-2dZuD", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-2dZuDœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "AstraDBGraph-WdeLY", + "targetHandle": "{œfieldNameœ: œsearch_queryœ, œidœ: œAstraDBGraph-WdeLYœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + }, + { + "animated": false, + "data": { + "sourceHandle": { + "dataType": "ChatInput", + "id": "ChatInput-2dZuD", + "name": "message", + "output_types": [ + "Message" + ] + }, + "targetHandle": { + "fieldName": "question", + "id": "Prompt-KZb70", + "inputTypes": [ + "Message", + "Text" + ], + "type": "str" + } + }, + "id": "xy-edge__ChatInput-2dZuD{œdataTypeœ:œChatInputœ,œidœ:œChatInput-2dZuDœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Prompt-KZb70{œfieldNameœ:œquestionœ,œidœ:œPrompt-KZb70œ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "selected": false, + "source": "ChatInput-2dZuD", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-2dZuDœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-KZb70", + "targetHandle": "{œfieldNameœ: œquestionœ, œidœ: œPrompt-KZb70œ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" } ], "nodes": [ { "data": { - "id": "ChatInput-DA114", - "node": { - "base_classes": [ - "Message" - ], - "beta": false, - "conditional_paths": [], - "custom_fields": {}, - "description": "Get chat inputs from the Playground.", - "display_name": "Chat Input", - "documentation": "", - "edited": false, - "field_order": [ - "input_value", - "should_store_message", - "sender", - "sender_name", - "session_id", - "files", - "background_color", - "chat_icon", - "text_color" - ], - "frozen": false, - "icon": "MessagesSquare", - "legacy": false, - "lf_version": "1.1.1", - "metadata": {}, - "output_types": [], - "outputs": [ - { - "allows_loop": false, - "cache": true, - "display_name": "Message", - "method": "message_response", - "name": "message", - "selected": "Message", - "tool_mode": true, - "types": [ - "Message" - ], - "value": "__UNDEFINED__" - } - ], - "pinned": false, - "template": { - "_type": "Component", - "background_color": { - "_input_type": "MessageTextInput", - "advanced": true, - "display_name": "Background Color", - "dynamic": false, - "info": "The background color of the icon.", - "input_types": [ - "Message" - ], - "list": false, - "load_from_db": false, - "name": "background_color", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "chat_icon": { - "_input_type": "MessageTextInput", - "advanced": true, - "display_name": "Icon", - "dynamic": false, - "info": "The icon of the message.", - "input_types": [ - "Message" - ], - "list": false, - "load_from_db": false, - "name": "chat_icon", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "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.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n" - }, - "files": { - "_input_type": "FileInput", - "advanced": true, - "display_name": "Files", - "dynamic": false, - "fileTypes": [ - "txt", - "md", - "mdx", - "csv", - "json", - "yaml", - "yml", - "xml", - "html", - "htm", - "pdf", - "docx", - "py", - "sh", - "sql", - "js", - "ts", - "tsx", - "jpg", - "jpeg", - "png", - "bmp", - "image" - ], - "file_path": "", - "info": "Files to be sent with the message.", - "list": true, - "name": "files", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "trace_as_metadata": true, - "type": "file", - "value": "" - }, - "input_value": { - "_input_type": "MultilineInput", - "advanced": false, - "display_name": "Text", - "dynamic": false, - "info": "Message to be passed as input.", - "input_types": [], - "list": false, - "load_from_db": false, - "multiline": true, - "name": "input_value", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "How does Haskell handle function composition and what are some practical examples of its use?" - }, - "sender": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "display_name": "Sender Type", - "dynamic": false, - "info": "Type of sender.", - "name": "sender", - "options": [ - "Machine", - "User" - ], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "User" - }, - "sender_name": { - "_input_type": "MessageTextInput", - "advanced": true, - "display_name": "Sender Name", - "dynamic": false, - "info": "Name of the sender.", - "input_types": [ - "Message" - ], - "list": false, - "load_from_db": false, - "name": "sender_name", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "User" - }, - "session_id": { - "_input_type": "MessageTextInput", - "advanced": true, - "display_name": "Session ID", - "dynamic": false, - "info": "The session ID of the chat. If empty, the current session ID parameter will be used.", - "input_types": [ - "Message" - ], - "list": false, - "load_from_db": false, - "name": "session_id", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "should_store_message": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Store Messages", - "dynamic": false, - "info": "Store the message in the history.", - "list": false, - "name": "should_store_message", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "trace_as_metadata": true, - "type": "bool", - "value": true - }, - "text_color": { - "_input_type": "MessageTextInput", - "advanced": true, - "display_name": "Text Color", - "dynamic": false, - "info": "The text color of the name", - "input_types": [ - "Message" - ], - "list": false, - "load_from_db": false, - "name": "text_color", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "" - } - }, - "tool_mode": false - }, - "type": "ChatInput" - }, - "dragging": false, - "height": 233, - "id": "ChatInput-DA114", - "measured": { - "height": 233, - "width": 360 - }, - "position": { - "x": -1800.3752844686821, - "y": 7028.578266524353 - }, - "positionAbsolute": { - "x": -1516.4270244619845, - "y": 6211.967942125529 - }, - "selected": false, - "type": "genericNode", - "width": 320 - }, - { - "data": { - "id": "OpenAIEmbeddings-fcwMC", + "id": "OpenAIEmbeddings-Z4ej5", "node": { "base_classes": [ "Embeddings" @@ -987,7 +617,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": "OPENAI_API_KEY" }, "openai_api_type": { "_input_type": "MessageTextInput", @@ -1170,10 +800,10 @@ }, "dragging": false, "height": 320, - "id": "OpenAIEmbeddings-fcwMC", + "id": "OpenAIEmbeddings-Z4ej5", "measured": { "height": 320, - "width": 360 + "width": 320 }, "position": { "x": -1794.2005649575194, @@ -1191,7 +821,7 @@ "data": { "description": "Implementation of Graph Vector Store using Astra DB", "display_name": "Astra DB Graph", - "id": "AstraDBGraph-jr8pY", + "id": "AstraDBGraph-WdeLY", "node": { "base_classes": [ "Data" @@ -1280,7 +910,7 @@ "input_types": [ "Message" ], - "load_from_db": false, + "load_from_db": true, "name": "api_endpoint", "password": true, "placeholder": "", @@ -1713,7 +1343,7 @@ "input_types": [ "Message" ], - "load_from_db": false, + "load_from_db": true, "name": "token", "password": true, "placeholder": "", @@ -1729,9 +1359,9 @@ "type": "AstraDBGraph" }, "dragging": false, - "id": "AstraDBGraph-jr8pY", + "id": "AstraDBGraph-WdeLY", "measured": { - "height": 631, + "height": 634, "width": 320 }, "position": { @@ -1745,7 +1375,7 @@ "data": { "description": "Convert Data into plain text following a specified template.", "display_name": "Parse Data", - "id": "ParseData-alciW", + "id": "ParseData-s05ib", "node": { "base_classes": [ "Data", @@ -1889,10 +1519,10 @@ "type": "ParseData" }, "dragging": false, - "id": "ParseData-alciW", + "id": "ParseData-s05ib", "measured": { - "height": 383, - "width": 360 + "height": 342, + "width": 320 }, "position": { "x": -711.6072978271402, @@ -1903,7 +1533,7 @@ }, { "data": { - "id": "Prompt-rmO8w", + "id": "Prompt-KZb70", "node": { "base_classes": [ "Message" @@ -2058,10 +1688,10 @@ "type": "Prompt" }, "dragging": false, - "id": "Prompt-rmO8w", + "id": "Prompt-KZb70", "measured": { - "height": 448, - "width": 360 + "height": 421, + "width": 320 }, "position": { "x": -241.95389238895368, @@ -2072,7 +1702,7 @@ }, { "data": { - "id": "OpenAIModel-LnWKb", + "id": "OpenAIModel-hhsjV", "node": { "base_classes": [ "LanguageModel", @@ -2417,10 +2047,10 @@ "type": "OpenAIModel" }, "dragging": false, - "id": "OpenAIModel-LnWKb", + "id": "OpenAIModel-hhsjV", "measured": { - "height": 734, - "width": 360 + "height": 656, + "width": 320 }, "position": { "x": 317.8221390146513, @@ -2431,7 +2061,7 @@ }, { "data": { - "id": "ChatOutput-KIkbc", + "id": "ChatOutput-yHZfU", "node": { "base_classes": [ "Message" @@ -2712,10 +2342,10 @@ "type": "ChatOutput" }, "dragging": false, - "id": "ChatOutput-KIkbc", + "id": "ChatOutput-yHZfU", "measured": { - "height": 257, - "width": 360 + "height": 230, + "width": 320 }, "position": { "x": 804.9181649370599, @@ -2726,7 +2356,7 @@ }, { "data": { - "id": "URL-qOh1r", + "id": "URL-eBpyO", "node": { "base_classes": [ "Data", @@ -2918,573 +2548,21 @@ "type": "URL" }, "dragging": false, - "id": "URL-qOh1r", + "id": "URL-eBpyO", "measured": { - "height": 1194, - "width": 360 - }, - "position": { - "x": -1742.8952423980936, - "y": 5868.349789218463 - }, - "selected": false, - "type": "genericNode" - }, - { - "data": { - "id": "LanguageRecursiveTextSplitter-KDtC3", - "node": { - "base_classes": [ - "Data" - ], - "beta": false, - "category": "vectorstores", - "conditional_paths": [], - "custom_fields": {}, - "description": "Implementation of Graph Vector Store using Astra DB", - "display_name": "Astra DB Graph", - "documentation": "", - "edited": false, - "field_order": [ - "token", - "api_endpoint", - "collection_name", - "metadata_incoming_links_key", - "search_query", - "ingest_data", - "keyspace", - "embedding_model", - "metric", - "batch_size", - "bulk_insert_batch_concurrency", - "bulk_insert_overwrite_concurrency", - "bulk_delete_concurrency", - "setup_mode", - "pre_delete_collection", - "metadata_indexing_include", - "metadata_indexing_exclude", - "collection_indexing_policy", - "number_of_results", - "search_type", - "search_score_threshold", - "search_filter" - ], - "frozen": false, - "icon": "AstraDB", - "key": "AstraDBGraph", - "legacy": false, - "lf_version": "1.1.1", - "metadata": {}, - "minimized": false, - "output_types": [], - "outputs": [ - { - "allows_loop": false, - "cache": true, - "display_name": "Search Results", - "method": "search_documents", - "name": "search_results", - "required_inputs": [ - "api_endpoint", - "collection_name", - "token" - ], - "selected": "Data", - "tool_mode": true, - "types": [ - "Data" - ], - "value": "__UNDEFINED__" - }, - { - "allows_loop": false, - "cache": true, - "display_name": "DataFrame", - "method": "as_dataframe", - "name": "dataframe", - "required_inputs": [], - "selected": "DataFrame", - "tool_mode": true, - "types": [ - "DataFrame" - ], - "value": "__UNDEFINED__" - } - ], - "pinned": false, - "score": 0.13582020910317566, - "template": { - "_type": "Component", - "api_endpoint": { - "_input_type": "SecretStrInput", - "advanced": false, - "display_name": "API Endpoint", - "dynamic": false, - "info": "API endpoint URL for the Astra DB service.", - "input_types": [ - "Message" - ], - "load_from_db": false, - "name": "api_endpoint", - "password": true, - "placeholder": "", - "required": true, - "show": true, - "title_case": false, - "type": "str", - "value": "ASTRA_DB_API_ENDPOINT" - }, - "batch_size": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Batch Size", - "dynamic": false, - "info": "Optional number of data to process in a single batch.", - "list": false, - "name": "batch_size", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": "" - }, - "bulk_delete_concurrency": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Bulk Delete Concurrency", - "dynamic": false, - "info": "Optional concurrency level for bulk delete operations.", - "list": false, - "name": "bulk_delete_concurrency", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": "" - }, - "bulk_insert_batch_concurrency": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Bulk Insert Batch Concurrency", - "dynamic": false, - "info": "Optional concurrency level for bulk insert operations.", - "list": false, - "name": "bulk_insert_batch_concurrency", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": "" - }, - "bulk_insert_overwrite_concurrency": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Bulk Insert Overwrite Concurrency", - "dynamic": false, - "info": "Optional concurrency level for bulk insert operations that overwrite existing data.", - "list": false, - "name": "bulk_insert_overwrite_concurrency", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": "" - }, - "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": "import os\n\nimport orjson\nfrom astrapy.admin import parse_api_endpoint\n\nfrom langflow.base.vectorstores.model import LCVectorStoreComponent, check_cached_vector_store\nfrom langflow.helpers import docs_to_data\nfrom langflow.inputs import (\n BoolInput,\n DictInput,\n DropdownInput,\n FloatInput,\n HandleInput,\n IntInput,\n SecretStrInput,\n StrInput,\n)\nfrom langflow.schema import Data\n\n\nclass AstraDBGraphVectorStoreComponent(LCVectorStoreComponent):\n display_name: str = \"Astra DB Graph\"\n description: str = \"Implementation of Graph Vector Store using Astra DB\"\n name = \"AstraDBGraph\"\n icon: str = \"AstraDB\"\n\n inputs = [\n SecretStrInput(\n name=\"token\",\n display_name=\"Astra DB Application Token\",\n info=\"Authentication token for accessing Astra DB.\",\n value=\"ASTRA_DB_APPLICATION_TOKEN\",\n required=True,\n advanced=os.getenv(\"ASTRA_ENHANCED\", \"false\").lower() == \"true\",\n ),\n SecretStrInput(\n name=\"api_endpoint\",\n display_name=\"Database\" if os.getenv(\"ASTRA_ENHANCED\", \"false\").lower() == \"true\" else \"API Endpoint\",\n info=\"API endpoint URL for the Astra DB service.\",\n value=\"ASTRA_DB_API_ENDPOINT\",\n required=True,\n ),\n StrInput(\n name=\"collection_name\",\n display_name=\"Collection Name\",\n info=\"The name of the collection within Astra DB where the vectors will be stored.\",\n required=True,\n ),\n StrInput(\n name=\"metadata_incoming_links_key\",\n display_name=\"Metadata incoming links key\",\n info=\"Metadata key used for incoming links.\",\n advanced=True,\n ),\n *LCVectorStoreComponent.inputs,\n StrInput(\n name=\"keyspace\",\n display_name=\"Keyspace\",\n info=\"Optional keyspace within Astra DB to use for the collection.\",\n advanced=True,\n ),\n HandleInput(\n name=\"embedding_model\",\n display_name=\"Embedding Model\",\n input_types=[\"Embeddings\"],\n info=\"Allows an embedding model configuration.\",\n ),\n DropdownInput(\n name=\"metric\",\n display_name=\"Metric\",\n info=\"Optional distance metric for vector comparisons in the vector store.\",\n options=[\"cosine\", \"dot_product\", \"euclidean\"],\n value=\"cosine\",\n advanced=True,\n ),\n IntInput(\n name=\"batch_size\",\n display_name=\"Batch Size\",\n info=\"Optional number of data to process in a single batch.\",\n advanced=True,\n ),\n IntInput(\n name=\"bulk_insert_batch_concurrency\",\n display_name=\"Bulk Insert Batch Concurrency\",\n info=\"Optional concurrency level for bulk insert operations.\",\n advanced=True,\n ),\n IntInput(\n name=\"bulk_insert_overwrite_concurrency\",\n display_name=\"Bulk Insert Overwrite Concurrency\",\n info=\"Optional concurrency level for bulk insert operations that overwrite existing data.\",\n advanced=True,\n ),\n IntInput(\n name=\"bulk_delete_concurrency\",\n display_name=\"Bulk Delete Concurrency\",\n info=\"Optional concurrency level for bulk delete operations.\",\n advanced=True,\n ),\n DropdownInput(\n name=\"setup_mode\",\n display_name=\"Setup Mode\",\n info=\"Configuration mode for setting up the vector store, with options like 'Sync', or 'Off'.\",\n options=[\"Sync\", \"Off\"],\n advanced=True,\n value=\"Sync\",\n ),\n BoolInput(\n name=\"pre_delete_collection\",\n display_name=\"Pre Delete Collection\",\n info=\"Boolean flag to determine whether to delete the collection before creating a new one.\",\n advanced=True,\n value=False,\n ),\n StrInput(\n name=\"metadata_indexing_include\",\n display_name=\"Metadata Indexing Include\",\n info=\"Optional list of metadata fields to include in the indexing.\",\n advanced=True,\n list=True,\n ),\n StrInput(\n name=\"metadata_indexing_exclude\",\n display_name=\"Metadata Indexing Exclude\",\n info=\"Optional list of metadata fields to exclude from the indexing.\",\n advanced=True,\n list=True,\n ),\n StrInput(\n name=\"collection_indexing_policy\",\n display_name=\"Collection Indexing Policy\",\n info='Optional JSON string for the \"indexing\" field of the collection. '\n \"See https://docs.datastax.com/en/astra-db-serverless/api-reference/collections.html#the-indexing-option\",\n advanced=True,\n ),\n IntInput(\n name=\"number_of_results\",\n display_name=\"Number of Results\",\n info=\"Number of results to return.\",\n advanced=True,\n value=4,\n ),\n DropdownInput(\n name=\"search_type\",\n display_name=\"Search Type\",\n info=\"Search type to use\",\n options=[\n \"Similarity\",\n \"Similarity with score threshold\",\n \"MMR (Max Marginal Relevance)\",\n \"Graph Traversal\",\n \"MMR (Max Marginal Relevance) Graph Traversal\",\n ],\n value=\"MMR (Max Marginal Relevance) Graph Traversal\",\n advanced=True,\n ),\n FloatInput(\n name=\"search_score_threshold\",\n display_name=\"Search Score Threshold\",\n info=\"Minimum similarity score threshold for search results. \"\n \"(when using 'Similarity with score threshold')\",\n value=0,\n advanced=True,\n ),\n DictInput(\n name=\"search_filter\",\n display_name=\"Search Metadata Filter\",\n info=\"Optional dictionary of filters to apply to the search query.\",\n advanced=True,\n is_list=True,\n ),\n ]\n\n @check_cached_vector_store\n def build_vector_store(self):\n try:\n from langchain_astradb import AstraDBGraphVectorStore\n from langchain_astradb.utils.astradb import SetupMode\n except ImportError as e:\n msg = (\n \"Could not import langchain Astra DB integration package. \"\n \"Please install it with `pip install langchain-astradb`.\"\n )\n raise ImportError(msg) from e\n\n try:\n if not self.setup_mode:\n self.setup_mode = self._inputs[\"setup_mode\"].options[0]\n\n setup_mode_value = SetupMode[self.setup_mode.upper()]\n except KeyError as e:\n msg = f\"Invalid setup mode: {self.setup_mode}\"\n raise ValueError(msg) from e\n\n try:\n self.log(f\"Initializing Graph Vector Store {self.collection_name}\")\n\n vector_store = AstraDBGraphVectorStore(\n embedding=self.embedding_model,\n collection_name=self.collection_name,\n metadata_incoming_links_key=self.metadata_incoming_links_key or \"incoming_links\",\n token=self.token,\n api_endpoint=self.api_endpoint,\n namespace=self.keyspace or None,\n environment=parse_api_endpoint(self.api_endpoint).environment if self.api_endpoint else None,\n metric=self.metric or None,\n batch_size=self.batch_size or None,\n bulk_insert_batch_concurrency=self.bulk_insert_batch_concurrency or None,\n bulk_insert_overwrite_concurrency=self.bulk_insert_overwrite_concurrency or None,\n bulk_delete_concurrency=self.bulk_delete_concurrency or None,\n setup_mode=setup_mode_value,\n pre_delete_collection=self.pre_delete_collection,\n metadata_indexing_include=[s for s in self.metadata_indexing_include if s] or None,\n metadata_indexing_exclude=[s for s in self.metadata_indexing_exclude if s] or None,\n collection_indexing_policy=orjson.loads(self.collection_indexing_policy.encode(\"utf-8\"))\n if self.collection_indexing_policy\n else None,\n )\n except Exception as e:\n msg = f\"Error initializing AstraDBGraphVectorStore: {e}\"\n raise ValueError(msg) from e\n\n self.log(f\"Vector Store initialized: {vector_store.astra_env.collection_name}\")\n self._add_documents_to_vector_store(vector_store)\n\n return vector_store\n\n def _add_documents_to_vector_store(self, vector_store) -> None:\n documents = []\n for _input in self.ingest_data or []:\n if isinstance(_input, Data):\n documents.append(_input.to_lc_document())\n else:\n msg = \"Vector Store Inputs must be Data objects.\"\n raise TypeError(msg)\n\n if documents:\n self.log(f\"Adding {len(documents)} documents to the Vector Store.\")\n try:\n vector_store.add_documents(documents)\n except Exception as e:\n msg = f\"Error adding documents to AstraDBGraphVectorStore: {e}\"\n raise ValueError(msg) from e\n else:\n self.log(\"No documents to add to the Vector Store.\")\n\n def _map_search_type(self) -> str:\n match self.search_type:\n case \"Similarity\":\n return \"similarity\"\n case \"Similarity with score threshold\":\n return \"similarity_score_threshold\"\n case \"MMR (Max Marginal Relevance)\":\n return \"mmr\"\n case \"Graph Traversal\":\n return \"traversal\"\n case \"MMR (Max Marginal Relevance) Graph Traversal\":\n return \"mmr_traversal\"\n case _:\n return \"similarity\"\n\n def _build_search_args(self):\n args = {\n \"k\": self.number_of_results,\n \"score_threshold\": self.search_score_threshold,\n }\n\n if self.search_filter:\n clean_filter = {k: v for k, v in self.search_filter.items() if k and v}\n if len(clean_filter) > 0:\n args[\"filter\"] = clean_filter\n return args\n\n def search_documents(self, vector_store=None) -> list[Data]:\n if not vector_store:\n vector_store = self.build_vector_store()\n\n self.log(\"Searching for documents in AstraDBGraphVectorStore.\")\n self.log(f\"Search query: {self.search_query}\")\n self.log(f\"Search type: {self.search_type}\")\n self.log(f\"Number of results: {self.number_of_results}\")\n\n if self.search_query and isinstance(self.search_query, str) and self.search_query.strip():\n try:\n search_type = self._map_search_type()\n search_args = self._build_search_args()\n\n docs = vector_store.search(query=self.search_query, search_type=search_type, **search_args)\n\n # Drop links from the metadata. At this point the links don't add any value for building the\n # context and haven't been restored to json which causes the conversion to fail.\n self.log(\"Removing links from metadata.\")\n for doc in docs:\n if \"links\" in doc.metadata:\n doc.metadata.pop(\"links\")\n\n except Exception as e:\n msg = f\"Error performing search in AstraDBGraphVectorStore: {e}\"\n raise ValueError(msg) from e\n\n self.log(f\"Retrieved documents: {len(docs)}\")\n\n data = docs_to_data(docs)\n\n self.log(f\"Converted documents to data: {len(data)}\")\n\n self.status = data\n return data\n self.log(\"No search input provided. Skipping search.\")\n return []\n\n def get_retriever_kwargs(self):\n search_args = self._build_search_args()\n return {\n \"search_type\": self._map_search_type(),\n \"search_kwargs\": search_args,\n }\n" - }, - "collection_indexing_policy": { - "_input_type": "StrInput", - "advanced": true, - "display_name": "Collection Indexing Policy", - "dynamic": false, - "info": "Optional JSON string for the \"indexing\" field of the collection. See https://docs.datastax.com/en/astra-db-serverless/api-reference/collections.html#the-indexing-option", - "list": false, - "load_from_db": false, - "name": "collection_indexing_policy", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "collection_name": { - "_input_type": "StrInput", - "advanced": false, - "display_name": "Collection Name", - "dynamic": false, - "info": "The name of the collection within Astra DB where the vectors will be stored.", - "list": false, - "load_from_db": false, - "name": "collection_name", - "placeholder": "", - "required": true, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "haskell_chunked" - }, - "embedding_model": { - "_input_type": "HandleInput", - "advanced": false, - "display_name": "Embedding Model", - "dynamic": false, - "info": "Allows an embedding model configuration.", - "input_types": [ - "Embeddings" - ], - "list": false, - "name": "embedding_model", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "trace_as_metadata": true, - "type": "other", - "value": "" - }, - "ingest_data": { - "_input_type": "DataInput", - "advanced": false, - "display_name": "Ingest Data", - "dynamic": false, - "info": "", - "input_types": [ - "Data" - ], - "list": false, - "name": "ingest_data", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "other", - "value": "" - }, - "keyspace": { - "_input_type": "StrInput", - "advanced": true, - "display_name": "Keyspace", - "dynamic": false, - "info": "Optional keyspace within Astra DB to use for the collection.", - "list": false, - "load_from_db": false, - "name": "keyspace", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "metadata_incoming_links_key": { - "_input_type": "StrInput", - "advanced": true, - "display_name": "Metadata incoming links key", - "dynamic": false, - "info": "Metadata key used for incoming links.", - "list": false, - "load_from_db": false, - "name": "metadata_incoming_links_key", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "metadata_indexing_exclude": { - "_input_type": "StrInput", - "advanced": true, - "display_name": "Metadata Indexing Exclude", - "dynamic": false, - "info": "Optional list of metadata fields to exclude from the indexing.", - "list": true, - "load_from_db": false, - "name": "metadata_indexing_exclude", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "metadata_indexing_include": { - "_input_type": "StrInput", - "advanced": true, - "display_name": "Metadata Indexing Include", - "dynamic": false, - "info": "Optional list of metadata fields to include in the indexing.", - "list": true, - "load_from_db": false, - "name": "metadata_indexing_include", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "metric": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "display_name": "Metric", - "dynamic": false, - "info": "Optional distance metric for vector comparisons in the vector store.", - "name": "metric", - "options": [ - "cosine", - "dot_product", - "euclidean" - ], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "cosine" - }, - "number_of_results": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Number of Results", - "dynamic": false, - "info": "Number of results to return.", - "list": false, - "name": "number_of_results", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": 4 - }, - "pre_delete_collection": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Pre Delete Collection", - "dynamic": false, - "info": "Boolean flag to determine whether to delete the collection before creating a new one.", - "list": false, - "name": "pre_delete_collection", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": true - }, - "search_filter": { - "_input_type": "DictInput", - "advanced": true, - "display_name": "Search Metadata Filter", - "dynamic": false, - "info": "Optional dictionary of filters to apply to the search query.", - "list": true, - "name": "search_filter", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "type": "dict", - "value": {} - }, - "search_query": { - "_input_type": "MultilineInput", - "advanced": false, - "display_name": "Search Query", - "dynamic": false, - "info": "", - "input_types": [ - "Message" - ], - "list": false, - "load_from_db": false, - "multiline": true, - "name": "search_query", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": true, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "search_score_threshold": { - "_input_type": "FloatInput", - "advanced": true, - "display_name": "Search Score Threshold", - "dynamic": false, - "info": "Minimum similarity score threshold for search results. (when using 'Similarity with score threshold')", - "list": false, - "name": "search_score_threshold", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "float", - "value": 0 - }, - "search_type": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "display_name": "Search Type", - "dynamic": false, - "info": "Search type to use", - "name": "search_type", - "options": [ - "Similarity", - "Similarity with score threshold", - "MMR (Max Marginal Relevance)", - "Graph Traversal", - "MMR (Max Marginal Relevance) Graph Traversal" - ], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "MMR (Max Marginal Relevance) Graph Traversal" - }, - "setup_mode": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "display_name": "Setup Mode", - "dynamic": false, - "info": "Configuration mode for setting up the vector store, with options like 'Sync', or 'Off'.", - "name": "setup_mode", - "options": [ - "Sync", - "Off" - ], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "Sync" - }, - "should_cache_vector_store": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Cache Vector Store", - "dynamic": false, - "info": "If True, the vector store will be cached for the current build of the component. This is useful for components that have multiple output methods and want to share the same vector store.", - "list": false, - "list_add_label": "Add More", - "name": "should_cache_vector_store", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": true - }, - "token": { - "_input_type": "SecretStrInput", - "advanced": false, - "display_name": "Astra DB Application Token", - "dynamic": false, - "info": "Authentication token for accessing Astra DB.", - "input_types": [ - "Message" - ], - "load_from_db": false, - "name": "token", - "password": true, - "placeholder": "", - "required": true, - "show": true, - "title_case": false, - "type": "str", - "value": "ASTRA_DB_APPLICATION_TOKEN" - } - }, - "tool_mode": false - }, - "showNode": true, - "type": "AstraDBGraph" - }, - "dragging": false, - "id": "AstraDBGraph-FX0tA", - "measured": { - "height": 631, + "height": 1191, "width": 320 }, "position": { - "x": 16.3856689286402, - "y": 5909.200823867262 + "x": -1785.9330435348252, + "y": 5716.282891868678 }, "selected": false, "type": "genericNode" }, { "data": { - "id": "LanguageRecursiveTextSplitter-jefpx", + "id": "LanguageRecursiveTextSplitter-TG6vC", "node": { "base_classes": [ "Data" @@ -3657,10 +2735,10 @@ "type": "LanguageRecursiveTextSplitter" }, "dragging": false, - "id": "LanguageRecursiveTextSplitter-KDtC3", + "id": "LanguageRecursiveTextSplitter-TG6vC", "measured": { - "height": 513, - "width": 360 + "height": 459, + "width": 320 }, "position": { "x": -1312.6794416503267, @@ -3671,7 +2749,7 @@ }, { "data": { - "id": "HtmlLinkExtractor-LWuvQ", + "id": "HtmlLinkExtractor-I8rzh", "node": { "base_classes": [ "Data" @@ -3799,10 +2877,10 @@ "type": "HtmlLinkExtractor" }, "dragging": false, - "id": "HtmlLinkExtractor-LWuvQ", + "id": "HtmlLinkExtractor-I8rzh", "measured": { - "height": 354, - "width": 360 + "height": 317, + "width": 320 }, "position": { "x": -819.2825457919793, @@ -3813,7 +2891,7 @@ }, { "data": { - "id": "OpenAIEmbeddings-XKhhV", + "id": "OpenAIEmbeddings-RD7F8", "node": { "base_classes": [ "Embeddings" @@ -4121,7 +3199,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": "OPENAI_API_KEY" }, "openai_api_type": { "_input_type": "MessageTextInput", @@ -4308,10 +3386,10 @@ "type": "OpenAIEmbeddings" }, "dragging": false, - "id": "OpenAIEmbeddings-XKhhV", + "id": "OpenAIEmbeddings-RD7F8", "measured": { - "height": 349, - "width": 360 + "height": 312, + "width": 320 }, "position": { "x": -826.5880014143661, @@ -4322,7 +3400,7 @@ }, { "data": { - "id": "note-Nosro", + "id": "note-Ja6UE", "node": { "description": "## 📖 README\n\nLoad your data into a vector database with the 📚 **Load Data** flow, and then use your data as chat context with the 🐕 **Retriever** flow.\n\n**🚨 Add your OpenAI API key as a global variable to easily add it to all of the OpenAI components in this flow.** \n\n**Quick start**\n1. Run the 📚 **Load Data** flow.\n2. Run the 🐕 **Retriever** flow.\n\n**Next steps** \n\n- Experiment by changing the prompt and the loaded data to see how the bot's responses change. ", "display_name": "", @@ -4333,10 +3411,10 @@ }, "dragging": false, "height": 695, - "id": "note-Nosro", + "id": "note-Ja6UE", "measured": { "height": 695, - "width": 328 + "width": 325 }, "position": { "x": -2651.9749287591367, @@ -4349,7 +3427,7 @@ }, { "data": { - "id": "note-Cps5A", + "id": "note-MN3j2", "node": { "description": "## 📚 1. Load Data Flow\n\nRun this first! Load data multiple urls, and embed it into the vector database in a graph based format.\n\nClick ▶️ **Run component** on the **Astra DB Graph** component to load your data.\n\n* If you're using OSS Langflow, add your Astra DB Application Token to the Astra DB component.\n\n#### Next steps:\n Experiment by changing the prompt and the contextual data to see how the retrieval flow's responses change.", "display_name": "", @@ -4360,10 +3438,10 @@ }, "dragging": false, "height": 499, - "id": "note-Cps5A", + "id": "note-MN3j2", "measured": { "height": 499, - "width": 329 + "width": 326 }, "position": { "x": -2156.877891666127, @@ -4376,7 +3454,7 @@ }, { "data": { - "id": "note-VWvJC", + "id": "note-EZgYP", "node": { "description": "## 🐕 2. Retriever Flow\n\nThis flow answers your questions with contextual data retrieved from your vector database. using graph RAG.\n\nOpen the **Playground** and ask, \n\n```\nhow to create a function in Haskell ?\n```\n", "display_name": "", @@ -4386,10 +3464,10 @@ "type": "note" }, "dragging": false, - "id": "note-VWvJC", + "id": "note-EZgYP", "measured": { "height": 324, - "width": 328 + "width": 325 }, "position": { "x": -2255.4854518934735, @@ -4400,7 +3478,7 @@ }, { "data": { - "id": "AstraDBGraph-xJiDN", + "id": "AstraDBGraph-OBH6o", "node": { "base_classes": [ "Data", @@ -4501,7 +3579,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": "ASTRA_DB_API_ENDPOINT" }, "batch_size": { "_input_type": "IntInput", @@ -4629,7 +3707,7 @@ "tool_mode": false, "trace_as_metadata": true, "type": "str", - "value": "" + "value": "haskell_chunked" }, "embedding_model": { "_input_type": "HandleInput", @@ -4953,7 +4031,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": "ASTRA_DB_APPLICATION_TOKEN" } }, "tool_mode": false @@ -4962,586 +4040,10 @@ "type": "AstraDBGraph" }, "dragging": false, - "id": "AstraDBGraph-xJiDN", + "id": "AstraDBGraph-OBH6o", "measured": { - "height": 709, - "width": 360 - }, - "position": { - "x": -1289.3629248195448, - "y": 7017.257953990425 - }, - "selected": false, - "type": "genericNode" - }, - { - "data": { - "id": "AstraDBGraph-uza6S", - "node": { - "base_classes": [ - "Data", - "DataFrame" - ], - "beta": false, - "category": "vectorstores", - "conditional_paths": [], - "custom_fields": {}, - "description": "Implementation of Graph Vector Store using Astra DB", - "display_name": "Astra DB Graph", - "documentation": "", - "edited": false, - "field_order": [ - "token", - "api_endpoint", - "collection_name", - "metadata_incoming_links_key", - "ingest_data", - "search_query", - "should_cache_vector_store", - "keyspace", - "embedding_model", - "metric", - "batch_size", - "bulk_insert_batch_concurrency", - "bulk_insert_overwrite_concurrency", - "bulk_delete_concurrency", - "setup_mode", - "pre_delete_collection", - "metadata_indexing_include", - "metadata_indexing_exclude", - "collection_indexing_policy", - "number_of_results", - "search_type", - "search_score_threshold", - "search_filter" - ], - "frozen": false, - "icon": "AstraDB", - "key": "AstraDBGraph", - "legacy": false, - "metadata": {}, - "minimized": false, - "output_types": [], - "outputs": [ - { - "allows_loop": false, - "cache": true, - "display_name": "Search Results", - "method": "search_documents", - "name": "search_results", - "required_inputs": [ - "api_endpoint", - "collection_name", - "token" - ], - "selected": "Data", - "tool_mode": true, - "types": [ - "Data" - ], - "value": "__UNDEFINED__" - }, - { - "allows_loop": false, - "cache": true, - "display_name": "DataFrame", - "method": "as_dataframe", - "name": "dataframe", - "required_inputs": [], - "selected": "DataFrame", - "tool_mode": true, - "types": [ - "DataFrame" - ], - "value": "__UNDEFINED__" - } - ], - "pinned": false, - "score": 0.01857804455091699, - "template": { - "_type": "Component", - "api_endpoint": { - "_input_type": "SecretStrInput", - "advanced": false, - "display_name": "API Endpoint", - "dynamic": false, - "info": "API endpoint URL for the Astra DB service.", - "input_types": [ - "Message" - ], - "load_from_db": true, - "name": "api_endpoint", - "password": true, - "placeholder": "", - "required": true, - "show": true, - "title_case": false, - "type": "str", - "value": "" - }, - "batch_size": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Batch Size", - "dynamic": false, - "info": "Optional number of data to process in a single batch.", - "list": false, - "list_add_label": "Add More", - "name": "batch_size", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": "" - }, - "bulk_delete_concurrency": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Bulk Delete Concurrency", - "dynamic": false, - "info": "Optional concurrency level for bulk delete operations.", - "list": false, - "list_add_label": "Add More", - "name": "bulk_delete_concurrency", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": "" - }, - "bulk_insert_batch_concurrency": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Bulk Insert Batch Concurrency", - "dynamic": false, - "info": "Optional concurrency level for bulk insert operations.", - "list": false, - "list_add_label": "Add More", - "name": "bulk_insert_batch_concurrency", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": "" - }, - "bulk_insert_overwrite_concurrency": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Bulk Insert Overwrite Concurrency", - "dynamic": false, - "info": "Optional concurrency level for bulk insert operations that overwrite existing data.", - "list": false, - "list_add_label": "Add More", - "name": "bulk_insert_overwrite_concurrency", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": "" - }, - "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": "import os\n\nimport orjson\nfrom astrapy.admin import parse_api_endpoint\n\nfrom langflow.base.vectorstores.model import LCVectorStoreComponent, check_cached_vector_store\nfrom langflow.helpers import docs_to_data\nfrom langflow.inputs import (\n BoolInput,\n DictInput,\n DropdownInput,\n FloatInput,\n HandleInput,\n IntInput,\n SecretStrInput,\n StrInput,\n)\nfrom langflow.schema import Data\n\n\nclass AstraDBGraphVectorStoreComponent(LCVectorStoreComponent):\n display_name: str = \"Astra DB Graph\"\n description: str = \"Implementation of Graph Vector Store using Astra DB\"\n name = \"AstraDBGraph\"\n icon: str = \"AstraDB\"\n\n inputs = [\n SecretStrInput(\n name=\"token\",\n display_name=\"Astra DB Application Token\",\n info=\"Authentication token for accessing Astra DB.\",\n value=\"ASTRA_DB_APPLICATION_TOKEN\",\n required=True,\n advanced=os.getenv(\"ASTRA_ENHANCED\", \"false\").lower() == \"true\",\n ),\n SecretStrInput(\n name=\"api_endpoint\",\n display_name=\"Database\" if os.getenv(\"ASTRA_ENHANCED\", \"false\").lower() == \"true\" else \"API Endpoint\",\n info=\"API endpoint URL for the Astra DB service.\",\n value=\"ASTRA_DB_API_ENDPOINT\",\n required=True,\n ),\n StrInput(\n name=\"collection_name\",\n display_name=\"Collection Name\",\n info=\"The name of the collection within Astra DB where the vectors will be stored.\",\n required=True,\n ),\n StrInput(\n name=\"metadata_incoming_links_key\",\n display_name=\"Metadata incoming links key\",\n info=\"Metadata key used for incoming links.\",\n advanced=True,\n ),\n *LCVectorStoreComponent.inputs,\n StrInput(\n name=\"keyspace\",\n display_name=\"Keyspace\",\n info=\"Optional keyspace within Astra DB to use for the collection.\",\n advanced=True,\n ),\n HandleInput(\n name=\"embedding_model\",\n display_name=\"Embedding Model\",\n input_types=[\"Embeddings\"],\n info=\"Allows an embedding model configuration.\",\n ),\n DropdownInput(\n name=\"metric\",\n display_name=\"Metric\",\n info=\"Optional distance metric for vector comparisons in the vector store.\",\n options=[\"cosine\", \"dot_product\", \"euclidean\"],\n value=\"cosine\",\n advanced=True,\n ),\n IntInput(\n name=\"batch_size\",\n display_name=\"Batch Size\",\n info=\"Optional number of data to process in a single batch.\",\n advanced=True,\n ),\n IntInput(\n name=\"bulk_insert_batch_concurrency\",\n display_name=\"Bulk Insert Batch Concurrency\",\n info=\"Optional concurrency level for bulk insert operations.\",\n advanced=True,\n ),\n IntInput(\n name=\"bulk_insert_overwrite_concurrency\",\n display_name=\"Bulk Insert Overwrite Concurrency\",\n info=\"Optional concurrency level for bulk insert operations that overwrite existing data.\",\n advanced=True,\n ),\n IntInput(\n name=\"bulk_delete_concurrency\",\n display_name=\"Bulk Delete Concurrency\",\n info=\"Optional concurrency level for bulk delete operations.\",\n advanced=True,\n ),\n DropdownInput(\n name=\"setup_mode\",\n display_name=\"Setup Mode\",\n info=\"Configuration mode for setting up the vector store, with options like 'Sync', or 'Off'.\",\n options=[\"Sync\", \"Off\"],\n advanced=True,\n value=\"Sync\",\n ),\n BoolInput(\n name=\"pre_delete_collection\",\n display_name=\"Pre Delete Collection\",\n info=\"Boolean flag to determine whether to delete the collection before creating a new one.\",\n advanced=True,\n value=False,\n ),\n StrInput(\n name=\"metadata_indexing_include\",\n display_name=\"Metadata Indexing Include\",\n info=\"Optional list of metadata fields to include in the indexing.\",\n advanced=True,\n list=True,\n ),\n StrInput(\n name=\"metadata_indexing_exclude\",\n display_name=\"Metadata Indexing Exclude\",\n info=\"Optional list of metadata fields to exclude from the indexing.\",\n advanced=True,\n list=True,\n ),\n StrInput(\n name=\"collection_indexing_policy\",\n display_name=\"Collection Indexing Policy\",\n info='Optional JSON string for the \"indexing\" field of the collection. '\n \"See https://docs.datastax.com/en/astra-db-serverless/api-reference/collections.html#the-indexing-option\",\n advanced=True,\n ),\n IntInput(\n name=\"number_of_results\",\n display_name=\"Number of Results\",\n info=\"Number of results to return.\",\n advanced=True,\n value=4,\n ),\n DropdownInput(\n name=\"search_type\",\n display_name=\"Search Type\",\n info=\"Search type to use\",\n options=[\n \"Similarity\",\n \"Similarity with score threshold\",\n \"MMR (Max Marginal Relevance)\",\n \"Graph Traversal\",\n \"MMR (Max Marginal Relevance) Graph Traversal\",\n ],\n value=\"MMR (Max Marginal Relevance) Graph Traversal\",\n advanced=True,\n ),\n FloatInput(\n name=\"search_score_threshold\",\n display_name=\"Search Score Threshold\",\n info=\"Minimum similarity score threshold for search results. \"\n \"(when using 'Similarity with score threshold')\",\n value=0,\n advanced=True,\n ),\n DictInput(\n name=\"search_filter\",\n display_name=\"Search Metadata Filter\",\n info=\"Optional dictionary of filters to apply to the search query.\",\n advanced=True,\n is_list=True,\n ),\n ]\n\n @check_cached_vector_store\n def build_vector_store(self):\n try:\n from langchain_astradb import AstraDBGraphVectorStore\n from langchain_astradb.utils.astradb import SetupMode\n except ImportError as e:\n msg = (\n \"Could not import langchain Astra DB integration package. \"\n \"Please install it with `pip install langchain-astradb`.\"\n )\n raise ImportError(msg) from e\n\n try:\n if not self.setup_mode:\n self.setup_mode = self._inputs[\"setup_mode\"].options[0]\n\n setup_mode_value = SetupMode[self.setup_mode.upper()]\n except KeyError as e:\n msg = f\"Invalid setup mode: {self.setup_mode}\"\n raise ValueError(msg) from e\n\n try:\n self.log(f\"Initializing Graph Vector Store {self.collection_name}\")\n\n vector_store = AstraDBGraphVectorStore(\n embedding=self.embedding_model,\n collection_name=self.collection_name,\n metadata_incoming_links_key=self.metadata_incoming_links_key or \"incoming_links\",\n token=self.token,\n api_endpoint=self.api_endpoint,\n namespace=self.keyspace or None,\n environment=parse_api_endpoint(self.api_endpoint).environment if self.api_endpoint else None,\n metric=self.metric or None,\n batch_size=self.batch_size or None,\n bulk_insert_batch_concurrency=self.bulk_insert_batch_concurrency or None,\n bulk_insert_overwrite_concurrency=self.bulk_insert_overwrite_concurrency or None,\n bulk_delete_concurrency=self.bulk_delete_concurrency or None,\n setup_mode=setup_mode_value,\n pre_delete_collection=self.pre_delete_collection,\n metadata_indexing_include=[s for s in self.metadata_indexing_include if s] or None,\n metadata_indexing_exclude=[s for s in self.metadata_indexing_exclude if s] or None,\n collection_indexing_policy=orjson.loads(self.collection_indexing_policy.encode(\"utf-8\"))\n if self.collection_indexing_policy\n else None,\n )\n except Exception as e:\n msg = f\"Error initializing AstraDBGraphVectorStore: {e}\"\n raise ValueError(msg) from e\n\n self.log(f\"Vector Store initialized: {vector_store.astra_env.collection_name}\")\n self._add_documents_to_vector_store(vector_store)\n\n return vector_store\n\n def _add_documents_to_vector_store(self, vector_store) -> None:\n documents = []\n for _input in self.ingest_data or []:\n if isinstance(_input, Data):\n documents.append(_input.to_lc_document())\n else:\n msg = \"Vector Store Inputs must be Data objects.\"\n raise TypeError(msg)\n\n if documents:\n self.log(f\"Adding {len(documents)} documents to the Vector Store.\")\n try:\n vector_store.add_documents(documents)\n except Exception as e:\n msg = f\"Error adding documents to AstraDBGraphVectorStore: {e}\"\n raise ValueError(msg) from e\n else:\n self.log(\"No documents to add to the Vector Store.\")\n\n def _map_search_type(self) -> str:\n match self.search_type:\n case \"Similarity\":\n return \"similarity\"\n case \"Similarity with score threshold\":\n return \"similarity_score_threshold\"\n case \"MMR (Max Marginal Relevance)\":\n return \"mmr\"\n case \"Graph Traversal\":\n return \"traversal\"\n case \"MMR (Max Marginal Relevance) Graph Traversal\":\n return \"mmr_traversal\"\n case _:\n return \"similarity\"\n\n def _build_search_args(self):\n args = {\n \"k\": self.number_of_results,\n \"score_threshold\": self.search_score_threshold,\n }\n\n if self.search_filter:\n clean_filter = {k: v for k, v in self.search_filter.items() if k and v}\n if len(clean_filter) > 0:\n args[\"filter\"] = clean_filter\n return args\n\n def search_documents(self, vector_store=None) -> list[Data]:\n if not vector_store:\n vector_store = self.build_vector_store()\n\n self.log(\"Searching for documents in AstraDBGraphVectorStore.\")\n self.log(f\"Search query: {self.search_query}\")\n self.log(f\"Search type: {self.search_type}\")\n self.log(f\"Number of results: {self.number_of_results}\")\n\n if self.search_query and isinstance(self.search_query, str) and self.search_query.strip():\n try:\n search_type = self._map_search_type()\n search_args = self._build_search_args()\n\n docs = vector_store.search(query=self.search_query, search_type=search_type, **search_args)\n\n # Drop links from the metadata. At this point the links don't add any value for building the\n # context and haven't been restored to json which causes the conversion to fail.\n self.log(\"Removing links from metadata.\")\n for doc in docs:\n if \"links\" in doc.metadata:\n doc.metadata.pop(\"links\")\n\n except Exception as e:\n msg = f\"Error performing search in AstraDBGraphVectorStore: {e}\"\n raise ValueError(msg) from e\n\n self.log(f\"Retrieved documents: {len(docs)}\")\n\n data = docs_to_data(docs)\n\n self.log(f\"Converted documents to data: {len(data)}\")\n\n self.status = data\n return data\n self.log(\"No search input provided. Skipping search.\")\n return []\n\n def get_retriever_kwargs(self):\n search_args = self._build_search_args()\n return {\n \"search_type\": self._map_search_type(),\n \"search_kwargs\": search_args,\n }\n" - }, - "collection_indexing_policy": { - "_input_type": "StrInput", - "advanced": true, - "display_name": "Collection Indexing Policy", - "dynamic": false, - "info": "Optional JSON string for the \"indexing\" field of the collection. See https://docs.datastax.com/en/astra-db-serverless/api-reference/collections.html#the-indexing-option", - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "collection_indexing_policy", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "collection_name": { - "_input_type": "StrInput", - "advanced": false, - "display_name": "Collection Name", - "dynamic": false, - "info": "The name of the collection within Astra DB where the vectors will be stored.", - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "collection_name", - "placeholder": "", - "required": true, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "embedding_model": { - "_input_type": "HandleInput", - "advanced": false, - "display_name": "Embedding Model", - "dynamic": false, - "info": "Allows an embedding model configuration.", - "input_types": [ - "Embeddings" - ], - "list": false, - "list_add_label": "Add More", - "name": "embedding_model", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "trace_as_metadata": true, - "type": "other", - "value": "" - }, - "ingest_data": { - "_input_type": "DataInput", - "advanced": false, - "display_name": "Ingest Data", - "dynamic": false, - "info": "", - "input_types": [ - "Data" - ], - "list": false, - "list_add_label": "Add More", - "name": "ingest_data", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "other", - "value": "" - }, - "keyspace": { - "_input_type": "StrInput", - "advanced": true, - "display_name": "Keyspace", - "dynamic": false, - "info": "Optional keyspace within Astra DB to use for the collection.", - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "keyspace", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "metadata_incoming_links_key": { - "_input_type": "StrInput", - "advanced": true, - "display_name": "Metadata incoming links key", - "dynamic": false, - "info": "Metadata key used for incoming links.", - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "name": "metadata_incoming_links_key", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "metadata_indexing_exclude": { - "_input_type": "StrInput", - "advanced": true, - "display_name": "Metadata Indexing Exclude", - "dynamic": false, - "info": "Optional list of metadata fields to exclude from the indexing.", - "list": true, - "list_add_label": "Add More", - "load_from_db": false, - "name": "metadata_indexing_exclude", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "metadata_indexing_include": { - "_input_type": "StrInput", - "advanced": true, - "display_name": "Metadata Indexing Include", - "dynamic": false, - "info": "Optional list of metadata fields to include in the indexing.", - "list": true, - "list_add_label": "Add More", - "load_from_db": false, - "name": "metadata_indexing_include", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "metric": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "dialog_inputs": {}, - "display_name": "Metric", - "dynamic": false, - "info": "Optional distance metric for vector comparisons in the vector store.", - "name": "metric", - "options": [ - "cosine", - "dot_product", - "euclidean" - ], - "options_metadata": [], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "cosine" - }, - "number_of_results": { - "_input_type": "IntInput", - "advanced": true, - "display_name": "Number of Results", - "dynamic": false, - "info": "Number of results to return.", - "list": false, - "list_add_label": "Add More", - "name": "number_of_results", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "int", - "value": 4 - }, - "pre_delete_collection": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Pre Delete Collection", - "dynamic": false, - "info": "Boolean flag to determine whether to delete the collection before creating a new one.", - "list": false, - "list_add_label": "Add More", - "name": "pre_delete_collection", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": false - }, - "search_filter": { - "_input_type": "DictInput", - "advanced": true, - "display_name": "Search Metadata Filter", - "dynamic": false, - "info": "Optional dictionary of filters to apply to the search query.", - "list": true, - "list_add_label": "Add More", - "name": "search_filter", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_input": true, - "type": "dict", - "value": {} - }, - "search_query": { - "_input_type": "MultilineInput", - "advanced": false, - "display_name": "Search Query", - "dynamic": false, - "info": "", - "input_types": [ - "Message" - ], - "list": false, - "list_add_label": "Add More", - "load_from_db": false, - "multiline": true, - "name": "search_query", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": true, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "" - }, - "search_score_threshold": { - "_input_type": "FloatInput", - "advanced": true, - "display_name": "Search Score Threshold", - "dynamic": false, - "info": "Minimum similarity score threshold for search results. (when using 'Similarity with score threshold')", - "list": false, - "list_add_label": "Add More", - "name": "search_score_threshold", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "float", - "value": 0 - }, - "search_type": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "dialog_inputs": {}, - "display_name": "Search Type", - "dynamic": false, - "info": "Search type to use", - "name": "search_type", - "options": [ - "Similarity", - "Similarity with score threshold", - "MMR (Max Marginal Relevance)", - "Graph Traversal", - "MMR (Max Marginal Relevance) Graph Traversal" - ], - "options_metadata": [], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "MMR (Max Marginal Relevance) Graph Traversal" - }, - "setup_mode": { - "_input_type": "DropdownInput", - "advanced": true, - "combobox": false, - "dialog_inputs": {}, - "display_name": "Setup Mode", - "dynamic": false, - "info": "Configuration mode for setting up the vector store, with options like 'Sync', or 'Off'.", - "name": "setup_mode", - "options": [ - "Sync", - "Off" - ], - "options_metadata": [], - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "str", - "value": "Sync" - }, - "should_cache_vector_store": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Cache Vector Store", - "dynamic": false, - "info": "If True, the vector store will be cached for the current build of the component. This is useful for components that have multiple output methods and want to share the same vector store.", - "list": false, - "list_add_label": "Add More", - "name": "should_cache_vector_store", - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "type": "bool", - "value": true - }, - "token": { - "_input_type": "SecretStrInput", - "advanced": false, - "display_name": "Astra DB Application Token", - "dynamic": false, - "info": "Authentication token for accessing Astra DB.", - "input_types": [ - "Message" - ], - "load_from_db": true, - "name": "token", - "password": true, - "placeholder": "", - "required": true, - "show": true, - "title_case": false, - "type": "str", - "value": "" - } - }, - "tool_mode": false - }, - "showNode": true, - "type": "AstraDBGraph" - }, - "dragging": false, - "id": "AstraDBGraph-uza6S", - "measured": { - "height": 709, - "width": 360 + "height": 634, + "width": 320 }, "position": { "x": -351.01793894175796, @@ -5549,20 +4051,330 @@ }, "selected": false, "type": "genericNode" + }, + { + "data": { + "id": "ChatInput-2dZuD", + "node": { + "base_classes": [ + "Message" + ], + "beta": false, + "category": "inputs", + "conditional_paths": [], + "custom_fields": {}, + "description": "Get chat inputs from the Playground.", + "display_name": "Chat Input", + "documentation": "", + "edited": false, + "field_order": [ + "input_value", + "should_store_message", + "sender", + "sender_name", + "session_id", + "files", + "background_color", + "chat_icon", + "text_color" + ], + "frozen": false, + "icon": "MessagesSquare", + "key": "ChatInput", + "legacy": false, + "metadata": {}, + "minimized": true, + "output_types": [], + "outputs": [ + { + "allows_loop": false, + "cache": true, + "display_name": "Message", + "method": "message_response", + "name": "message", + "selected": "Message", + "tool_mode": true, + "types": [ + "Message" + ], + "value": "__UNDEFINED__" + } + ], + "pinned": false, + "score": 0.000045030081906763545, + "template": { + "_type": "Component", + "background_color": { + "_input_type": "MessageTextInput", + "advanced": true, + "display_name": "Background Color", + "dynamic": false, + "info": "The background color of the icon.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "background_color", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, + "chat_icon": { + "_input_type": "MessageTextInput", + "advanced": true, + "display_name": "Icon", + "dynamic": false, + "info": "The icon of the message.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "chat_icon", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, + "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.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import (\n MESSAGE_SENDER_AI,\n MESSAGE_SENDER_NAME_USER,\n MESSAGE_SENDER_USER,\n)\n\n\nclass ChatInput(ChatComponent):\n display_name = \"Chat Input\"\n description = \"Get chat inputs from the Playground.\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n value=\"\",\n info=\"Message to be passed as input.\",\n input_types=[],\n ),\n BoolInput(\n name=\"should_store_message\",\n display_name=\"Store Messages\",\n info=\"Store the message in the history.\",\n value=True,\n advanced=True,\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n value=MESSAGE_SENDER_USER,\n info=\"Type of sender.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"sender_name\",\n display_name=\"Sender Name\",\n info=\"Name of the sender.\",\n value=MESSAGE_SENDER_NAME_USER,\n advanced=True,\n ),\n MessageTextInput(\n name=\"session_id\",\n display_name=\"Session ID\",\n info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n advanced=True,\n ),\n FileInput(\n name=\"files\",\n display_name=\"Files\",\n file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n info=\"Files to be sent with the message.\",\n advanced=True,\n is_list=True,\n ),\n MessageTextInput(\n name=\"background_color\",\n display_name=\"Background Color\",\n info=\"The background color of the icon.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"chat_icon\",\n display_name=\"Icon\",\n info=\"The icon of the message.\",\n advanced=True,\n ),\n MessageTextInput(\n name=\"text_color\",\n display_name=\"Text Color\",\n info=\"The text color of the name\",\n advanced=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n background_color = self.background_color\n text_color = self.text_color\n icon = self.chat_icon\n\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n files=self.files,\n properties={\n \"background_color\": background_color,\n \"text_color\": text_color,\n \"icon\": icon,\n },\n )\n if self.session_id and isinstance(message, Message) and self.should_store_message:\n stored_message = await self.send_message(\n message,\n )\n self.message.value = stored_message\n message = stored_message\n\n self.status = message\n return message\n" + }, + "files": { + "_input_type": "FileInput", + "advanced": true, + "display_name": "Files", + "dynamic": false, + "fileTypes": [ + "txt", + "md", + "mdx", + "csv", + "json", + "yaml", + "yml", + "xml", + "html", + "htm", + "pdf", + "docx", + "py", + "sh", + "sql", + "js", + "ts", + "tsx", + "jpg", + "jpeg", + "png", + "bmp", + "image" + ], + "file_path": "", + "info": "Files to be sent with the message.", + "list": true, + "list_add_label": "Add More", + "name": "files", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "trace_as_metadata": true, + "type": "file", + "value": "" + }, + "input_value": { + "_input_type": "MultilineInput", + "advanced": false, + "copy_field": false, + "display_name": "Text", + "dynamic": false, + "info": "Message to be passed as input.", + "input_types": [], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "multiline": true, + "name": "input_value", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "How does Haskell handle function composition and what are some practical examples of its use?" + }, + "sender": { + "_input_type": "DropdownInput", + "advanced": true, + "combobox": false, + "dialog_inputs": {}, + "display_name": "Sender Type", + "dynamic": false, + "info": "Type of sender.", + "name": "sender", + "options": [ + "Machine", + "User" + ], + "options_metadata": [], + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "str", + "value": "User" + }, + "sender_name": { + "_input_type": "MessageTextInput", + "advanced": true, + "display_name": "Sender Name", + "dynamic": false, + "info": "Name of the sender.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "sender_name", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "User" + }, + "session_id": { + "_input_type": "MessageTextInput", + "advanced": true, + "display_name": "Session ID", + "dynamic": false, + "info": "The session ID of the chat. If empty, the current session ID parameter will be used.", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "session_id", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "" + }, + "should_store_message": { + "_input_type": "BoolInput", + "advanced": true, + "display_name": "Store Messages", + "dynamic": false, + "info": "Store the message in the history.", + "list": false, + "list_add_label": "Add More", + "name": "should_store_message", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_metadata": true, + "type": "bool", + "value": true + }, + "text_color": { + "_input_type": "MessageTextInput", + "advanced": true, + "display_name": "Text Color", + "dynamic": false, + "info": "The text color of the name", + "input_types": [ + "Message" + ], + "list": false, + "list_add_label": "Add More", + "load_from_db": false, + "name": "text_color", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "tool_mode": false, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "" + } + }, + "tool_mode": false + }, + "showNode": true, + "type": "ChatInput" + }, + "dragging": false, + "id": "ChatInput-2dZuD", + "measured": { + "height": 230, + "width": 320 + }, + "position": { + "x": -1812.4888606742027, + "y": 7065.04010157287 + }, + "selected": false, + "type": "genericNode" } ], "viewport": { - "x": 1127.2300847911954, - "y": -2570.5545905062804, - "zoom": 0.4514602881701939 + "x": 973.789930112276, + "y": -1828.0579580568942, + "zoom": 0.3442093352914648 } }, "description": "Extracts links from web pages and processes the content using Graph RAG Chain with Maximal Marginal Relevance (MMR) traversal.", "endpoint_name": null, - "icon": "chartNetwork", - "id": "73ceae85-141a-42e3-9f41-a0749434ca0e", + "id": "243e8c45-43a2-441a-85ff-d681d665d66e", "is_component": false, - "last_tested_version": "1.1.1", + "last_tested_version": "1.2.0", "name": "Graph RAG", "tags": [ "rag", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json b/src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json index 5c29f8cbc..203fa1ca0 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Meeting Summary.json @@ -7,7 +7,7 @@ "data": { "sourceHandle": { "dataType": "AssemblyAITranscriptionJobPoller", - "id": "AssemblyAITranscriptionJobPoller-bxKgt", + "id": "AssemblyAITranscriptionJobPoller-2TJ8f", "name": "transcription_result", "output_types": [ "Data" @@ -15,19 +15,19 @@ }, "targetHandle": { "fieldName": "data", - "id": "ParseData-LUfjb", + "id": "ParseData-ucB7J", "inputTypes": [ "Data" ], "type": "other" } }, - "id": "reactflow__edge-AssemblyAITranscriptionJobPoller-bxKgt{œdataTypeœ:œAssemblyAITranscriptionJobPollerœ,œidœ:œAssemblyAITranscriptionJobPoller-bxKgtœ,œnameœ:œtranscription_resultœ,œoutput_typesœ:[œDataœ]}-ParseData-LUfjb{œfieldNameœ:œdataœ,œidœ:œParseData-LUfjbœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", + "id": "reactflow__edge-AssemblyAITranscriptionJobPoller-2TJ8f{œdataTypeœ:œAssemblyAITranscriptionJobPollerœ,œidœ:œAssemblyAITranscriptionJobPoller-2TJ8fœ,œnameœ:œtranscription_resultœ,œoutput_typesœ:[œDataœ]}-ParseData-ucB7J{œfieldNameœ:œdataœ,œidœ:œParseData-ucB7Jœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", "selected": false, - "source": "AssemblyAITranscriptionJobPoller-bxKgt", - "sourceHandle": "{œdataTypeœ: œAssemblyAITranscriptionJobPollerœ, œidœ: œAssemblyAITranscriptionJobPoller-bxKgtœ, œnameœ: œtranscription_resultœ, œoutput_typesœ: [œDataœ]}", - "target": "ParseData-LUfjb", - "targetHandle": "{œfieldNameœ: œdataœ, œidœ: œParseData-LUfjbœ, œinputTypesœ: [œDataœ], œtypeœ: œotherœ}" + "source": "AssemblyAITranscriptionJobPoller-2TJ8f", + "sourceHandle": "{œdataTypeœ: œAssemblyAITranscriptionJobPollerœ, œidœ: œAssemblyAITranscriptionJobPoller-2TJ8fœ, œnameœ: œtranscription_resultœ, œoutput_typesœ: [œDataœ]}", + "target": "ParseData-ucB7J", + "targetHandle": "{œfieldNameœ: œdataœ, œidœ: œParseData-ucB7Jœ, œinputTypesœ: [œDataœ], œtypeœ: œotherœ}" }, { "animated": false, @@ -35,7 +35,7 @@ "data": { "sourceHandle": { "dataType": "ParseData", - "id": "ParseData-LUfjb", + "id": "ParseData-ucB7J", "name": "text", "output_types": [ "Message" @@ -43,7 +43,7 @@ }, "targetHandle": { "fieldName": "transcript", - "id": "Prompt-vYcSa", + "id": "Prompt-HMkPy", "inputTypes": [ "Message", "Text" @@ -51,12 +51,12 @@ "type": "str" } }, - "id": "reactflow__edge-ParseData-LUfjb{œdataTypeœ:œParseDataœ,œidœ:œParseData-LUfjbœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-vYcSa{œfieldNameœ:œtranscriptœ,œidœ:œPrompt-vYcSaœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-ParseData-ucB7J{œdataTypeœ:œParseDataœ,œidœ:œParseData-ucB7Jœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-HMkPy{œfieldNameœ:œtranscriptœ,œidœ:œPrompt-HMkPyœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", "selected": false, - "source": "ParseData-LUfjb", - "sourceHandle": "{œdataTypeœ: œParseDataœ, œidœ: œParseData-LUfjbœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-vYcSa", - "targetHandle": "{œfieldNameœ: œtranscriptœ, œidœ: œPrompt-vYcSaœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "source": "ParseData-ucB7J", + "sourceHandle": "{œdataTypeœ: œParseDataœ, œidœ: œParseData-ucB7Jœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-HMkPy", + "targetHandle": "{œfieldNameœ: œtranscriptœ, œidœ: œPrompt-HMkPyœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -64,7 +64,7 @@ "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-vYcSa", + "id": "Prompt-HMkPy", "name": "prompt", "output_types": [ "Message" @@ -72,19 +72,19 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "OpenAIModel-iudDZ", + "id": "OpenAIModel-mmWVM", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-vYcSa{œdataTypeœ:œPromptœ,œidœ:œPrompt-vYcSaœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-iudDZ{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-iudDZœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-Prompt-HMkPy{œdataTypeœ:œPromptœ,œidœ:œPrompt-HMkPyœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-mmWVM{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-mmWVMœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "Prompt-vYcSa", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-vYcSaœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "OpenAIModel-iudDZ", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-iudDZœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "Prompt-HMkPy", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-HMkPyœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "OpenAIModel-mmWVM", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-mmWVMœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -92,7 +92,7 @@ "data": { "sourceHandle": { "dataType": "OpenAIModel", - "id": "OpenAIModel-iudDZ", + "id": "OpenAIModel-mmWVM", "name": "text_output", "output_types": [ "Message" @@ -100,7 +100,7 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-l7B6O", + "id": "ChatOutput-LDGJU", "inputTypes": [ "Data", "DataFrame", @@ -109,12 +109,12 @@ "type": "str" } }, - "id": "reactflow__edge-OpenAIModel-iudDZ{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-iudDZœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-l7B6O{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-l7B6Oœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-OpenAIModel-mmWVM{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-mmWVMœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-LDGJU{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-LDGJUœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "OpenAIModel-iudDZ", - "sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-iudDZœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", - "target": "ChatOutput-l7B6O", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-l7B6Oœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" + "source": "OpenAIModel-mmWVM", + "sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-mmWVMœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-LDGJU", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-LDGJUœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -122,7 +122,7 @@ "data": { "sourceHandle": { "dataType": "ParseData", - "id": "ParseData-LUfjb", + "id": "ParseData-ucB7J", "name": "text", "output_types": [ "Message" @@ -130,7 +130,7 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-BMxpl", + "id": "ChatOutput-nndHR", "inputTypes": [ "Data", "DataFrame", @@ -139,12 +139,12 @@ "type": "str" } }, - "id": "reactflow__edge-ParseData-LUfjb{œdataTypeœ:œParseDataœ,œidœ:œParseData-LUfjbœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-BMxpl{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-BMxplœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-ParseData-ucB7J{œdataTypeœ:œParseDataœ,œidœ:œParseData-ucB7Jœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-nndHR{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-nndHRœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "ParseData-LUfjb", - "sourceHandle": "{œdataTypeœ: œParseDataœ, œidœ: œParseData-LUfjbœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", - "target": "ChatOutput-BMxpl", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-BMxplœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" + "source": "ParseData-ucB7J", + "sourceHandle": "{œdataTypeœ: œParseDataœ, œidœ: œParseData-ucB7Jœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-nndHR", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-nndHRœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -152,7 +152,7 @@ "data": { "sourceHandle": { "dataType": "OpenAIModel", - "id": "OpenAIModel-8fyum", + "id": "OpenAIModel-QmoIH", "name": "text_output", "output_types": [ "Message" @@ -160,7 +160,7 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-04Red", + "id": "ChatOutput-oWZwj", "inputTypes": [ "Data", "DataFrame", @@ -169,12 +169,12 @@ "type": "str" } }, - "id": "reactflow__edge-OpenAIModel-8fyum{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-8fyumœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-04Red{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-04Redœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-OpenAIModel-QmoIH{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-QmoIHœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-oWZwj{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-oWZwjœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "OpenAIModel-8fyum", - "sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-8fyumœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", - "target": "ChatOutput-04Red", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-04Redœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" + "source": "OpenAIModel-QmoIH", + "sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-QmoIHœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-oWZwj", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-oWZwjœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -182,7 +182,7 @@ "data": { "sourceHandle": { "dataType": "Memory", - "id": "Memory-0odic", + "id": "Memory-dZvPv", "name": "messages_text", "output_types": [ "Message" @@ -190,7 +190,7 @@ }, "targetHandle": { "fieldName": "history", - "id": "Prompt-f4vcK", + "id": "Prompt-DuWFn", "inputTypes": [ "Message", "Text" @@ -198,12 +198,12 @@ "type": "str" } }, - "id": "reactflow__edge-Memory-0odic{œdataTypeœ:œMemoryœ,œidœ:œMemory-0odicœ,œnameœ:œmessages_textœ,œoutput_typesœ:[œMessageœ]}-Prompt-f4vcK{œfieldNameœ:œhistoryœ,œidœ:œPrompt-f4vcKœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-Memory-dZvPv{œdataTypeœ:œMemoryœ,œidœ:œMemory-dZvPvœ,œnameœ:œmessages_textœ,œoutput_typesœ:[œMessageœ]}-Prompt-DuWFn{œfieldNameœ:œhistoryœ,œidœ:œPrompt-DuWFnœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", "selected": false, - "source": "Memory-0odic", - "sourceHandle": "{œdataTypeœ: œMemoryœ, œidœ: œMemory-0odicœ, œnameœ: œmessages_textœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-f4vcK", - "targetHandle": "{œfieldNameœ: œhistoryœ, œidœ: œPrompt-f4vcKœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "source": "Memory-dZvPv", + "sourceHandle": "{œdataTypeœ: œMemoryœ, œidœ: œMemory-dZvPvœ, œnameœ: œmessages_textœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-DuWFn", + "targetHandle": "{œfieldNameœ: œhistoryœ, œidœ: œPrompt-DuWFnœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -211,7 +211,7 @@ "data": { "sourceHandle": { "dataType": "ChatInput", - "id": "ChatInput-d3z9H", + "id": "ChatInput-P3hGZ", "name": "message", "output_types": [ "Message" @@ -219,7 +219,7 @@ }, "targetHandle": { "fieldName": "input", - "id": "Prompt-f4vcK", + "id": "Prompt-DuWFn", "inputTypes": [ "Message", "Text" @@ -227,12 +227,12 @@ "type": "str" } }, - "id": "reactflow__edge-ChatInput-d3z9H{œdataTypeœ:œChatInputœ,œidœ:œChatInput-d3z9Hœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Prompt-f4vcK{œfieldNameœ:œinputœ,œidœ:œPrompt-f4vcKœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-ChatInput-P3hGZ{œdataTypeœ:œChatInputœ,œidœ:œChatInput-P3hGZœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Prompt-DuWFn{œfieldNameœ:œinputœ,œidœ:œPrompt-DuWFnœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", "selected": false, - "source": "ChatInput-d3z9H", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-d3z9Hœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-f4vcK", - "targetHandle": "{œfieldNameœ: œinputœ, œidœ: œPrompt-f4vcKœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "source": "ChatInput-P3hGZ", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-P3hGZœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-DuWFn", + "targetHandle": "{œfieldNameœ: œinputœ, œidœ: œPrompt-DuWFnœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -240,7 +240,7 @@ "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-f4vcK", + "id": "Prompt-DuWFn", "name": "prompt", "output_types": [ "Message" @@ -248,25 +248,27 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "OpenAIModel-8fyum", + "id": "OpenAIModel-QmoIH", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-f4vcK{œdataTypeœ:œPromptœ,œidœ:œPrompt-f4vcKœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-8fyum{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-8fyumœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-Prompt-DuWFn{œdataTypeœ:œPromptœ,œidœ:œPrompt-DuWFnœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-QmoIH{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-QmoIHœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "Prompt-f4vcK", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-f4vcKœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "OpenAIModel-8fyum", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-8fyumœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "Prompt-DuWFn", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-DuWFnœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "OpenAIModel-QmoIH", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-QmoIHœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { + "animated": false, + "className": "", "data": { "sourceHandle": { "dataType": "AssemblyAITranscriptionJobCreator", - "id": "AssemblyAITranscriptionJobCreator-ylQES", + "id": "AssemblyAITranscriptionJobCreator-DMH1y", "name": "transcript_id", "output_types": [ "Data" @@ -274,24 +276,25 @@ }, "targetHandle": { "fieldName": "transcript_id", - "id": "AssemblyAITranscriptionJobPoller-bxKgt", + "id": "AssemblyAITranscriptionJobPoller-2TJ8f", "inputTypes": [ "Data" ], "type": "other" } }, - "id": "xy-edge__AssemblyAITranscriptionJobCreator-ylQES{œdataTypeœ:œAssemblyAITranscriptionJobCreatorœ,œidœ:œAssemblyAITranscriptionJobCreator-ylQESœ,œnameœ:œtranscript_idœ,œoutput_typesœ:[œDataœ]}-AssemblyAITranscriptionJobPoller-bxKgt{œfieldNameœ:œtranscript_idœ,œidœ:œAssemblyAITranscriptionJobPoller-bxKgtœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", - "source": "AssemblyAITranscriptionJobCreator-ylQES", - "sourceHandle": "{œdataTypeœ: œAssemblyAITranscriptionJobCreatorœ, œidœ: œAssemblyAITranscriptionJobCreator-ylQESœ, œnameœ: œtranscript_idœ, œoutput_typesœ: [œDataœ]}", - "target": "AssemblyAITranscriptionJobPoller-bxKgt", - "targetHandle": "{œfieldNameœ: œtranscript_idœ, œidœ: œAssemblyAITranscriptionJobPoller-bxKgtœ, œinputTypesœ: [œDataœ], œtypeœ: œotherœ}" + "id": "reactflow__edge-AssemblyAITranscriptionJobCreator-DMH1y{œdataTypeœ:œAssemblyAITranscriptionJobCreatorœ,œidœ:œAssemblyAITranscriptionJobCreator-DMH1yœ,œnameœ:œtranscript_idœ,œoutput_typesœ:[œDataœ]}-AssemblyAITranscriptionJobPoller-2TJ8f{œfieldNameœ:œtranscript_idœ,œidœ:œAssemblyAITranscriptionJobPoller-2TJ8fœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", + "selected": false, + "source": "AssemblyAITranscriptionJobCreator-DMH1y", + "sourceHandle": "{œdataTypeœ: œAssemblyAITranscriptionJobCreatorœ, œidœ: œAssemblyAITranscriptionJobCreator-DMH1yœ, œnameœ: œtranscript_idœ, œoutput_typesœ: [œDataœ]}", + "target": "AssemblyAITranscriptionJobPoller-2TJ8f", + "targetHandle": "{œfieldNameœ: œtranscript_idœ, œidœ: œAssemblyAITranscriptionJobPoller-2TJ8fœ, œinputTypesœ: [œDataœ], œtypeœ: œotherœ}" } ], "nodes": [ { "data": { - "id": "AssemblyAITranscriptionJobPoller-bxKgt", + "id": "AssemblyAITranscriptionJobPoller-2TJ8f", "node": { "base_classes": [ "Data" @@ -342,7 +345,7 @@ "input_types": [ "Message" ], - "load_from_db": false, + "load_from_db": true, "name": "api_key", "password": true, "placeholder": "", @@ -422,7 +425,7 @@ "showNode": true, "type": "AssemblyAITranscriptionJobPoller" }, - "id": "AssemblyAITranscriptionJobPoller-bxKgt", + "id": "AssemblyAITranscriptionJobPoller-2TJ8f", "measured": { "height": 294, "width": 320 @@ -436,7 +439,7 @@ }, { "data": { - "id": "ParseData-LUfjb", + "id": "ParseData-ucB7J", "node": { "base_classes": [ "Data", @@ -583,7 +586,7 @@ "showNode": true, "type": "ParseData" }, - "id": "ParseData-LUfjb", + "id": "ParseData-ucB7J", "measured": { "height": 342, "width": 320 @@ -597,7 +600,7 @@ }, { "data": { - "id": "OpenAIModel-iudDZ", + "id": "OpenAIModel-mmWVM", "node": { "base_classes": [ "LanguageModel", @@ -964,7 +967,7 @@ "showNode": true, "type": "OpenAIModel" }, - "id": "OpenAIModel-iudDZ", + "id": "OpenAIModel-mmWVM", "measured": { "height": 656, "width": 320 @@ -978,7 +981,7 @@ }, { "data": { - "id": "Prompt-vYcSa", + "id": "Prompt-HMkPy", "node": { "base_classes": [ "Message" @@ -1115,7 +1118,7 @@ "showNode": true, "type": "Prompt" }, - "id": "Prompt-vYcSa", + "id": "Prompt-HMkPy", "measured": { "height": 339, "width": 320 @@ -1129,7 +1132,7 @@ }, { "data": { - "id": "ChatOutput-l7B6O", + "id": "ChatOutput-LDGJU", "node": { "base_classes": [ "Message" @@ -1416,7 +1419,7 @@ "showNode": true, "type": "ChatOutput" }, - "id": "ChatOutput-l7B6O", + "id": "ChatOutput-LDGJU", "measured": { "height": 230, "width": 320 @@ -1430,7 +1433,7 @@ }, { "data": { - "id": "ChatOutput-BMxpl", + "id": "ChatOutput-nndHR", "node": { "base_classes": [ "Message" @@ -1717,7 +1720,7 @@ "showNode": false, "type": "ChatOutput" }, - "id": "ChatOutput-BMxpl", + "id": "ChatOutput-nndHR", "measured": { "height": 66, "width": 192 @@ -1731,7 +1734,7 @@ }, { "data": { - "id": "OpenAIModel-8fyum", + "id": "OpenAIModel-QmoIH", "node": { "base_classes": [ "LanguageModel", @@ -2098,7 +2101,7 @@ "showNode": true, "type": "OpenAIModel" }, - "id": "OpenAIModel-8fyum", + "id": "OpenAIModel-QmoIH", "measured": { "height": 656, "width": 320 @@ -2112,7 +2115,7 @@ }, { "data": { - "id": "ChatOutput-04Red", + "id": "ChatOutput-oWZwj", "node": { "base_classes": [ "Message" @@ -2399,7 +2402,7 @@ "showNode": false, "type": "ChatOutput" }, - "id": "ChatOutput-04Red", + "id": "ChatOutput-oWZwj", "measured": { "height": 66, "width": 192 @@ -2413,7 +2416,7 @@ }, { "data": { - "id": "Prompt-f4vcK", + "id": "Prompt-DuWFn", "node": { "base_classes": [ "Message" @@ -2574,7 +2577,7 @@ "showNode": true, "type": "Prompt" }, - "id": "Prompt-f4vcK", + "id": "Prompt-DuWFn", "measured": { "height": 421, "width": 320 @@ -2588,7 +2591,7 @@ }, { "data": { - "id": "Memory-0odic", + "id": "Memory-dZvPv", "node": { "base_classes": [ "Data", @@ -2827,7 +2830,7 @@ "showNode": true, "type": "Memory" }, - "id": "Memory-0odic", + "id": "Memory-dZvPv", "measured": { "height": 260, "width": 320 @@ -2841,7 +2844,7 @@ }, { "data": { - "id": "ChatInput-d3z9H", + "id": "ChatInput-P3hGZ", "node": { "base_classes": [ "Message" @@ -3124,7 +3127,7 @@ "showNode": false, "type": "ChatInput" }, - "id": "ChatInput-d3z9H", + "id": "ChatInput-P3hGZ", "measured": { "height": 66, "width": 192 @@ -3138,7 +3141,7 @@ }, { "data": { - "id": "note-2icq2", + "id": "note-d7w2e", "node": { "description": "### 💡 Add your Assembly AI API key and audio file here", "display_name": "", @@ -3151,7 +3154,7 @@ }, "dragging": false, "height": 324, - "id": "note-2icq2", + "id": "note-d7w2e", "measured": { "height": 324, "width": 455 @@ -3167,7 +3170,7 @@ }, { "data": { - "id": "note-OejoR", + "id": "note-moVh7", "node": { "description": "### 💡 Add your Assembly AI API key here", "display_name": "", @@ -3180,7 +3183,7 @@ }, "dragging": false, "height": 324, - "id": "note-OejoR", + "id": "note-moVh7", "measured": { "height": 324, "width": 364 @@ -3196,7 +3199,7 @@ }, { "data": { - "id": "note-9B1rT", + "id": "note-0JLej", "node": { "description": "### 💡 Add your OpenAI API key here", "display_name": "", @@ -3209,7 +3212,7 @@ }, "dragging": false, "height": 324, - "id": "note-9B1rT", + "id": "note-0JLej", "measured": { "height": 324, "width": 334 @@ -3225,7 +3228,7 @@ }, { "data": { - "id": "note-tO2On", + "id": "note-qCg3p", "node": { "description": "### 💡 Add your OpenAI API key here", "display_name": "", @@ -3237,7 +3240,7 @@ "type": "note" }, "dragging": false, - "id": "note-tO2On", + "id": "note-qCg3p", "measured": { "height": 324, "width": 324 @@ -3251,7 +3254,7 @@ }, { "data": { - "id": "AssemblyAITranscriptionJobCreator-ylQES", + "id": "AssemblyAITranscriptionJobCreator-DMH1y", "node": { "base_classes": [ "Data" @@ -3311,7 +3314,7 @@ "input_types": [ "Message" ], - "load_from_db": false, + "load_from_db": true, "name": "api_key", "password": true, "placeholder": "", @@ -3319,7 +3322,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": "ASSEMBLYAI_API_KEY" }, "audio_file": { "_input_type": "FileInput", @@ -3569,7 +3572,7 @@ "type": "AssemblyAITranscriptionJobCreator" }, "dragging": false, - "id": "AssemblyAITranscriptionJobCreator-ylQES", + "id": "AssemblyAITranscriptionJobCreator-DMH1y", "measured": { "height": 373, "width": 320 @@ -3578,12 +3581,12 @@ "x": 515.589850902064, "y": 232.58183434411956 }, - "selected": false, + "selected": true, "type": "genericNode" }, { "data": { - "id": "note-fB5Sk", + "id": "note-oi3im", "node": { "description": "# Meeting Summary Generator\n\nThis flow automatically transcribes and summarizes meetings by converting audio recordings into concise summaries using **AssemblyAI** and **OpenAI GPT-4**. \n\n## Prerequisites\n\n- **[AssemblyAI API Key](https://www.assemblyai.com/)**\n- **[OpenAI API Key](https://platform.openai.com/)**\n\n## Quickstart\n\n1. Upload an audio file. Most common audio file formats are [supported](https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/components/assemblyai/assemblyai_start_transcript.py#L27).\n2. To run the summary generator flow, click **Playground**.\n\nThe flow transcribes the audio using **AssemblyAI**.\nThe transcript is formatted for AI processing.\nThe **GPT-4** model extracts key points and insights.\nThe summarized meeting details are displayed in a chat-friendly format.\n\n\n\n", "display_name": "", @@ -3594,7 +3597,7 @@ }, "dragging": false, "height": 612, - "id": "note-fB5Sk", + "id": "note-oi3im", "measured": { "height": 612, "width": 549 @@ -3610,17 +3613,16 @@ } ], "viewport": { - "x": 199.66634321516733, - "y": -38.61016993098076, - "zoom": 0.49475443116609724 + "x": 122.50148302820207, + "y": -27.863732498292393, + "zoom": 0.4446518657731734 } }, "description": "An AI-powered meeting summary generator that transcribes and summarizes meetings using AssemblyAI and OpenAI for quick insights.", - "endpoint_name": "meeting_summary", - "icon": "headset", - "id": "5b99326e-70dc-4c7a-b791-67665ee1dac3", + "endpoint_name": null, + "id": "ee25ec0f-105b-47c2-873a-25f28caf012c", "is_component": false, - "last_tested_version": "1.1.5", + "last_tested_version": "1.2.0", "name": "Meeting Summary", "tags": [ "chatbots", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json b/src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json index a53d71daf..375b45bf2 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json @@ -7,7 +7,7 @@ "data": { "sourceHandle": { "dataType": "AgentQL", - "id": "AgentQL-mvSyT", + "id": "AgentQL-QrQyl", "name": "component_as_tool", "output_types": [ "Tool" @@ -15,19 +15,19 @@ }, "targetHandle": { "fieldName": "tools", - "id": "Agent-0WtsM", + "id": "Agent-DlbOP", "inputTypes": [ "Tool" ], "type": "other" } }, - "id": "reactflow__edge-AgentQL-mvSyT{œdataTypeœ:œAgentQLœ,œidœ:œAgentQL-mvSyTœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-0WtsM{œfieldNameœ:œtoolsœ,œidœ:œAgent-0WtsMœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "id": "reactflow__edge-AgentQL-QrQyl{œdataTypeœ:œAgentQLœ,œidœ:œAgentQL-QrQylœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-DlbOP{œfieldNameœ:œtoolsœ,œidœ:œAgent-DlbOPœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", "selected": false, - "source": "AgentQL-mvSyT", - "sourceHandle": "{œdataTypeœ: œAgentQLœ, œidœ: œAgentQL-mvSyTœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-0WtsM", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-0WtsMœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "source": "AgentQL-QrQyl", + "sourceHandle": "{œdataTypeœ: œAgentQLœ, œidœ: œAgentQL-QrQylœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-DlbOP", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-DlbOPœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" }, { "animated": false, @@ -35,7 +35,7 @@ "data": { "sourceHandle": { "dataType": "ChatInput", - "id": "ChatInput-aQctf", + "id": "ChatInput-rZZHB", "name": "message", "output_types": [ "Message" @@ -43,25 +43,54 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Agent-0WtsM", + "id": "Agent-DlbOP", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-ChatInput-aQctf{œdataTypeœ:œChatInputœ,œidœ:œChatInput-aQctfœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-0WtsM{œfieldNameœ:œinput_valueœ,œidœ:œAgent-0WtsMœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-ChatInput-rZZHB{œdataTypeœ:œChatInputœ,œidœ:œChatInput-rZZHBœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-DlbOP{œfieldNameœ:œinput_valueœ,œidœ:œAgent-DlbOPœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "ChatInput-aQctf", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-aQctfœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-0WtsM", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-0WtsMœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "ChatInput-rZZHB", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-rZZHBœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-DlbOP", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-DlbOPœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + }, + { + "animated": false, + "data": { + "sourceHandle": { + "dataType": "Agent", + "id": "Agent-DlbOP", + "name": "response", + "output_types": [ + "Message" + ] + }, + "targetHandle": { + "fieldName": "input_value", + "id": "ChatOutput-tCBqx", + "inputTypes": [ + "Data", + "DataFrame", + "Message" + ], + "type": "other" + } + }, + "id": "xy-edge__Agent-DlbOP{œdataTypeœ:œAgentœ,œidœ:œAgent-DlbOPœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-tCBqx{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-tCBqxœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œotherœ}", + "selected": false, + "source": "Agent-DlbOP", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-DlbOPœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-tCBqx", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-tCBqxœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œotherœ}" } ], "nodes": [ { "data": { - "id": "note-ha8Ib", + "id": "note-8QugF", "node": { "description": "### 💡 Add your OpenAI API key here", "display_name": "", @@ -73,7 +102,7 @@ "type": "note" }, "dragging": false, - "id": "note-ha8Ib", + "id": "note-8QugF", "measured": { "height": 324, "width": 324 @@ -87,7 +116,7 @@ }, { "data": { - "id": "note-RBW3I", + "id": "note-KBJMn", "node": { "description": "### 💡 Add your AgentQL API key here", "display_name": "", @@ -100,7 +129,7 @@ }, "dragging": false, "height": 346, - "id": "note-RBW3I", + "id": "note-KBJMn", "measured": { "height": 346, "width": 324 @@ -116,7 +145,7 @@ "data": { "description": "Uses AgentQL API to extract structured data from a given URL.", "display_name": "AgentQL Query Data", - "id": "AgentQL-mvSyT", + "id": "AgentQL-QrQyl", "node": { "base_classes": [ "Data" @@ -183,7 +212,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": "AGENTQL_API_KEY" }, "code": { "advanced": true, @@ -421,6 +450,19 @@ "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" + }, { "default": true, "description": "Indicates whether the tool is currently active. Set to True to activate this tool.", @@ -507,21 +549,21 @@ "type": "AgentQL" }, "dragging": false, - "id": "AgentQL-mvSyT", + "id": "AgentQL-QrQyl", "measured": { - "height": 599, + "height": 602, "width": 320 }, "position": { "x": 746.6171255053692, "y": 323.12336325015775 }, - "selected": false, + "selected": true, "type": "genericNode" }, { "data": { - "id": "ChatInput-aQctf", + "id": "ChatInput-rZZHB", "node": { "base_classes": [ "Message" @@ -818,7 +860,7 @@ "type": "ChatInput" }, "dragging": false, - "id": "ChatInput-aQctf", + "id": "ChatInput-rZZHB", "measured": { "height": 66, "width": 192 @@ -832,7 +874,7 @@ }, { "data": { - "id": "ChatOutput-yNdUZ", + "id": "ChatOutput-tCBqx", "node": { "base_classes": [ "Message" @@ -1124,7 +1166,7 @@ "type": "ChatOutput" }, "dragging": false, - "id": "ChatOutput-yNdUZ", + "id": "ChatOutput-tCBqx", "measured": { "height": 66, "width": 192 @@ -1138,7 +1180,7 @@ }, { "data": { - "id": "Agent-0WtsM", + "id": "Agent-DlbOP", "node": { "base_classes": [ "Message" @@ -1313,7 +1355,7 @@ "input_types": [ "Message" ], - "load_from_db": false, + "load_from_db": true, "name": "api_key", "password": true, "placeholder": "", @@ -1321,7 +1363,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": "OPENAI_API_KEY" }, "code": { "advanced": true, @@ -1814,9 +1856,9 @@ "type": "Agent" }, "dragging": false, - "id": "Agent-0WtsM", + "id": "Agent-DlbOP", "measured": { - "height": 621, + "height": 624, "width": 320 }, "position": { @@ -1828,7 +1870,7 @@ }, { "data": { - "id": "note-X9QDV", + "id": "note-0zajW", "node": { "description": "# News Aggregator\n\nThis flow extracts structured data from a URL.\n## Prerequisites\n\n* **[AgentQL API Key](https://dev.agentql.com/api-keys)**\n* **[OpenAI API Key](https://platform.openai.com/)**\n\n## Quick Start\n\n1. Add your [AgentQL API Key](https://dev.agentql.com/api-keys) to the **AgentQL** component.\n2. Add your [OpenAI API Key](https://platform.openai.com/) to the **Agent** component.\n3. Click **Playground** and enter a question.\nThe **Agent** component populates the **Agent QL** component's **URL** and **Query** fields, and returns a structured response to your question.", "display_name": "", @@ -1840,7 +1882,7 @@ "type": "note" }, "dragging": false, - "id": "note-X9QDV", + "id": "note-0zajW", "measured": { "height": 604, "width": 325 @@ -1854,14 +1896,14 @@ } ], "viewport": { - "x": -122.32493574893215, - "y": 249.0480899983669, - "zoom": 0.8862607313804116 + "x": -117.84864069491266, + "y": 80.81149435068329, + "zoom": 0.8538293672913081 } }, "description": "Extracts data and information from webpages.", "endpoint_name": null, - "id": "ed796384-2002-49d5-8480-8c8aa806c9d5", + "id": "f2015209-2422-432c-b5c2-61e8edf988aa", "is_component": false, "last_tested_version": "1.2.0", "name": "News Aggregator", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json b/src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json index a8ed08159..8821274d0 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json @@ -7,7 +7,7 @@ "data": { "sourceHandle": { "dataType": "AgentQL", - "id": "AgentQL-7RVLY", + "id": "AgentQL-FEfZe", "name": "component_as_tool", "output_types": [ "Tool" @@ -15,19 +15,19 @@ }, "targetHandle": { "fieldName": "tools", - "id": "Agent-O0yDh", + "id": "Agent-C2lNW", "inputTypes": [ "Tool" ], "type": "other" } }, - "id": "reactflow__edge-AgentQL-7RVLY{œdataTypeœ:œAgentQLœ,œidœ:œAgentQL-7RVLYœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-O0yDh{œfieldNameœ:œtoolsœ,œidœ:œAgent-O0yDhœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "id": "reactflow__edge-AgentQL-FEfZe{œdataTypeœ:œAgentQLœ,œidœ:œAgentQL-FEfZeœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-C2lNW{œfieldNameœ:œtoolsœ,œidœ:œAgent-C2lNWœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", "selected": false, - "source": "AgentQL-7RVLY", - "sourceHandle": "{œdataTypeœ: œAgentQLœ, œidœ: œAgentQL-7RVLYœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-O0yDh", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-O0yDhœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "source": "AgentQL-FEfZe", + "sourceHandle": "{œdataTypeœ: œAgentQLœ, œidœ: œAgentQL-FEfZeœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-C2lNW", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-C2lNWœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" }, { "animated": false, @@ -35,7 +35,7 @@ "data": { "sourceHandle": { "dataType": "TavilySearchComponent", - "id": "TavilySearchComponent-Wm5fh", + "id": "TavilySearchComponent-ilBh2", "name": "component_as_tool", "output_types": [ "Tool" @@ -43,19 +43,19 @@ }, "targetHandle": { "fieldName": "tools", - "id": "Agent-O0yDh", + "id": "Agent-C2lNW", "inputTypes": [ "Tool" ], "type": "other" } }, - "id": "reactflow__edge-TavilySearchComponent-Wm5fh{œdataTypeœ:œTavilySearchComponentœ,œidœ:œTavilySearchComponent-Wm5fhœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-O0yDh{œfieldNameœ:œtoolsœ,œidœ:œAgent-O0yDhœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "id": "reactflow__edge-TavilySearchComponent-ilBh2{œdataTypeœ:œTavilySearchComponentœ,œidœ:œTavilySearchComponent-ilBh2œ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-C2lNW{œfieldNameœ:œtoolsœ,œidœ:œAgent-C2lNWœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", "selected": false, - "source": "TavilySearchComponent-Wm5fh", - "sourceHandle": "{œdataTypeœ: œTavilySearchComponentœ, œidœ: œTavilySearchComponent-Wm5fhœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-O0yDh", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-O0yDhœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "source": "TavilySearchComponent-ilBh2", + "sourceHandle": "{œdataTypeœ: œTavilySearchComponentœ, œidœ: œTavilySearchComponent-ilBh2œ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-C2lNW", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-C2lNWœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" }, { "animated": false, @@ -63,7 +63,7 @@ "data": { "sourceHandle": { "dataType": "ChatInput", - "id": "ChatInput-JghTQ", + "id": "ChatInput-ikOpG", "name": "message", "output_types": [ "Message" @@ -71,25 +71,54 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Agent-O0yDh", + "id": "Agent-C2lNW", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-ChatInput-JghTQ{œdataTypeœ:œChatInputœ,œidœ:œChatInput-JghTQœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-O0yDh{œfieldNameœ:œinput_valueœ,œidœ:œAgent-O0yDhœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "id": "reactflow__edge-ChatInput-ikOpG{œdataTypeœ:œChatInputœ,œidœ:œChatInput-ikOpGœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-C2lNW{œfieldNameœ:œinput_valueœ,œidœ:œAgent-C2lNWœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", "selected": false, - "source": "ChatInput-JghTQ", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-JghTQœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-O0yDh", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-O0yDhœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "source": "ChatInput-ikOpG", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-ikOpGœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-C2lNW", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-C2lNWœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + }, + { + "animated": false, + "data": { + "sourceHandle": { + "dataType": "Agent", + "id": "Agent-C2lNW", + "name": "response", + "output_types": [ + "Message" + ] + }, + "targetHandle": { + "fieldName": "input_value", + "id": "ChatOutput-uu7cZ", + "inputTypes": [ + "Data", + "DataFrame", + "Message" + ], + "type": "other" + } + }, + "id": "xy-edge__Agent-C2lNW{œdataTypeœ:œAgentœ,œidœ:œAgent-C2lNWœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-uu7cZ{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-uu7cZœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œotherœ}", + "selected": false, + "source": "Agent-C2lNW", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-C2lNWœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-uu7cZ", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-uu7cZœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œotherœ}" } ], "nodes": [ { "data": { - "id": "ChatInput-JghTQ", + "id": "ChatInput-ikOpG", "node": { "base_classes": [ "Message" @@ -386,21 +415,21 @@ "type": "ChatInput" }, "dragging": false, - "id": "ChatInput-JghTQ", + "id": "ChatInput-ikOpG", "measured": { "height": 66, "width": 192 }, "position": { - "x": 32.99622536761149, - "y": 367.6878380048698 + "x": 29.709503239241485, + "y": 315.10028395094986 }, "selected": false, "type": "genericNode" }, { "data": { - "id": "ChatOutput-HVvix", + "id": "ChatOutput-uu7cZ", "node": { "base_classes": [ "Message" @@ -692,7 +721,7 @@ "type": "ChatOutput" }, "dragging": false, - "id": "ChatOutput-HVvix", + "id": "ChatOutput-uu7cZ", "measured": { "height": 66, "width": 192 @@ -706,7 +735,7 @@ }, { "data": { - "id": "TavilySearchComponent-Wm5fh", + "id": "TavilySearchComponent-ilBh2", "node": { "base_classes": [ "Data", @@ -1039,9 +1068,9 @@ "type": "TavilySearchComponent" }, "dragging": false, - "id": "TavilySearchComponent-Wm5fh", + "id": "TavilySearchComponent-ilBh2", "measured": { - "height": 435, + "height": 437, "width": 320 }, "position": { @@ -1055,7 +1084,7 @@ "data": { "description": "Uses AgentQL API to extract structured data from a given URL.", "display_name": "AgentQL Query Data", - "id": "AgentQL-7RVLY", + "id": "AgentQL-FEfZe", "node": { "base_classes": [ "Data" @@ -1360,6 +1389,19 @@ "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" + }, { "default": true, "description": "Indicates whether the tool is currently active. Set to True to activate this tool.", @@ -1446,21 +1488,21 @@ "type": "AgentQL" }, "dragging": false, - "id": "AgentQL-7RVLY", + "id": "AgentQL-FEfZe", "measured": { - "height": 599, + "height": 602, "width": 320 }, "position": { - "x": 258.9873392343597, - "y": -351.3788533005941 + "x": 331.42030247682777, + "y": -359.7956260200852 }, "selected": false, "type": "genericNode" }, { "data": { - "id": "Agent-O0yDh", + "id": "Agent-C2lNW", "node": { "base_classes": [ "Message" @@ -1635,7 +1677,7 @@ "input_types": [ "Message" ], - "load_from_db": false, + "load_from_db": true, "name": "api_key", "password": true, "placeholder": "", @@ -1643,7 +1685,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": "OPENAI_API_KEY" }, "code": { "advanced": true, @@ -2136,9 +2178,9 @@ "type": "Agent" }, "dragging": false, - "id": "Agent-O0yDh", + "id": "Agent-C2lNW", "measured": { - "height": 621, + "height": 624, "width": 320 }, "position": { @@ -2150,7 +2192,7 @@ }, { "data": { - "id": "note-XsoMT", + "id": "note-fxnAw", "node": { "description": "### 💡 Add your OpenAI API key here", "display_name": "", @@ -2162,7 +2204,7 @@ "type": "note" }, "dragging": false, - "id": "note-XsoMT", + "id": "note-fxnAw", "measured": { "height": 324, "width": 324 @@ -2176,7 +2218,7 @@ }, { "data": { - "id": "note-WnGqC", + "id": "note-zwQr5", "node": { "description": "### 💡 Add your AgentQL API key here", "display_name": "", @@ -2189,21 +2231,21 @@ }, "dragging": false, "height": 346, - "id": "note-WnGqC", + "id": "note-zwQr5", "measured": { "height": 346, "width": 324 }, "position": { - "x": 328.21954223681814, - "y": -160.4106577664784 + "x": 338.27967602049426, + "y": -413.92602911511665 }, "selected": false, "type": "noteNode" }, { "data": { - "id": "note-Qqusp", + "id": "note-MwIwp", "node": { "description": "# Price Deal Finder \n\nThis flow extracts structured data from a URL.\n## Prerequisites\n\n* **[AgentQL API Key](https://dev.agentql.com/api-keys)**\n* **[OpenAI API Key](https://platform.openai.com/)**\n* **[TavilyAI Search API Key](https://tavily.com/)**\n\n## Quick Start\n\n1. Add your [AgentQL API Key](https://dev.agentql.com/api-keys) to the **AgentQL** component.\n2. Add your [OpenAI API Key](https://platform.openai.com/) to the **Agent** component.\n3. Add your [TavilyAI Search API Key](https://tavily.com/) to the **Tavily AI Search** component.\n4. Click **Playground** and enter a product in chat. For example, search \"Nintendo Switch - OLed Model - w/ White Joy-Con\")\n* The **Agent** component populates the **Tavily AI Search** component's **Search Query** field, and the **Agent QL** component's **URL** and **Query** fields. \n\n* The **Agent** returns a structured response to your searcn in the chat.", "display_name": "", @@ -2214,7 +2256,7 @@ }, "dragging": false, "height": 674, - "id": "note-Qqusp", + "id": "note-MwIwp", "measured": { "height": 674, "width": 467 @@ -2230,7 +2272,7 @@ }, { "data": { - "id": "note-jNCi3", + "id": "note-Aa3h7", "node": { "description": "### 💡 Add your Tavily AI Search key here", "display_name": "", @@ -2243,14 +2285,14 @@ }, "dragging": false, "height": 324, - "id": "note-jNCi3", + "id": "note-Aa3h7", "measured": { "height": 324, "width": 344 }, "position": { - "x": 331.0865722920669, - "y": 447.2225407807426 + "x": 343.1587328324782, + "y": 449.2345675374778 }, "resizing": false, "selected": false, @@ -2259,14 +2301,14 @@ } ], "viewport": { - "x": 407.36179700368467, - "y": 437.56262661430094, - "zoom": 0.7174828925593176 + "x": 434.3618973589291, + "y": 283.7646795952994, + "zoom": 0.6085090013349782 } }, "description": "Searches and compares product prices across multiple e-commerce platforms. ", "endpoint_name": null, - "id": "b91c6971-fe73-479b-b5d3-d08ac651ea21", + "id": "7a42e7d2-6f97-4df6-bbbb-f90705ed52d9", "is_component": false, "last_tested_version": "1.2.0", "name": "Price Deal Finder", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json b/src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json index f082a451d..cec6df532 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Sequential Tasks Agents.json @@ -7,7 +7,7 @@ "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-KQVLR", + "id": "Prompt-T6lKn", "name": "prompt", "output_types": [ "Message" @@ -15,18 +15,19 @@ }, "targetHandle": { "fieldName": "system_prompt", - "id": "Agent-mzPNm", + "id": "Agent-RLteT", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-KQVLR{œdataTypeœ:œPromptœ,œidœ:œPrompt-KQVLRœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-mzPNm{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-mzPNmœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "Prompt-KQVLR", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-KQVLRœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-mzPNm", - "targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-mzPNmœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Prompt-T6lKn{œdataTypeœ:œPromptœ,œidœ:œPrompt-T6lKnœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-RLteT{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-RLteTœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "selected": false, + "source": "Prompt-T6lKn", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-T6lKnœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-RLteT", + "targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-RLteTœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -34,7 +35,7 @@ "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-zC2bp", + "id": "Prompt-CiSeG", "name": "prompt", "output_types": [ "Message" @@ -42,18 +43,19 @@ }, "targetHandle": { "fieldName": "system_prompt", - "id": "Agent-PNvaZ", + "id": "Agent-IOYVB", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-zC2bp{œdataTypeœ:œPromptœ,œidœ:œPrompt-zC2bpœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-PNvaZ{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-PNvaZœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "Prompt-zC2bp", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-zC2bpœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-PNvaZ", - "targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-PNvaZœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Prompt-CiSeG{œdataTypeœ:œPromptœ,œidœ:œPrompt-CiSeGœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-IOYVB{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-IOYVBœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "selected": false, + "source": "Prompt-CiSeG", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-CiSeGœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-IOYVB", + "targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-IOYVBœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -61,7 +63,7 @@ "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-PNvaZ", + "id": "Agent-IOYVB", "name": "response", "output_types": [ "Message" @@ -69,7 +71,7 @@ }, "targetHandle": { "fieldName": "finance_agent_output", - "id": "Prompt-KQVLR", + "id": "Prompt-T6lKn", "inputTypes": [ "Message", "Text" @@ -77,11 +79,12 @@ "type": "str" } }, - "id": "reactflow__edge-Agent-PNvaZ{œdataTypeœ:œAgentœ,œidœ:œAgent-PNvaZœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Prompt-KQVLR{œfieldNameœ:œfinance_agent_outputœ,œidœ:œPrompt-KQVLRœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", - "source": "Agent-PNvaZ", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-PNvaZœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-KQVLR", - "targetHandle": "{œfieldNameœ: œfinance_agent_outputœ, œidœ: œPrompt-KQVLRœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Agent-IOYVB{œdataTypeœ:œAgentœ,œidœ:œAgent-IOYVBœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Prompt-T6lKn{œfieldNameœ:œfinance_agent_outputœ,œidœ:œPrompt-T6lKnœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "selected": false, + "source": "Agent-IOYVB", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-IOYVBœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-T6lKn", + "targetHandle": "{œfieldNameœ: œfinance_agent_outputœ, œidœ: œPrompt-T6lKnœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -89,7 +92,7 @@ "data": { "sourceHandle": { "dataType": "ChatInput", - "id": "ChatInput-ZyZgH", + "id": "ChatInput-GHRcw", "name": "message", "output_types": [ "Message" @@ -97,18 +100,19 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Agent-58C6Q", + "id": "Agent-yrZkV", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-ChatInput-ZyZgH{œdataTypeœ:œChatInputœ,œidœ:œChatInput-ZyZgHœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-58C6Q{œfieldNameœ:œinput_valueœ,œidœ:œAgent-58C6Qœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "ChatInput-ZyZgH", - "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-ZyZgHœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-58C6Q", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-58C6Qœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-ChatInput-GHRcw{œdataTypeœ:œChatInputœ,œidœ:œChatInput-GHRcwœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-yrZkV{œfieldNameœ:œinput_valueœ,œidœ:œAgent-yrZkVœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "selected": false, + "source": "ChatInput-GHRcw", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-GHRcwœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-yrZkV", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-yrZkVœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -116,7 +120,7 @@ "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-b9wSh", + "id": "Prompt-8FZo4", "name": "prompt", "output_types": [ "Message" @@ -124,18 +128,19 @@ }, "targetHandle": { "fieldName": "system_prompt", - "id": "Agent-58C6Q", + "id": "Agent-yrZkV", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-b9wSh{œdataTypeœ:œPromptœ,œidœ:œPrompt-b9wShœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-58C6Q{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-58C6Qœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "Prompt-b9wSh", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-b9wShœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-58C6Q", - "targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-58C6Qœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Prompt-8FZo4{œdataTypeœ:œPromptœ,œidœ:œPrompt-8FZo4œ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-Agent-yrZkV{œfieldNameœ:œsystem_promptœ,œidœ:œAgent-yrZkVœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "selected": false, + "source": "Prompt-8FZo4", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-8FZo4œ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-yrZkV", + "targetHandle": "{œfieldNameœ: œsystem_promptœ, œidœ: œAgent-yrZkVœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -143,7 +148,7 @@ "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-58C6Q", + "id": "Agent-yrZkV", "name": "response", "output_types": [ "Message" @@ -151,18 +156,19 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "Agent-PNvaZ", + "id": "Agent-IOYVB", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Agent-58C6Q{œdataTypeœ:œAgentœ,œidœ:œAgent-58C6Qœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Agent-PNvaZ{œfieldNameœ:œinput_valueœ,œidœ:œAgent-PNvaZœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "Agent-58C6Q", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-58C6Qœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "Agent-PNvaZ", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-PNvaZœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Agent-yrZkV{œdataTypeœ:œAgentœ,œidœ:œAgent-yrZkVœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Agent-IOYVB{œfieldNameœ:œinput_valueœ,œidœ:œAgent-IOYVBœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "selected": false, + "source": "Agent-yrZkV", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-yrZkVœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "Agent-IOYVB", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œAgent-IOYVBœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { "animated": false, @@ -170,7 +176,7 @@ "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-58C6Q", + "id": "Agent-yrZkV", "name": "response", "output_types": [ "Message" @@ -178,7 +184,7 @@ }, "targetHandle": { "fieldName": "research_agent_output", - "id": "Prompt-KQVLR", + "id": "Prompt-T6lKn", "inputTypes": [ "Message", "Text" @@ -186,18 +192,20 @@ "type": "str" } }, - "id": "reactflow__edge-Agent-58C6Q{œdataTypeœ:œAgentœ,œidœ:œAgent-58C6Qœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Prompt-KQVLR{œfieldNameœ:œresearch_agent_outputœ,œidœ:œPrompt-KQVLRœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", - "source": "Agent-58C6Q", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-58C6Qœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-KQVLR", - "targetHandle": "{œfieldNameœ: œresearch_agent_outputœ, œidœ: œPrompt-KQVLRœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Agent-yrZkV{œdataTypeœ:œAgentœ,œidœ:œAgent-yrZkVœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-Prompt-T6lKn{œfieldNameœ:œresearch_agent_outputœ,œidœ:œPrompt-T6lKnœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "selected": false, + "source": "Agent-yrZkV", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-yrZkVœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-T6lKn", + "targetHandle": "{œfieldNameœ: œresearch_agent_outputœ, œidœ: œPrompt-T6lKnœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { + "animated": false, "className": "", "data": { "sourceHandle": { "dataType": "CalculatorComponent", - "id": "CalculatorComponent-idZ9Q", + "id": "CalculatorComponent-X0H1Z", "name": "component_as_tool", "output_types": [ "Tool" @@ -205,25 +213,27 @@ }, "targetHandle": { "fieldName": "tools", - "id": "Agent-mzPNm", + "id": "Agent-RLteT", "inputTypes": [ "Tool" ], "type": "other" } }, - "id": "reactflow__edge-CalculatorComponent-idZ9Q{œdataTypeœ:œCalculatorComponentœ,œidœ:œCalculatorComponent-idZ9Qœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-mzPNm{œfieldNameœ:œtoolsœ,œidœ:œAgent-mzPNmœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", - "source": "CalculatorComponent-idZ9Q", - "sourceHandle": "{œdataTypeœ: œCalculatorComponentœ, œidœ: œCalculatorComponent-idZ9Qœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-mzPNm", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-mzPNmœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "id": "reactflow__edge-CalculatorComponent-X0H1Z{œdataTypeœ:œCalculatorComponentœ,œidœ:œCalculatorComponent-X0H1Zœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-RLteT{œfieldNameœ:œtoolsœ,œidœ:œAgent-RLteTœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "selected": false, + "source": "CalculatorComponent-X0H1Z", + "sourceHandle": "{œdataTypeœ: œCalculatorComponentœ, œidœ: œCalculatorComponent-X0H1Zœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-RLteT", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-RLteTœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" }, { + "animated": false, "className": "", "data": { "sourceHandle": { "dataType": "YfinanceComponent", - "id": "YfinanceComponent-uJAk8", + "id": "YfinanceComponent-ZvUwB", "name": "component_as_tool", "output_types": [ "Tool" @@ -231,25 +241,27 @@ }, "targetHandle": { "fieldName": "tools", - "id": "Agent-PNvaZ", + "id": "Agent-IOYVB", "inputTypes": [ "Tool" ], "type": "other" } }, - "id": "reactflow__edge-YfinanceComponent-uJAk8{œdataTypeœ:œYfinanceComponentœ,œidœ:œYfinanceComponent-uJAk8œ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-PNvaZ{œfieldNameœ:œtoolsœ,œidœ:œAgent-PNvaZœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", - "source": "YfinanceComponent-uJAk8", - "sourceHandle": "{œdataTypeœ: œYfinanceComponentœ, œidœ: œYfinanceComponent-uJAk8œ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-PNvaZ", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-PNvaZœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "id": "reactflow__edge-YfinanceComponent-ZvUwB{œdataTypeœ:œYfinanceComponentœ,œidœ:œYfinanceComponent-ZvUwBœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-IOYVB{œfieldNameœ:œtoolsœ,œidœ:œAgent-IOYVBœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "selected": false, + "source": "YfinanceComponent-ZvUwB", + "sourceHandle": "{œdataTypeœ: œYfinanceComponentœ, œidœ: œYfinanceComponent-ZvUwBœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-IOYVB", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-IOYVBœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" }, { + "animated": false, "className": "", "data": { "sourceHandle": { "dataType": "TavilySearchComponent", - "id": "TavilySearchComponent-UfEaB", + "id": "TavilySearchComponent-47Sep", "name": "component_as_tool", "output_types": [ "Tool" @@ -257,24 +269,27 @@ }, "targetHandle": { "fieldName": "tools", - "id": "Agent-58C6Q", + "id": "Agent-yrZkV", "inputTypes": [ "Tool" ], "type": "other" } }, - "id": "reactflow__edge-TavilySearchComponent-UfEaB{œdataTypeœ:œTavilySearchComponentœ,œidœ:œTavilySearchComponent-UfEaBœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-58C6Q{œfieldNameœ:œtoolsœ,œidœ:œAgent-58C6Qœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", - "source": "TavilySearchComponent-UfEaB", - "sourceHandle": "{œdataTypeœ: œTavilySearchComponentœ, œidœ: œTavilySearchComponent-UfEaBœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", - "target": "Agent-58C6Q", - "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-58C6Qœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" + "id": "reactflow__edge-TavilySearchComponent-47Sep{œdataTypeœ:œTavilySearchComponentœ,œidœ:œTavilySearchComponent-47Sepœ,œnameœ:œcomponent_as_toolœ,œoutput_typesœ:[œToolœ]}-Agent-yrZkV{œfieldNameœ:œtoolsœ,œidœ:œAgent-yrZkVœ,œinputTypesœ:[œToolœ],œtypeœ:œotherœ}", + "selected": false, + "source": "TavilySearchComponent-47Sep", + "sourceHandle": "{œdataTypeœ: œTavilySearchComponentœ, œidœ: œTavilySearchComponent-47Sepœ, œnameœ: œcomponent_as_toolœ, œoutput_typesœ: [œToolœ]}", + "target": "Agent-yrZkV", + "targetHandle": "{œfieldNameœ: œtoolsœ, œidœ: œAgent-yrZkVœ, œinputTypesœ: [œToolœ], œtypeœ: œotherœ}" }, { + "animated": false, + "className": "", "data": { "sourceHandle": { "dataType": "Agent", - "id": "Agent-mzPNm", + "id": "Agent-RLteT", "name": "response", "output_types": [ "Message" @@ -282,7 +297,7 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-6kq7Z", + "id": "ChatOutput-8B8h5", "inputTypes": [ "Data", "DataFrame", @@ -291,11 +306,12 @@ "type": "other" } }, - "id": "xy-edge__Agent-mzPNm{œdataTypeœ:œAgentœ,œidœ:œAgent-mzPNmœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-6kq7Z{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-6kq7Zœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œotherœ}", - "source": "Agent-mzPNm", - "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-mzPNmœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", - "target": "ChatOutput-6kq7Z", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-6kq7Zœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œotherœ}" + "id": "reactflow__edge-Agent-RLteT{œdataTypeœ:œAgentœ,œidœ:œAgent-RLteTœ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-8B8h5{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-8B8h5œ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œotherœ}", + "selected": false, + "source": "Agent-RLteT", + "sourceHandle": "{œdataTypeœ: œAgentœ, œidœ: œAgent-RLteTœ, œnameœ: œresponseœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-8B8h5", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-8B8h5œ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œotherœ}" } ], "nodes": [ @@ -303,7 +319,7 @@ "data": { "description": "Define the agent's instructions, then enter a task to complete using tools.", "display_name": "Finance Agent", - "id": "Agent-PNvaZ", + "id": "Agent-IOYVB", "node": { "base_classes": [ "Message" @@ -453,7 +469,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": "OPENAI_API_KEY" }, "code": { "advanced": true, @@ -902,7 +918,7 @@ }, "dragging": false, "height": 650, - "id": "Agent-PNvaZ", + "id": "Agent-IOYVB", "measured": { "height": 650, "width": 320 @@ -923,7 +939,7 @@ "data": { "description": "Define the agent's instructions, then enter a task to complete using tools.", "display_name": "Analysis & Editor Agent", - "id": "Agent-mzPNm", + "id": "Agent-RLteT", "node": { "base_classes": [ "Message" @@ -1073,7 +1089,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": "OPENAI_API_KEY" }, "code": { "advanced": true, @@ -1522,7 +1538,7 @@ }, "dragging": false, "height": 650, - "id": "Agent-mzPNm", + "id": "Agent-RLteT", "measured": { "height": 650, "width": 320 @@ -1543,7 +1559,7 @@ "data": { "description": "Create a prompt template with dynamic variables.", "display_name": "Prompt", - "id": "Prompt-b9wSh", + "id": "Prompt-8FZo4", "node": { "base_classes": [ "Message" @@ -1561,7 +1577,7 @@ "field_order": [ "template" ], - "frozen": true, + "frozen": false, "full_path": null, "icon": "prompts", "is_composition": null, @@ -1655,7 +1671,7 @@ }, "dragging": false, "height": 260, - "id": "Prompt-b9wSh", + "id": "Prompt-8FZo4", "measured": { "height": 260, "width": 320 @@ -1676,7 +1692,7 @@ "data": { "description": "Create a prompt template with dynamic variables.", "display_name": "Prompt", - "id": "Prompt-zC2bp", + "id": "Prompt-CiSeG", "node": { "base_classes": [ "Message" @@ -1788,7 +1804,7 @@ }, "dragging": false, "height": 260, - "id": "Prompt-zC2bp", + "id": "Prompt-CiSeG", "measured": { "height": 260, "width": 320 @@ -1809,7 +1825,7 @@ "data": { "description": "Create a prompt template with dynamic variables.", "display_name": "Prompt", - "id": "Prompt-KQVLR", + "id": "Prompt-T6lKn", "node": { "base_classes": [ "Message" @@ -1970,7 +1986,7 @@ }, "dragging": false, "height": 433, - "id": "Prompt-KQVLR", + "id": "Prompt-T6lKn", "measured": { "height": 433, "width": 320 @@ -1989,7 +2005,7 @@ }, { "data": { - "id": "ChatInput-ZyZgH", + "id": "ChatInput-GHRcw", "node": { "base_classes": [ "Message" @@ -2012,7 +2028,7 @@ "chat_icon", "text_color" ], - "frozen": true, + "frozen": false, "icon": "MessagesSquare", "legacy": false, "lf_version": "1.0.19.post2", @@ -2271,7 +2287,7 @@ }, "dragging": false, "height": 234, - "id": "ChatInput-ZyZgH", + "id": "ChatInput-GHRcw", "measured": { "height": 234, "width": 320 @@ -2290,7 +2306,7 @@ }, { "data": { - "id": "note-yWlba", + "id": "note-HegN0", "node": { "description": "# Sequential Tasks Agents\n\n## Overview\nThis flow demonstrates how to chain multiple AI agents for comprehensive research and analysis. Each agent specializes in different aspects of the research process, building upon the previous agent's work.\n\n## How to Use the Flow\n\n1. **Input Your Query** 🎯\n - Be specific and clear\n - Include key aspects you want analyzed\n - Examples:\n ```\n Good: \"Should I invest in Tesla (TSLA)? Focus on AI development impact\"\n Bad: \"Tell me about Tesla\"\n ```\n\n2. **Research Agent Process** 🔍\n - Utilizes Tavily Search for comprehensive research\n\n\n3. **Specialized Analysis** 📊\n - Each agent adds unique value:\n ```\n Research Agent → Deep Research & Context\n ↓\n Finance Agent → Data Analysis & Metrics\n ↓\n Editor Agent → Final Synthesis & Report\n ```\n\n4. **Output Format** 📝\n - Structured report\n - Embedded images and charts\n - Data-backed insights\n - Clear recommendations\n\n## Pro Tips\n\n### Query Construction\n- Include specific points of interest\n- Mention required metrics or data points\n- Specify time frames if relevant\n\n### Flow Customization\n- Modify agent prompts for different use cases\n- Add or remove tools as needed\n\n## Common Applications\n- Investment Research\n- Market Analysis\n- Competitive Intelligence\n- Industry Reports\n- Technology Impact Studies\n\n⚡ **Best Practice**: Start with a test query to understand the flow's capabilities before running complex analyses.\n\n---\n*Note: This flow template uses financial analysis as an example but can be adapted for any research-intensive task requiring multiple perspectives and data sources.*", "display_name": "", @@ -2301,21 +2317,21 @@ }, "dragging": false, "height": 800, - "id": "note-yWlba", + "id": "note-HegN0", "measured": { "height": 800, "width": 601 }, "position": { "x": -2122.739127560837, - "y": -1302.6582482086806 + "y": -1305.2541787135094 }, "positionAbsolute": { "x": -2122.739127560837, "y": -1302.6582482086806 }, "resizing": false, - "selected": false, + "selected": true, "style": { "height": 800, "width": 600 @@ -2325,7 +2341,7 @@ }, { "data": { - "id": "note-epw2j", + "id": "note-K5y7T", "node": { "description": "## What Are Sequential Task Agents?\nA system where multiple AI agents work in sequence, each specializing in specific tasks and passing their output to the next agent in the chain. Think of it as an assembly line where each agent adds value to the final result.\n\n## How It Works\n1. **First Agent** → **Second Agent** → **Third Agent** → **Final Output**\n - Each agent receives input from the previous one\n - Processes and enhances the information\n - Passes refined output forward\n\n## Key Benefits\n- **Specialization**: Each agent focuses on specific tasks\n- **Progressive Refinement**: Information gets enhanced at each step\n- **Structured Output**: Final result combines multiple perspectives\n- **Quality Control**: Each agent validates and improves previous work\n\n## Building Your Own Sequence\n1. **Plan Your Chain**\n - Identify distinct tasks\n - Determine logical order\n - Define input/output requirements\n\n2. **Configure Agents**\n - Give each agent clear instructions\n - Ensure compatible outputs/inputs\n - Set appropriate tools for each agent\n\n3. **Connect the Flow**\n - Link agents in proper order\n - Test data flow between agents\n - Verify final output format\n\n## Example Applications\n- Research → Analysis → Report Writing\n- Data Collection → Processing → Visualization\n- Content Research → Writing → Editing\n- Market Analysis → Financial Review → Investment Advice\n\n⭐ **Pro Tip**: The strength of sequential agents comes from how well they complement each other's capabilities.\n\nThis template uses financial analysis as an example, but you can adapt it for any multi-step process requiring different expertise at each stage.", "display_name": "", @@ -2338,14 +2354,14 @@ }, "dragging": false, "height": 800, - "id": "note-epw2j", + "id": "note-K5y7T", "measured": { "height": 800, "width": 601 }, "position": { - "x": -1456.0688717707517, - "y": -1916.6876704866322 + "x": -1423.4595108457968, + "y": -1965.6017118740644 }, "positionAbsolute": { "x": -1456.0688717707517, @@ -2364,7 +2380,7 @@ "data": { "description": "Define the agent's instructions, then enter a task to complete using tools.", "display_name": "Researcher Agent", - "id": "Agent-58C6Q", + "id": "Agent-yrZkV", "node": { "base_classes": [ "Message" @@ -2404,7 +2420,7 @@ "template", "add_current_date_tool" ], - "frozen": true, + "frozen": false, "icon": "bot", "legacy": false, "lf_version": "1.0.19.post2", @@ -2514,7 +2530,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": "OPENAI_API_KEY" }, "code": { "advanced": true, @@ -2963,7 +2979,7 @@ }, "dragging": false, "height": 650, - "id": "Agent-58C6Q", + "id": "Agent-yrZkV", "measured": { "height": 650, "width": 320 @@ -2982,7 +2998,7 @@ }, { "data": { - "id": "note-xVdpE", + "id": "note-66UOh", "node": { "description": "## Get your API key at [https://tavily.com](https://tavily.com)\n", "display_name": "", @@ -2995,7 +3011,7 @@ }, "dragging": false, "height": 324, - "id": "note-xVdpE", + "id": "note-66UOh", "measured": { "height": 324, "width": 348 @@ -3019,7 +3035,7 @@ }, { "data": { - "id": "note-EMxHt", + "id": "note-4EW6x", "node": { "description": "## Configure the agent by obtaining your OpenAI API key from [platform.openai.com](https://platform.openai.com). Under \"Model Provider\", choose:\n- OpenAI: Default, requires only API key\n- Anthropic/Azure/Groq/NVIDIA/SambaNova: Each requires their own API keys\n- Custom: Use your own model endpoint + authentication\n\nSelect model and input API key before running the flow.", "display_name": "", @@ -3032,14 +3048,14 @@ }, "dragging": false, "height": 324, - "id": "note-EMxHt", + "id": "note-4EW6x", "measured": { "height": 324, "width": 371 }, "position": { - "x": -739.4383746675942, - "y": -1672.0874594411662 + "x": -736.720927923848, + "y": -1707.414267109867 }, "positionAbsolute": { "x": -739.4383746675942, @@ -3056,7 +3072,7 @@ }, { "data": { - "id": "YfinanceComponent-uJAk8", + "id": "YfinanceComponent-ZvUwB", "node": { "base_classes": [ "Data", @@ -3303,7 +3319,7 @@ "type": "YfinanceComponent" }, "dragging": true, - "id": "YfinanceComponent-uJAk8", + "id": "YfinanceComponent-ZvUwB", "measured": { "height": 519, "width": 320 @@ -3317,7 +3333,7 @@ }, { "data": { - "id": "CalculatorComponent-idZ9Q", + "id": "CalculatorComponent-X0H1Z", "node": { "base_classes": [ "Data" @@ -3492,7 +3508,7 @@ "type": "CalculatorComponent" }, "dragging": false, - "id": "CalculatorComponent-idZ9Q", + "id": "CalculatorComponent-X0H1Z", "measured": { "height": 334, "width": 320 @@ -3506,7 +3522,7 @@ }, { "data": { - "id": "TavilySearchComponent-UfEaB", + "id": "TavilySearchComponent-47Sep", "node": { "base_classes": [ "Data", @@ -3751,6 +3767,7 @@ "table_schema": { "columns": [ { + "default": "None", "description": "Specify the name of the tool.", "disable_edit": false, "display_name": "Tool Name", @@ -3760,9 +3777,10 @@ "hidden": false, "name": "name", "sortable": false, - "type": "text" + "type": "str" }, { + "default": "None", "description": "Describe the purpose of the tool.", "disable_edit": false, "display_name": "Tool Description", @@ -3772,9 +3790,10 @@ "hidden": false, "name": "description", "sortable": false, - "type": "text" + "type": "str" }, { + "default": "None", "description": "The default identifiers for the tools and cannot be changed.", "disable_edit": true, "display_name": "Tool Identifiers", @@ -3784,7 +3803,20 @@ "hidden": true, "name": "tags", "sortable": false, - "type": "text" + "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" } ] }, @@ -3841,7 +3873,7 @@ "type": "TavilySearchComponent" }, "dragging": false, - "id": "TavilySearchComponent-UfEaB", + "id": "TavilySearchComponent-47Sep", "measured": { "height": 437, "width": 320 @@ -3855,7 +3887,7 @@ }, { "data": { - "id": "ChatOutput-6kq7Z", + "id": "ChatOutput-8B8h5", "node": { "base_classes": [ "Message" @@ -4150,7 +4182,7 @@ "type": "ChatOutput" }, "dragging": false, - "id": "ChatOutput-6kq7Z", + "id": "ChatOutput-8B8h5", "measured": { "height": 66, "width": 192 @@ -4164,18 +4196,16 @@ } ], "viewport": { - "x": 556.7510301801152, - "y": 940.5287846680051, - "zoom": 0.43409522578672 + "x": 854.5685722982503, + "y": 897.7897778064577, + "zoom": 0.38521832465848593 } }, "description": "This Agent is designed to systematically execute a series of tasks following a meticulously predefined sequence. By adhering to this structured order, the Agent ensures that each task is completed efficiently and effectively, optimizing overall performance and maintaining a high level of accuracy.", "endpoint_name": null, - "gradient": "1", - "icon": "ListChecks", - "id": "9a7ffc1e-5cbb-4f16-8226-2b68390a4228", + "id": "e0fb1fbb-c819-4b74-80e0-a62b6cac597e", "is_component": false, - "last_tested_version": "1.1.5", + "last_tested_version": "1.2.0", "name": "Sequential Tasks Agents", "tags": [ "assistants",