From d4a3e83e801d53627192fd21401bdd87ba4ef2e9 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Tue, 18 Jun 2024 23:33:54 -0300 Subject: [PATCH] Update Blog Writer project --- ...Writter.json => Langflow Blog Writer.json} | 1121 ++++++++++------- .../Langflow Document QA.json | 8 +- 2 files changed, 670 insertions(+), 459 deletions(-) rename src/backend/base/langflow/initial_setup/starter_projects/{Langflow Blog Writter.json => Langflow Blog Writer.json} (64%) diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Langflow Blog Writter.json b/src/backend/base/langflow/initial_setup/starter_projects/Langflow Blog Writer.json similarity index 64% rename from src/backend/base/langflow/initial_setup/starter_projects/Langflow Blog Writter.json rename to src/backend/base/langflow/initial_setup/starter_projects/Langflow Blog Writer.json index f5c073799..0b4ab3a18 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Langflow Blog Writter.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Langflow Blog Writer.json @@ -2,42 +2,139 @@ "data": { "edges": [ { - "className": "stroke-gray-900 stroke-connection", "data": { "sourceHandle": { - "dataType": "URL", - "id": "URL-HYPkR", - "name": "record", - "output_types": [] + "dataType": "TextInput", + "id": "TextInput-xeTQg", + "name": "text", + "output_types": [ + "Message" + ] }, "targetHandle": { - "fieldName": "reference_2", - "id": "Prompt-Rse03", + "fieldName": "instructions", + "id": "Prompt-GPCfZ", "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", + "Message", "Text" ], "type": "str" } }, - "id": "reactflow__edge-URL-HYPkR{œbaseClassesœ:[œRecordœ],œdataTypeœ:œURLœ,œidœ:œURL-HYPkRœ}-Prompt-Rse03{œfieldNameœ:œreference_2œ,œidœ:œPrompt-Rse03œ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}", - "selected": false, - "source": "URL-HYPkR", - "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-HYPkRœ, œoutput_typesœ: [], œnameœ: œrecordœ}", - "style": { - "stroke": "#555" - }, - "target": "Prompt-Rse03", - "targetHandle": "{œfieldNameœ: œreference_2œ, œidœ: œPrompt-Rse03œ, œinputTypesœ: [œDocumentœ, œBaseOutputParserœ, œRecordœ, œTextœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-TextInput-xeTQg{œdataTypeœ:œTextInputœ,œidœ:œTextInput-xeTQgœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-GPCfZ{œfieldNameœ:œinstructionsœ,œidœ:œPrompt-GPCfZœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "source": "TextInput-xeTQg", + "sourceHandle": "{œdataTypeœ: œTextInputœ, œidœ: œTextInput-xeTQgœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-GPCfZ", + "targetHandle": "{œfieldNameœ: œinstructionsœ, œidœ: œPrompt-GPCfZœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + }, + { + "data": { + "sourceHandle": { + "dataType": "URL", + "id": "URL-ry4Vn", + "name": "data", + "output_types": [ + "Data" + ] + }, + "targetHandle": { + "fieldName": "data", + "id": "ParseData-jFtFL", + "inputTypes": [ + "Data" + ], + "type": "other" + } + }, + "id": "reactflow__edge-URL-ry4Vn{œdataTypeœ:œURLœ,œidœ:œURL-ry4Vnœ,œnameœ:œdataœ,œoutput_typesœ:[œDataœ]}-ParseData-jFtFL{œfieldNameœ:œdataœ,œidœ:œParseData-jFtFLœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", + "selected": false, + "source": "URL-ry4Vn", + "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-ry4Vnœ, œnameœ: œdataœ, œoutput_typesœ: [œDataœ]}", + "target": "ParseData-jFtFL", + "targetHandle": "{œfieldNameœ: œdataœ, œidœ: œParseData-jFtFLœ, œinputTypesœ: [œDataœ], œtypeœ: œotherœ}" + }, + { + "data": { + "sourceHandle": { + "dataType": "URL", + "id": "URL-PAQgR", + "name": "data", + "output_types": [ + "Data" + ] + }, + "targetHandle": { + "fieldName": "data", + "id": "ParseData-vdPxZ", + "inputTypes": [ + "Data" + ], + "type": "other" + } + }, + "id": "reactflow__edge-URL-PAQgR{œdataTypeœ:œURLœ,œidœ:œURL-PAQgRœ,œnameœ:œdataœ,œoutput_typesœ:[œDataœ]}-ParseData-vdPxZ{œfieldNameœ:œdataœ,œidœ:œParseData-vdPxZœ,œinputTypesœ:[œDataœ],œtypeœ:œotherœ}", + "source": "URL-PAQgR", + "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-PAQgRœ, œnameœ: œdataœ, œoutput_typesœ: [œDataœ]}", + "target": "ParseData-vdPxZ", + "targetHandle": "{œfieldNameœ: œdataœ, œidœ: œParseData-vdPxZœ, œinputTypesœ: [œDataœ], œtypeœ: œotherœ}" + }, + { + "data": { + "sourceHandle": { + "dataType": "ParseData", + "id": "ParseData-jFtFL", + "name": "text", + "output_types": [ + "Message" + ] + }, + "targetHandle": { + "fieldName": "reference_2", + "id": "Prompt-GPCfZ", + "inputTypes": [ + "Message", + "Text" + ], + "type": "str" + } + }, + "id": "reactflow__edge-ParseData-jFtFL{œdataTypeœ:œParseDataœ,œidœ:œParseData-jFtFLœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-GPCfZ{œfieldNameœ:œreference_2œ,œidœ:œPrompt-GPCfZœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "source": "ParseData-jFtFL", + "sourceHandle": "{œdataTypeœ: œParseDataœ, œidœ: œParseData-jFtFLœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-GPCfZ", + "targetHandle": "{œfieldNameœ: œreference_2œ, œidœ: œPrompt-GPCfZœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" + }, + { + "data": { + "sourceHandle": { + "dataType": "ParseData", + "id": "ParseData-vdPxZ", + "name": "text", + "output_types": [ + "Message" + ] + }, + "targetHandle": { + "fieldName": "reference_1", + "id": "Prompt-GPCfZ", + "inputTypes": [ + "Message", + "Text" + ], + "type": "str" + } + }, + "id": "reactflow__edge-ParseData-vdPxZ{œdataTypeœ:œParseDataœ,œidœ:œParseData-vdPxZœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-GPCfZ{œfieldNameœ:œreference_1œ,œidœ:œPrompt-GPCfZœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", + "source": "ParseData-vdPxZ", + "sourceHandle": "{œdataTypeœ: œParseDataœ, œidœ: œParseData-vdPxZœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", + "target": "Prompt-GPCfZ", + "targetHandle": "{œfieldNameœ: œreference_1œ, œidœ: œPrompt-GPCfZœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" }, { - "className": "stroke-gray-900 stroke-connection", "data": { "sourceHandle": { "dataType": "OpenAIModel", - "id": "OpenAIModel-gi29P", + "id": "OpenAIModel-NXVBv", "name": "text_output", "output_types": [ "Message" @@ -45,90 +142,24 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "ChatOutput-JPlxl", + "id": "ChatOutput-n5T1m", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-OpenAIModel-gi29P{œbaseClassesœ:[œstrœ,œTextœ,œobjectœ],œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-gi29Pœ}-ChatOutput-JPlxl{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-JPlxlœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}", - "source": "OpenAIModel-gi29P", - "sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-gi29Pœ, œoutput_typesœ: [œMessageœ], œnameœ: œtext_outputœ}", - "style": { - "stroke": "#555" - }, - "target": "ChatOutput-JPlxl", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-JPlxlœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-OpenAIModel-NXVBv{œdataTypeœ:œOpenAIModelœ,œidœ:œOpenAIModel-NXVBvœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-n5T1m{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-n5T1mœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "source": "OpenAIModel-NXVBv", + "sourceHandle": "{œdataTypeœ: œOpenAIModelœ, œidœ: œOpenAIModel-NXVBvœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}", + "target": "ChatOutput-n5T1m", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-n5T1mœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, { - "className": "stroke-gray-900 stroke-connection", - "data": { - "sourceHandle": { - "dataType": "URL", - "id": "URL-2cX90", - "name": "record", - "output_types": [] - }, - "targetHandle": { - "fieldName": "reference_1", - "id": "Prompt-Rse03", - "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", - "Text" - ], - "type": "str" - } - }, - "id": "reactflow__edge-URL-2cX90{œbaseClassesœ:[œRecordœ],œdataTypeœ:œURLœ,œidœ:œURL-2cX90œ}-Prompt-Rse03{œfieldNameœ:œreference_1œ,œidœ:œPrompt-Rse03œ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}", - "source": "URL-2cX90", - "sourceHandle": "{œdataTypeœ: œURLœ, œidœ: œURL-2cX90œ, œoutput_typesœ: [], œnameœ: œrecordœ}", - "style": { - "stroke": "#555" - }, - "target": "Prompt-Rse03", - "targetHandle": "{œfieldNameœ: œreference_1œ, œidœ: œPrompt-Rse03œ, œinputTypesœ: [œDocumentœ, œBaseOutputParserœ, œRecordœ, œTextœ], œtypeœ: œstrœ}" - }, - { - "className": "stroke-gray-900 stroke-connection", - "data": { - "sourceHandle": { - "dataType": "TextInput", - "id": "TextInput-og8Or", - "name": "Text", - "output_types": [ - "Text" - ] - }, - "targetHandle": { - "fieldName": "instructions", - "id": "Prompt-Rse03", - "inputTypes": [ - "Document", - "BaseOutputParser", - "Record", - "Text" - ], - "type": "str" - } - }, - "id": "reactflow__edge-TextInput-og8Or{œbaseClassesœ:[œobjectœ,œTextœ,œstrœ],œdataTypeœ:œTextInputœ,œidœ:œTextInput-og8Orœ}-Prompt-Rse03{œfieldNameœ:œinstructionsœ,œidœ:œPrompt-Rse03œ,œinputTypesœ:[œDocumentœ,œBaseOutputParserœ,œRecordœ,œTextœ],œtypeœ:œstrœ}", - "source": "TextInput-og8Or", - "sourceHandle": "{œdataTypeœ: œTextInputœ, œidœ: œTextInput-og8Orœ, œoutput_typesœ: [œTextœ], œnameœ: œTextœ}", - "style": { - "stroke": "#555" - }, - "target": "Prompt-Rse03", - "targetHandle": "{œfieldNameœ: œinstructionsœ, œidœ: œPrompt-Rse03œ, œinputTypesœ: [œDocumentœ, œBaseOutputParserœ, œRecordœ, œTextœ], œtypeœ: œstrœ}" - }, - { - "className": "stroke-gray-900 stroke-connection", "data": { "sourceHandle": { "dataType": "Prompt", - "id": "Prompt-Rse03", + "id": "Prompt-GPCfZ", "name": "prompt", "output_types": [ "Message" @@ -136,22 +167,18 @@ }, "targetHandle": { "fieldName": "input_value", - "id": "OpenAIModel-gi29P", + "id": "OpenAIModel-NXVBv", "inputTypes": [ "Message" ], "type": "str" } }, - "id": "reactflow__edge-Prompt-Rse03{œbaseClassesœ:[œobjectœ,œTextœ,œstrœ],œdataTypeœ:œPromptœ,œidœ:œPrompt-Rse03œ}-OpenAIModel-gi29P{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-gi29Pœ,œinputTypesœ:[œTextœ],œtypeœ:œstrœ}", - "selected": false, - "source": "Prompt-Rse03", - "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-Rse03œ, œoutput_typesœ: [œMessageœ], œnameœ: œpromptœ}", - "style": { - "stroke": "#555" - }, - "target": "OpenAIModel-gi29P", - "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-gi29Pœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" + "id": "reactflow__edge-Prompt-GPCfZ{œdataTypeœ:œPromptœ,œidœ:œPrompt-GPCfZœ,œnameœ:œpromptœ,œoutput_typesœ:[œMessageœ]}-OpenAIModel-NXVBv{œfieldNameœ:œinput_valueœ,œidœ:œOpenAIModel-NXVBvœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "source": "Prompt-GPCfZ", + "sourceHandle": "{œdataTypeœ: œPromptœ, œidœ: œPrompt-GPCfZœ, œnameœ: œpromptœ, œoutput_typesœ: [œMessageœ]}", + "target": "OpenAIModel-NXVBv", + "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œOpenAIModel-NXVBvœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" } ], "nodes": [ @@ -159,14 +186,15 @@ "data": { "description": "Create a prompt template with dynamic variables.", "display_name": "Prompt", - "id": "Prompt-Rse03", + "id": "Prompt-GPCfZ", "node": { "base_classes": [ "object", - "Text", - "str" + "str", + "Text" ], "beta": false, + "conditional_paths": [], "custom_fields": { "template": [ "reference_1", @@ -178,7 +206,6 @@ "display_name": "Prompt", "documentation": "", "error": null, - "field_formatters": {}, "field_order": [], "frozen": false, "full_path": null, @@ -201,6 +228,7 @@ "value": "__UNDEFINED__" } ], + "pinned": false, "template": { "_type": "Component", "code": { @@ -230,9 +258,7 @@ "file_path": "", "info": "", "input_types": [ - "Document", - "BaseOutputParser", - "Record", + "Message", "Text" ], "list": false, @@ -256,9 +282,7 @@ "file_path": "", "info": "", "input_types": [ - "Document", - "BaseOutputParser", - "Record", + "Message", "Text" ], "list": false, @@ -282,9 +306,7 @@ "file_path": "", "info": "", "input_types": [ - "Document", - "BaseOutputParser", - "Record", + "Message", "Text" ], "list": false, @@ -326,15 +348,15 @@ "type": "Prompt" }, "dragging": false, - "height": 571, - "id": "Prompt-Rse03", + "height": 619, + "id": "Prompt-GPCfZ", "position": { - "x": 1331.381712783371, - "y": 535.0279854229713 + "x": 1378.0386633467044, + "y": 547.0254869963999 }, "positionAbsolute": { - "x": 1331.381712783371, - "y": 535.0279854229713 + "x": 1378.0386633467044, + "y": 547.0254869963999 }, "selected": false, "type": "genericNode", @@ -342,7 +364,7 @@ }, { "data": { - "id": "URL-HYPkR", + "id": "URL-ry4Vn", "node": { "base_classes": [ "Record" @@ -405,22 +427,24 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": [ + "https://www.promptingguide.ai/introduction/basics" + ] } } }, "type": "URL" }, "dragging": false, - "height": 281, - "id": "URL-HYPkR", + "height": 301, + "id": "URL-ry4Vn", "position": { - "x": 568.2971412887712, - "y": 700.9983368007821 + "x": 129.9069887328102, + "y": 1026.1629590683015 }, "positionAbsolute": { - "x": 568.2971412887712, - "y": 700.9983368007821 + "x": 129.9069887328102, + "y": 1026.1629590683015 }, "selected": false, "type": "genericNode", @@ -428,40 +452,32 @@ }, { "data": { - "id": "ChatOutput-JPlxl", + "id": "URL-PAQgR", "node": { "base_classes": [ - "Text", - "Record", - "object", - "str" + "Record" ], "beta": false, "custom_fields": { - "input_value": null, - "record_template": null, - "return_record": null, - "sender": null, - "sender_name": null, - "session_id": null + "urls": null }, - "description": "Display a chat message in the Playground.", - "display_name": "Chat Output", + "description": "Fetch content from one or more URLs.", + "display_name": "URL", "documentation": "", "field_formatters": {}, "field_order": [], "frozen": false, - "icon": "ChatOutput", + "icon": "layout-template", "output_types": [], "outputs": [ { "cache": true, - "display_name": "Message", - "method": "message_response", - "name": "message", - "selected": "Message", + "display_name": "Data", + "method": "fetch_content", + "name": "data", + "selected": "Data", "types": [ - "Message" + "Data" ], "value": "__UNDEFINED__" } @@ -484,109 +500,39 @@ "show": true, "title_case": false, "type": "code", - "value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import DropdownInput, TextInput\nfrom langflow.schema.message import Message\nfrom langflow.template import Output\n\n\nclass ChatOutput(ChatComponent):\n display_name = \"Chat Output\"\n description = \"Display a chat message in the Playground.\"\n icon = \"ChatOutput\"\n\n inputs = [\n TextInput(\n name=\"input_value\",\n display_name=\"Text\",\n info=\"Message to be passed as output.\",\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"Machine\",\n advanced=True,\n info=\"Type of sender.\",\n ),\n TextInput(name=\"sender_name\", display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"AI\", advanced=True),\n TextInput(name=\"session_id\", display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True),\n TextInput(\n name=\"data_template\",\n display_name=\"Data Template\",\n value=\"{text}\",\n advanced=True,\n info=\"Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.\",\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n def message_response(self) -> Message:\n message = Message(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n )\n if self.session_id and isinstance(message, Message) and isinstance(message.text, str):\n self.store_message(message)\n self.message.value = message\n\n self.status = message\n return message\n" + "value": "import re\n\nfrom langchain_community.document_loaders.web_base import WebBaseLoader\n\nfrom langflow.custom import Component\nfrom langflow.inputs import TextInput\nfrom langflow.schema import Data\nfrom langflow.template import Output\n\n\nclass URLComponent(Component):\n display_name = \"URL\"\n description = \"Fetch content from one or more URLs.\"\n icon = \"layout-template\"\n\n inputs = [\n TextInput(\n name=\"urls\",\n display_name=\"URLs\",\n info=\"Enter one or more URLs, separated by commas.\",\n value=\"\",\n is_list=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"Data\", name=\"data\", method=\"fetch_content\"),\n ]\n\n def ensure_url(self, string: str) -> str:\n \"\"\"\n Ensures the given string is a URL by adding 'http://' if it doesn't start with 'http://' or 'https://'.\n Raises an error if the string is not a valid URL.\n\n Parameters:\n string (str): The string to be checked and possibly modified.\n\n Returns:\n str: The modified string that is ensured to be a URL.\n\n Raises:\n ValueError: If the string is not a valid URL.\n \"\"\"\n if not string.startswith((\"http://\", \"https://\")):\n string = \"http://\" + string\n\n # Basic URL validation regex\n url_regex = re.compile(\n r\"^(http://|https://)?\" # http:// or https://\n r\"(([a-zA-Z0-9\\.-]+)\" # domain\n r\"(\\.[a-zA-Z]{2,}))\" # top-level domain\n r\"(:[0-9]{1,5})?\" # optional port\n r\"(\\/.*)?$\" # optional path\n )\n\n if not re.match(url_regex, string):\n raise ValueError(f\"Invalid URL: {string}\")\n\n return string\n\n def fetch_content(self) -> Data:\n urls = [self.ensure_url(url.strip()) for url in self.urls if url.strip()]\n loader = WebBaseLoader(web_paths=urls, encoding=\"utf-8\")\n docs = loader.load()\n data = [Data(text=doc.page_content, **doc.metadata) for doc in docs]\n self.status = data\n return data\n" }, - "input_value": { + "urls": { "advanced": false, - "display_name": "Text", + "display_name": "URLs", "dynamic": false, - "fileTypes": [], - "file_path": "", - "info": "Message to be passed as output.", - "input_types": [ - "Message" - ], - "list": false, - "load_from_db": false, - "multiline": true, - "name": "input_value", - "password": false, - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "type": "str", - "value": "" - }, - "sender": { - "advanced": true, - "display_name": "Sender Type", - "dynamic": false, - "fileTypes": [], - "file_path": "", - "info": "Type of sender.", - "input_types": [ - "Text" - ], + "info": "Enter one or more URLs, separated by commas.", "list": true, "load_from_db": false, - "multiline": false, - "name": "sender", - "options": [ - "Machine", - "User" - ], - "password": false, + "name": "urls", "placeholder": "", "required": false, "show": true, "title_case": false, "type": "str", - "value": "Machine" - }, - "sender_name": { - "advanced": true, - "display_name": "Sender Name", - "dynamic": false, - "fileTypes": [], - "file_path": "", - "info": "Name of the sender.", - "input_types": [ - "Message" - ], - "list": false, - "load_from_db": false, - "multiline": false, - "name": "sender_name", - "password": false, - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "type": "str", - "value": "AI" - }, - "session_id": { - "advanced": true, - "display_name": "Session ID", - "dynamic": false, - "fileTypes": [], - "file_path": "", - "info": "Session ID for the message.", - "input_types": [ - "Message" - ], - "list": false, - "load_from_db": false, - "multiline": false, - "name": "session_id", - "password": false, - "placeholder": "", - "required": false, - "show": true, - "title_case": false, - "type": "str", - "value": "" + "value": [ + "https://www.promptingguide.ai/techniques/prompt_chaining" + ] } } }, - "type": "ChatOutput" + "type": "URL" }, - "height": 383, - "id": "ChatOutput-JPlxl", + "dragging": false, + "height": 301, + "id": "URL-PAQgR", "position": { - "x": 2503.8617424688505, - "y": 789.3005578928434 + "x": 109.01828882212544, + "y": 635.7038211214808 + }, + "positionAbsolute": { + "x": 109.01828882212544, + "y": 635.7038211214808 }, "selected": false, "type": "genericNode", @@ -594,39 +540,368 @@ }, { "data": { - "id": "OpenAIModel-gi29P", + "description": "Get text inputs from the Playground.", + "display_name": "Instructions", + "edited": false, + "id": "TextInput-xeTQg", "node": { "base_classes": [ - "str", - "Text", - "object" + "Message" ], "beta": false, - "custom_fields": { - "input_value": null, - "max_tokens": null, - "model_kwargs": null, - "model_name": null, - "openai_api_base": null, - "openai_api_key": null, - "stream": null, - "system_message": null, - "temperature": null - }, + "conditional_paths": [], + "custom_fields": {}, + "description": "Get text inputs from the Playground.", + "display_name": "Instructions", + "documentation": "", + "edited": true, + "field_order": [ + "input_value" + ], + "frozen": false, + "icon": "type", + "output_types": [], + "outputs": [ + { + "cache": true, + "display_name": "Text", + "hidden": false, + "method": "text_response", + "name": "text", + "selected": "Message", + "types": [ + "Message" + ], + "value": "__UNDEFINED__" + } + ], + "pinned": false, + "template": { + "_type": "Component", + "code": { + "advanced": true, + "dynamic": true, + "fileTypes": [], + "file_path": "", + "info": "", + "list": false, + "load_from_db": false, + "multiline": true, + "name": "code", + "password": false, + "placeholder": "", + "required": true, + "show": true, + "title_case": false, + "type": "code", + "value": "from langflow.base.io.text import TextComponent\nfrom langflow.inputs import TextInput\nfrom langflow.template import Output\nfrom langflow.schema.message import Message\n\n\nclass TextInputComponent(TextComponent):\n display_name = \"Text Input\"\n description = \"Get text inputs from the Playground.\"\n icon = \"type\"\n\n inputs = [\n TextInput(\n name=\"input_value\",\n display_name=\"Text\",\n info=\"Text to be passed as input.\",\n ),\n ]\n outputs = [\n Output(display_name=\"Text\", name=\"text\", method=\"text_response\"),\n ]\n\n def text_response(self) -> Message:\n message = Message(\n text=self.input_value,\n )\n return message\n" + }, + "input_value": { + "advanced": false, + "display_name": "Text", + "dynamic": false, + "info": "Text to be passed as input.", + "input_types": [ + "Message" + ], + "list": false, + "load_from_db": false, + "multiline": true, + "name": "input_value", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "type": "str", + "value": "Use the references above for style to write a new blog/tutorial about prompt engineering techniques. Suggest non-covered topics." + } + } + }, + "type": "TextInput" + }, + "dragging": false, + "height": 309, + "id": "TextInput-xeTQg", + "position": { + "x": 668.3436449795839, + "y": 213.40493638517057 + }, + "positionAbsolute": { + "x": 668.3436449795839, + "y": 213.40493638517057 + }, + "selected": false, + "type": "genericNode", + "width": 384 + }, + { + "data": { + "id": "ParseData-jFtFL", + "node": { + "base_classes": [ + "Message" + ], + "beta": false, + "conditional_paths": [], + "custom_fields": {}, + "description": "Convert Data into plain text following a specified template.", + "display_name": "Parse Data", + "documentation": "", + "field_order": [ + "data", + "template", + "sep" + ], + "frozen": false, + "icon": "braces", + "output_types": [], + "outputs": [ + { + "cache": true, + "display_name": "Text", + "method": "parse_data", + "name": "text", + "selected": "Message", + "types": [ + "Message" + ], + "value": "__UNDEFINED__" + } + ], + "pinned": false, + "template": { + "_type": "Component", + "code": { + "advanced": true, + "dynamic": true, + "fileTypes": [], + "file_path": "", + "info": "", + "list": false, + "load_from_db": false, + "multiline": true, + "name": "code", + "password": false, + "placeholder": "", + "required": true, + "show": true, + "title_case": false, + "type": "code", + "value": "from langflow.custom import Component\nfrom langflow.helpers.data import data_to_text\nfrom langflow.inputs import MultilineInput, DataInput, StrInput\nfrom langflow.template import Output\nfrom langflow.schema.message import Message\n\n\nclass ParseDataComponent(Component):\n display_name = \"Parse Data\"\n description = \"Convert Data into plain text following a specified template.\"\n icon = \"braces\"\n\n inputs = [\n DataInput(name=\"data\", display_name=\"Data\", info=\"The data to convert to text.\"),\n MultilineInput(\n name=\"template\",\n display_name=\"Template\",\n info=\"The template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the Data.\",\n value=\"{text}\"\n ),\n StrInput(\n name=\"sep\",\n display_name=\"Separator\",\n advanced=True,\n value='---'\n )\n ]\n\n outputs = [\n Output(display_name=\"Text\", name=\"text\", method=\"parse_data\"),\n ]\n\n def parse_data(self) -> Message:\n data = self.data if isinstance(self.data, list) else [self.data]\n template = self.template\n\n result_string = data_to_text(template, data, sep=self.sep)\n self.status = result_string\n return Message(text=result_string)\n" + }, + "data": { + "advanced": false, + "display_name": "Data", + "dynamic": false, + "info": "The data to convert to text.", + "input_types": [ + "Data" + ], + "list": false, + "name": "data", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "type": "other", + "value": "" + }, + "sep": { + "advanced": true, + "display_name": "Separator", + "dynamic": false, + "info": "", + "list": false, + "load_from_db": false, + "multiline": true, + "name": "sep", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "type": "str", + "value": "---" + }, + "template": { + "advanced": false, + "display_name": "Template", + "dynamic": false, + "info": "The template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the Data.", + "multiline": true, + "name": "template", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "type": "str", + "value": "{text}" + } + } + }, + "type": "ParseData" + }, + "dragging": false, + "height": 377, + "id": "ParseData-jFtFL", + "position": { + "x": 697.109388389247, + "y": 993.1273555676513 + }, + "positionAbsolute": { + "x": 697.109388389247, + "y": 993.1273555676513 + }, + "selected": false, + "type": "genericNode", + "width": 384 + }, + { + "data": { + "id": "ParseData-vdPxZ", + "node": { + "base_classes": [ + "Message" + ], + "beta": false, + "conditional_paths": [], + "custom_fields": {}, + "description": "Convert Data into plain text following a specified template.", + "display_name": "Parse Data", + "documentation": "", + "field_order": [ + "data", + "template", + "sep" + ], + "frozen": false, + "icon": "braces", + "output_types": [], + "outputs": [ + { + "cache": true, + "display_name": "Text", + "method": "parse_data", + "name": "text", + "selected": "Message", + "types": [ + "Message" + ], + "value": "__UNDEFINED__" + } + ], + "pinned": false, + "template": { + "_type": "Component", + "code": { + "advanced": true, + "dynamic": true, + "fileTypes": [], + "file_path": "", + "info": "", + "list": false, + "load_from_db": false, + "multiline": true, + "name": "code", + "password": false, + "placeholder": "", + "required": true, + "show": true, + "title_case": false, + "type": "code", + "value": "from langflow.custom import Component\nfrom langflow.helpers.data import data_to_text\nfrom langflow.inputs import MultilineInput, DataInput, StrInput\nfrom langflow.template import Output\nfrom langflow.schema.message import Message\n\n\nclass ParseDataComponent(Component):\n display_name = \"Parse Data\"\n description = \"Convert Data into plain text following a specified template.\"\n icon = \"braces\"\n\n inputs = [\n DataInput(name=\"data\", display_name=\"Data\", info=\"The data to convert to text.\"),\n MultilineInput(\n name=\"template\",\n display_name=\"Template\",\n info=\"The template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the Data.\",\n value=\"{text}\"\n ),\n StrInput(\n name=\"sep\",\n display_name=\"Separator\",\n advanced=True,\n value='---'\n )\n ]\n\n outputs = [\n Output(display_name=\"Text\", name=\"text\", method=\"parse_data\"),\n ]\n\n def parse_data(self) -> Message:\n data = self.data if isinstance(self.data, list) else [self.data]\n template = self.template\n\n result_string = data_to_text(template, data, sep=self.sep)\n self.status = result_string\n return Message(text=result_string)\n" + }, + "data": { + "advanced": false, + "display_name": "Data", + "dynamic": false, + "info": "The data to convert to text.", + "input_types": [ + "Data" + ], + "list": false, + "name": "data", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "type": "other", + "value": "" + }, + "sep": { + "advanced": true, + "display_name": "Separator", + "dynamic": false, + "info": "", + "list": false, + "load_from_db": false, + "multiline": true, + "name": "sep", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "type": "str", + "value": "---" + }, + "template": { + "advanced": false, + "display_name": "Template", + "dynamic": false, + "info": "The template to use for formatting the data. It can contain the keys {text}, {data} or any other key in the Data.", + "multiline": true, + "name": "template", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "type": "str", + "value": "{text}" + } + } + }, + "type": "ParseData" + }, + "dragging": false, + "height": 377, + "id": "ParseData-vdPxZ", + "position": { + "x": 674.3059180422167, + "y": 594.1081812719365 + }, + "positionAbsolute": { + "x": 674.3059180422167, + "y": 594.1081812719365 + }, + "selected": false, + "type": "genericNode", + "width": 384 + }, + { + "data": { + "id": "OpenAIModel-NXVBv", + "node": { + "base_classes": [ + "BaseLanguageModel", + "Message" + ], + "beta": false, + "conditional_paths": [], + "custom_fields": {}, "description": "Generates text using OpenAI LLMs.", "display_name": "OpenAI", "documentation": "", - "field_formatters": {}, "field_order": [ + "input_value", "max_tokens", "model_kwargs", + "output_schema", "model_name", "openai_api_base", "openai_api_key", "temperature", - "input_value", + "stream", "system_message", - "stream" + "seed" ], "frozen": false, "icon": "OpenAI", @@ -655,6 +930,7 @@ "value": "__UNDEFINED__" } ], + "pinned": false, "template": { "_type": "Component", "code": { @@ -679,17 +955,14 @@ "advanced": false, "display_name": "Input", "dynamic": false, - "fileTypes": [], - "file_path": "", "info": "", "input_types": [ "Message" ], "list": false, "load_from_db": false, - "multiline": false, + "multiline": true, "name": "input_value", - "password": false, "placeholder": "", "required": false, "show": true, @@ -701,59 +974,35 @@ "advanced": true, "display_name": "Max Tokens", "dynamic": false, - "fileTypes": [], - "file_path": "", "info": "The maximum number of tokens to generate. Set to 0 for unlimited tokens.", - "input_types": [ - "Text" - ], "list": false, - "load_from_db": false, - "multiline": false, "name": "max_tokens", - "password": false, "placeholder": "", "required": false, "show": true, "title_case": false, - "type": "str", + "type": "int", "value": "" }, "model_kwargs": { "advanced": true, "display_name": "Model Kwargs", "dynamic": false, - "fileTypes": [], - "file_path": "", "info": "", - "input_types": [ - "Text" - ], "list": false, - "load_from_db": false, - "multiline": false, "name": "model_kwargs", - "password": false, "placeholder": "", "required": false, "show": true, "title_case": false, - "type": "str", - "value": "" + "type": "dict", + "value": {} }, "model_name": { "advanced": false, "display_name": "Model Name", "dynamic": false, - "fileTypes": [], - "file_path": "", "info": "", - "input_types": [ - "Text" - ], - "list": true, - "load_from_db": false, - "multiline": false, "name": "model_name", "options": [ "gpt-4o", @@ -762,7 +1011,6 @@ "gpt-3.5-turbo", "gpt-3.5-turbo-0125" ], - "password": false, "placeholder": "", "required": false, "show": true, @@ -774,17 +1022,11 @@ "advanced": true, "display_name": "OpenAI API Base", "dynamic": false, - "fileTypes": [], - "file_path": "", "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1. You can change this to use other APIs like JinaChat, LocalAI and Prem.", - "input_types": [ - "Text" - ], "list": false, "load_from_db": false, - "multiline": false, + "multiline": true, "name": "openai_api_base", - "password": false, "placeholder": "", "required": false, "show": true, @@ -796,13 +1038,9 @@ "advanced": false, "display_name": "OpenAI API Key", "dynamic": false, - "fileTypes": [], - "file_path": "", "info": "The OpenAI API Key to use for the OpenAI model.", "input_types": [], - "list": false, "load_from_db": true, - "multiline": false, "name": "openai_api_key", "password": true, "placeholder": "", @@ -810,45 +1048,59 @@ "show": true, "title_case": false, "type": "str", - "value": "OPENAI_API_KEY" + "value": "" + }, + "output_schema": { + "advanced": true, + "display_name": "Schema", + "dynamic": false, + "info": "The schema for the Output of the model. You must pass the word JSON in the prompt. If left blank, JSON mode will be disabled.", + "list": true, + "name": "output_schema", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "type": "dict", + "value": {} + }, + "seed": { + "advanced": true, + "display_name": "Seed", + "dynamic": false, + "info": "The seed controls the reproducibility of the job.", + "list": false, + "name": "seed", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "type": "int", + "value": 1 }, "stream": { "advanced": true, "display_name": "Stream", "dynamic": false, - "fileTypes": [], - "file_path": "", "info": "Stream the response from the model. Streaming works only in Chat.", - "input_types": [ - "Text" - ], "list": false, - "load_from_db": false, - "multiline": false, "name": "stream", - "password": false, "placeholder": "", "required": false, "show": true, "title_case": false, - "type": "str", + "type": "bool", "value": false }, "system_message": { "advanced": true, "display_name": "System Message", "dynamic": false, - "fileTypes": [], - "file_path": "", "info": "System message to pass to the model.", - "input_types": [ - "Text" - ], "list": false, "load_from_db": false, - "multiline": false, + "multiline": true, "name": "system_message", - "password": false, "placeholder": "", "required": false, "show": true, @@ -860,22 +1112,14 @@ "advanced": false, "display_name": "Temperature", "dynamic": false, - "fileTypes": [], - "file_path": "", "info": "", - "input_types": [ - "Text" - ], "list": false, - "load_from_db": false, - "multiline": false, "name": "temperature", - "password": false, "placeholder": "", "required": false, "show": true, "title_case": false, - "type": "str", + "type": "float", "value": 0.1 } } @@ -883,15 +1127,15 @@ "type": "OpenAIModel" }, "dragging": false, - "height": 563, - "id": "OpenAIModel-gi29P", + "height": 623, + "id": "OpenAIModel-NXVBv", "position": { - "x": 1917.7089968570963, - "y": 575.9186499244129 + "x": 1968.999112433115, + "y": 528.8142375467121 }, "positionAbsolute": { - "x": 1917.7089968570963, - "y": 575.9186499244129 + "x": 1968.999112433115, + "y": 528.8142375467121 }, "selected": false, "type": "genericNode", @@ -899,36 +1143,41 @@ }, { "data": { - "id": "URL-2cX90", + "id": "ChatOutput-n5T1m", "node": { "base_classes": [ - "Record" + "Message" ], "beta": false, - "custom_fields": { - "urls": null - }, - "description": "Fetch content from one or more URLs.", - "display_name": "URL", + "conditional_paths": [], + "custom_fields": {}, + "description": "Display a chat message in the Playground.", + "display_name": "Chat Output", "documentation": "", - "field_formatters": {}, - "field_order": [], + "field_order": [ + "input_value", + "sender", + "sender_name", + "session_id", + "data_template" + ], "frozen": false, - "icon": "layout-template", + "icon": "ChatOutput", "output_types": [], "outputs": [ { "cache": true, - "display_name": "Data", - "method": "fetch_content", - "name": "data", - "selected": "Data", + "display_name": "Message", + "method": "message_response", + "name": "message", + "selected": "Message", "types": [ - "Data" + "Message" ], "value": "__UNDEFINED__" } ], + "pinned": false, "template": { "_type": "Component", "code": { @@ -947,133 +1196,94 @@ "show": true, "title_case": false, "type": "code", - "value": "import re\n\nfrom langchain_community.document_loaders.web_base import WebBaseLoader\n\nfrom langflow.custom import Component\nfrom langflow.inputs import TextInput\nfrom langflow.schema import Data\nfrom langflow.template import Output\n\n\nclass URLComponent(Component):\n display_name = \"URL\"\n description = \"Fetch content from one or more URLs.\"\n icon = \"layout-template\"\n\n inputs = [\n TextInput(\n name=\"urls\",\n display_name=\"URLs\",\n info=\"Enter one or more URLs, separated by commas.\",\n value=\"\",\n is_list=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"Data\", name=\"data\", method=\"fetch_content\"),\n ]\n\n def ensure_url(self, string: str) -> str:\n \"\"\"\n Ensures the given string is a URL by adding 'http://' if it doesn't start with 'http://' or 'https://'.\n Raises an error if the string is not a valid URL.\n\n Parameters:\n string (str): The string to be checked and possibly modified.\n\n Returns:\n str: The modified string that is ensured to be a URL.\n\n Raises:\n ValueError: If the string is not a valid URL.\n \"\"\"\n if not string.startswith((\"http://\", \"https://\")):\n string = \"http://\" + string\n\n # Basic URL validation regex\n url_regex = re.compile(\n r\"^(http://|https://)?\" # http:// or https://\n r\"(([a-zA-Z0-9\\.-]+)\" # domain\n r\"(\\.[a-zA-Z]{2,}))\" # top-level domain\n r\"(:[0-9]{1,5})?\" # optional port\n r\"(\\/.*)?$\" # optional path\n )\n\n if not re.match(url_regex, string):\n raise ValueError(f\"Invalid URL: {string}\")\n\n return string\n\n def fetch_content(self) -> Data:\n urls = [self.ensure_url(url.strip()) for url in self.urls if url.strip()]\n loader = WebBaseLoader(web_paths=urls, encoding=\"utf-8\")\n docs = loader.load()\n data = [Data(text=doc.page_content, **doc.metadata) for doc in docs]\n self.status = data\n return data\n" + "value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import DropdownInput, TextInput\nfrom langflow.schema.message import Message\nfrom langflow.template import Output\n\n\nclass ChatOutput(ChatComponent):\n display_name = \"Chat Output\"\n description = \"Display a chat message in the Playground.\"\n icon = \"ChatOutput\"\n\n inputs = [\n TextInput(\n name=\"input_value\",\n display_name=\"Text\",\n info=\"Message to be passed as output.\",\n ),\n DropdownInput(\n name=\"sender\",\n display_name=\"Sender Type\",\n options=[\"Machine\", \"User\"],\n value=\"Machine\",\n advanced=True,\n info=\"Type of sender.\",\n ),\n TextInput(name=\"sender_name\", display_name=\"Sender Name\", info=\"Name of the sender.\", value=\"AI\", advanced=True),\n TextInput(name=\"session_id\", display_name=\"Session ID\", info=\"Session ID for the message.\", advanced=True),\n TextInput(\n name=\"data_template\",\n display_name=\"Data Template\",\n value=\"{text}\",\n advanced=True,\n info=\"Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.\",\n ),\n ]\n outputs = [\n Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n ]\n\n def message_response(self) -> Message:\n message = Message(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=self.session_id,\n )\n if self.session_id and isinstance(message, Message) and isinstance(message.text, str):\n self.store_message(message)\n self.message.value = message\n\n self.status = message\n return message\n" }, - "urls": { - "advanced": false, - "display_name": "URLs", + "data_template": { + "advanced": true, + "display_name": "Data Template", "dynamic": false, - "info": "Enter one or more URLs, separated by commas.", - "list": true, + "info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.", + "input_types": [ + "Message" + ], + "list": false, "load_from_db": false, - "name": "urls", + "multiline": true, + "name": "data_template", "placeholder": "", "required": false, "show": true, "title_case": false, "type": "str", - "value": "" - } - } - }, - "type": "URL" - }, - "dragging": false, - "height": 281, - "id": "URL-2cX90", - "position": { - "x": 573.961301764604, - "y": 336.41463436122086 - }, - "positionAbsolute": { - "x": 573.961301764604, - "y": 336.41463436122086 - }, - "selected": false, - "type": "genericNode", - "width": 384 - }, - { - "data": { - "id": "TextInput-og8Or", - "node": { - "base_classes": [ - "object", - "Text", - "str" - ], - "beta": false, - "custom_fields": { - "input_value": null, - "record_template": null - }, - "description": "Get text inputs from the Playground.", - "display_name": "Instructions", - "documentation": "", - "field_formatters": {}, - "field_order": [], - "frozen": false, - "icon": "type", - "output_types": [ - "Text" - ], - "outputs": [ - { - "name": "Text", - "selected": "Text", - "types": [ - "Text" - ] - } - ], - "template": { - "_type": "CustomComponent", - "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 typing import Optional\n\nfrom langflow.base.io.text import TextComponent\nfrom langflow.field_typing import Text\n\n\nclass TextInput(TextComponent):\n display_name = \"Text Input\"\n description = \"Get text inputs from the Playground.\"\n icon = \"type\"\n\n def build_config(self):\n return {\n \"input_value\": {\n \"display_name\": \"Value\",\n \"input_types\": [\"Record\", \"Text\"],\n \"info\": \"Text or Record to be passed as input.\",\n },\n \"record_template\": {\n \"display_name\": \"Record Template\",\n \"multiline\": True,\n \"info\": \"Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.\",\n \"advanced\": True,\n },\n }\n\n def build(\n self,\n input_value: Optional[str] = \"\",\n record_template: Optional[str] = \"\",\n ) -> Text:\n return super().build(input_value=input_value, record_template=record_template)\n" + "value": "{text}" }, "input_value": { "advanced": false, - "display_name": "Value", + "display_name": "Text", "dynamic": false, - "fileTypes": [], - "file_path": "", - "info": "Text or Record to be passed as input.", + "info": "Message to be passed as output.", "input_types": [ - "Record", - "Text" + "Message" ], "list": false, "load_from_db": false, - "multiline": false, + "multiline": true, "name": "input_value", - "password": false, "placeholder": "", "required": false, "show": true, "title_case": false, "type": "str", - "value": "Use the references above for style to write a new blog/tutorial about prompt engineering techniques. Suggest non-covered topics." + "value": "" }, - "record_template": { + "sender": { "advanced": true, - "display_name": "Record Template", + "display_name": "Sender Type", "dynamic": false, - "fileTypes": [], - "file_path": "", - "info": "Template to convert Record to Text. If left empty, it will be dynamically set to the Record's text key.", + "info": "Type of sender.", + "name": "sender", + "options": [ + "Machine", + "User" + ], + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "type": "str", + "value": "Machine" + }, + "sender_name": { + "advanced": true, + "display_name": "Sender Name", + "dynamic": false, + "info": "Name of the sender.", "input_types": [ - "Text" + "Message" ], "list": false, "load_from_db": false, "multiline": true, - "name": "record_template", - "password": false, + "name": "sender_name", + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "type": "str", + "value": "AI" + }, + "session_id": { + "advanced": true, + "display_name": "Session ID", + "dynamic": false, + "info": "Session ID for the message.", + "input_types": [ + "Message" + ], + "list": false, + "load_from_db": false, + "multiline": true, + "name": "session_id", "placeholder": "", "required": false, "show": true, @@ -1083,18 +1293,18 @@ } } }, - "type": "TextInput" + "type": "ChatOutput" }, "dragging": false, - "height": 289, - "id": "TextInput-og8Or", + "height": 309, + "id": "ChatOutput-n5T1m", "position": { - "x": 569.9387927203336, - "y": 1095.3352160671316 + "x": 2668.5087497211402, + "y": 859.3268817022193 }, "positionAbsolute": { - "x": 569.9387927203336, - "y": 1095.3352160671316 + "x": 2668.5087497211402, + "y": 859.3268817022193 }, "selected": false, "type": "genericNode", @@ -1102,14 +1312,15 @@ } ], "viewport": { - "x": -214.14726025721177, - "y": -35.83855793844168, - "zoom": 0.47344308394045925 + "x": 79.21823673415201, + "y": 55.69170988103667, + "zoom": 0.4417380169313782 } }, "description": "This flow can be used to create a blog post following instructions from the user, using two other blogs as reference.", - "id": "6ad5559d-fb66-4fdc-8f98-96f4ac12799d", + "endpoint_name": "None-1", + "id": "4b20b4fa-5460-4d2a-af02-ff6b0637941e", "is_component": false, - "last_tested_version": "1.0.0a0", + "last_tested_version": "1.0.0a59", "name": "Blog Writer" } \ No newline at end of file diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Langflow Document QA.json b/src/backend/base/langflow/initial_setup/starter_projects/Langflow Document QA.json index e9eac6495..56be2c330 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Langflow Document QA.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Langflow Document QA.json @@ -387,7 +387,7 @@ ], "list": false, "load_from_db": false, - "multiline": false, + "multiline": true, "name": "sender_name", "password": false, "placeholder": "", @@ -409,7 +409,7 @@ ], "list": false, "load_from_db": false, - "multiline": false, + "multiline": true, "name": "session_id", "password": false, "placeholder": "", @@ -557,7 +557,7 @@ ], "list": false, "load_from_db": false, - "multiline": false, + "multiline": true, "name": "sender_name", "password": false, "placeholder": "", @@ -579,7 +579,7 @@ ], "list": false, "load_from_db": false, - "multiline": false, + "multiline": true, "name": "session_id", "password": false, "placeholder": "",