diff --git a/.secrets.baseline b/.secrets.baseline index c09d33bb3f..cb8ce2374d 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -1944,14 +1944,14 @@ "filename": "src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json", "hashed_secret": "d6e6d7b4b115cd3b9d172623199f8c403055fecc", "is_verified": false, - "line_number": 622 + "line_number": 620 }, { "type": "Hex High Entropy String", "filename": "src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json", "hashed_secret": "2317af15ade380e78be36f9ffdc6415d596a8715", "is_verified": false, - "line_number": 906, + "line_number": 902, "is_secret": false } ], @@ -1961,22 +1961,14 @@ "filename": "src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json", "hashed_secret": "d6e6d7b4b115cd3b9d172623199f8c403055fecc", "is_verified": false, - "line_number": 536 - }, - { - "type": "Hex High Entropy String", - "filename": "src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json", - "hashed_secret": "b87e1fbb6e7bc22eafe7983b42d1b2bb7e4a60c2", - "is_verified": false, - "line_number": 1035, - "is_secret": false + "line_number": 367 }, { "type": "Hex High Entropy String", "filename": "src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json", "hashed_secret": "2317af15ade380e78be36f9ffdc6415d596a8715", "is_verified": false, - "line_number": 1435, + "line_number": 1266, "is_secret": false } ], @@ -2139,7 +2131,7 @@ "filename": "src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json", "hashed_secret": "54ed260e3bc31bc77ee06754dff850981d39a66c", "is_verified": false, - "line_number": 320, + "line_number": 291, "is_secret": false }, { @@ -2147,14 +2139,21 @@ "filename": "src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json", "hashed_secret": "d6e6d7b4b115cd3b9d172623199f8c403055fecc", "is_verified": false, - "line_number": 1122 + "line_number": 955 + }, + { + "type": "Hex High Entropy String", + "filename": "src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json", + "hashed_secret": "2098350316c1e9de52d2630f82eba3a35e04a8cc", + "is_verified": false, + "line_number": 1908 }, { "type": "Hex High Entropy String", "filename": "src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json", "hashed_secret": "2317af15ade380e78be36f9ffdc6415d596a8715", "is_verified": false, - "line_number": 2685, + "line_number": 2492, "is_secret": false } ], @@ -2184,12 +2183,19 @@ } ], "src/backend/base/langflow/initial_setup/starter_projects/Knowledge Retrieval.json": [ + { + "type": "Hex High Entropy String", + "filename": "src/backend/base/langflow/initial_setup/starter_projects/Knowledge Retrieval.json", + "hashed_secret": "54ed260e3bc31bc77ee06754dff850981d39a66c", + "is_verified": false, + "line_number": 153 + }, { "type": "Hex High Entropy String", "filename": "src/backend/base/langflow/initial_setup/starter_projects/Knowledge Retrieval.json", "hashed_secret": "d6e6d7b4b115cd3b9d172623199f8c403055fecc", "is_verified": false, - "line_number": 291 + "line_number": 408 } ], "src/backend/base/langflow/initial_setup/starter_projects/Market Research.json": [ @@ -2352,14 +2358,14 @@ "filename": "src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json", "hashed_secret": "d6e6d7b4b115cd3b9d172623199f8c403055fecc", "is_verified": false, - "line_number": 326 + "line_number": 156 }, { "type": "Hex High Entropy String", "filename": "src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json", "hashed_secret": "2317af15ade380e78be36f9ffdc6415d596a8715", "is_verified": false, - "line_number": 1616, + "line_number": 1446, "is_secret": false }, { @@ -2367,7 +2373,7 @@ "filename": "src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json", "hashed_secret": "13f728be4fd927580a98667bcd624f511f459de0", "is_verified": false, - "line_number": 2022 + "line_number": 1852 } ], "src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json": [ @@ -2681,7 +2687,7 @@ "filename": "src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json", "hashed_secret": "54ed260e3bc31bc77ee06754dff850981d39a66c", "is_verified": false, - "line_number": 286, + "line_number": 118, "is_secret": false }, { @@ -2689,14 +2695,14 @@ "filename": "src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json", "hashed_secret": "d6e6d7b4b115cd3b9d172623199f8c403055fecc", "is_verified": false, - "line_number": 704 + "line_number": 399 }, { "type": "Hex High Entropy String", "filename": "src/backend/base/langflow/initial_setup/starter_projects/Twitter Thread Generator.json", "hashed_secret": "2317af15ade380e78be36f9ffdc6415d596a8715", "is_verified": false, - "line_number": 2020, + "line_number": 1030, "is_secret": false } ], diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json b/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json index 057cc1d96a..3b7c85fa39 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Basic Prompting.json @@ -335,7 +335,6 @@ "type": "ChatInput" }, "dragging": false, - "height": 234, "id": "ChatInput-b6UCc", "measured": { "height": 234, @@ -498,7 +497,6 @@ "type": "Prompt" }, "dragging": false, - "height": 260, "id": "Prompt-t2oaK", "measured": { "height": 260, @@ -852,7 +850,6 @@ "type": "ChatOutput" }, "dragging": false, - "height": 234, "id": "ChatOutput-yK0AU", "measured": { "height": 234, @@ -867,8 +864,7 @@ "y": 872.7273956769025 }, "selected": false, - "type": "genericNode", - "width": 320 + "type": "genericNode" }, { "data": { diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json b/src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json index ca339b5d99..2f394856e2 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Blog Writer.json @@ -1,35 +1,6 @@ { "data": { "edges": [ - { - "animated": false, - "className": "", - "data": { - "sourceHandle": { - "dataType": "TextInput", - "id": "TextInput-mM5Wa", - "name": "text", - "output_types": [ - "Message" - ] - }, - "targetHandle": { - "fieldName": "instructions", - "id": "Prompt-BlL2w", - "inputTypes": [ - "Message", - "Text" - ], - "type": "str" - } - }, - "id": "reactflow__edge-TextInput-mM5Wa{œdataTypeœ:œTextInputœ,œidœ:œTextInput-mM5Waœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-BlL2w{œfieldNameœ:œinstructionsœ,œidœ:œPrompt-BlL2wœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", - "selected": false, - "source": "TextInput-mM5Wa", - "sourceHandle": "{œdataTypeœ: œTextInputœ, œidœ: œTextInput-mM5Waœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-BlL2w", - "targetHandle": "{œfieldNameœ: œinstructionsœ, œidœ: œPrompt-BlL2wœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" - }, { "animated": false, "className": "", @@ -255,7 +226,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": "Use the references above for style to write a new blog/tutorial about Langflow and AI. Suggest non-covered topics." }, "references": { "advanced": false, @@ -362,146 +333,6 @@ "selected": false, "type": "genericNode" }, - { - "data": { - "description": "Get text inputs from the Playground.", - "display_name": "Instructions", - "id": "TextInput-mM5Wa", - "node": { - "base_classes": [ - "Message" - ], - "beta": false, - "conditional_paths": [], - "custom_fields": {}, - "description": "Get user text inputs.", - "display_name": "Instructions", - "documentation": "", - "edited": false, - "field_order": [ - "input_value", - "use_global_variable" - ], - "frozen": false, - "icon": "type", - "legacy": false, - "lf_version": "1.4.2", - "metadata": { - "code_hash": "518f16485886", - "dependencies": { - "dependencies": [ - { - "name": "lfx", - "version": null - } - ], - "total_dependencies": 1 - }, - "module": "lfx.components.input_output.text.TextInputComponent" - }, - "output_types": [], - "outputs": [ - { - "allows_loop": false, - "cache": true, - "display_name": "Output Text", - "group_outputs": false, - "method": "text_response", - "name": "text", - "selected": "Message", - "tool_mode": true, - "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 typing import Any\n\nfrom lfx.base.io.text import TextComponent\nfrom lfx.io import BoolInput, MultilineInput, Output\nfrom lfx.schema.message import Message\n\n\nclass TextInputComponent(TextComponent):\n display_name = \"Text Input\"\n description = \"Get user text inputs.\"\n documentation: str = \"https://docs.langflow.org/text-input-and-output\"\n icon = \"type\"\n name = \"TextInput\"\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n info=\"Text to be passed as input.\",\n ),\n BoolInput(\n name=\"use_global_variable\",\n display_name=\"Use Global Variable\",\n info=\"Enable to select from global variables (shows globe icon). Disables multiline editing.\",\n value=False,\n advanced=True,\n real_time_refresh=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Output Text\", name=\"text\", method=\"text_response\"),\n ]\n\n def update_build_config(self, build_config: dict, field_value: Any, field_name: str | None = None) -> dict:\n if field_name == \"use_global_variable\":\n if field_value:\n # Enable global variable mode: single-line with password masking and globe dropdown\n build_config[\"input_value\"][\"multiline\"] = False\n build_config[\"input_value\"][\"password\"] = True\n else:\n # Default mode: multiline text editing\n build_config[\"input_value\"][\"multiline\"] = True\n build_config[\"input_value\"][\"password\"] = False\n return build_config\n\n def text_response(self) -> Message:\n return Message(\n text=self.input_value,\n )\n" - }, - "input_value": { - "_input_type": "MultilineInput", - "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, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "Use the references above for style to write a new blog/tutorial about Langflow and AI. Suggest non-covered topics." - }, - "use_global_variable": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Use Global Variable", - "dynamic": false, - "info": "Enable to select from global variables (shows globe icon). Disables multiline editing.", - "list": false, - "list_add_label": "Add More", - "name": "use_global_variable", - "override_skip": false, - "placeholder": "", - "real_time_refresh": true, - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "track_in_telemetry": true, - "type": "bool", - "value": false - } - } - }, - "selected_output": "text", - "type": "TextInput" - }, - "dragging": false, - "id": "TextInput-mM5Wa", - "measured": { - "height": 234, - "width": 320 - }, - "position": { - "x": 955.8314364398983, - "y": 402.24423846638155 - }, - "positionAbsolute": { - "x": 955.8314364398983, - "y": 402.24423846638155 - }, - "selected": false, - "type": "genericNode" - }, { "data": { "description": "Display a chat message in the Playground.", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json b/src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json index 3f48175323..69d4420676 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json @@ -1,35 +1,6 @@ { "data": { "edges": [ - { - "animated": false, - "className": "", - "data": { - "sourceHandle": { - "dataType": "TextInput", - "id": "TextInput-4RTs6", - "name": "text", - "output_types": [ - "Message" - ] - }, - "targetHandle": { - "fieldName": "guidelines", - "id": "Prompt-irBTi", - "inputTypes": [ - "Message", - "Text" - ], - "type": "str" - } - }, - "id": "reactflow__edge-TextInput-4RTs6{œdataTypeœ:œTextInputœ,œidœ:œTextInput-4RTs6œ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Prompt-irBTi{œfieldNameœ:œguidelinesœ,œidœ:œPrompt-irBTiœ,œinputTypesœ:[œMessageœ,œTextœ],œtypeœ:œstrœ}", - "selected": false, - "source": "TextInput-4RTs6", - "sourceHandle": "{œdataTypeœ: œTextInputœ, œidœ: œTextInput-4RTs6œ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", - "target": "Prompt-irBTi", - "targetHandle": "{œfieldNameœ: œguidelinesœ, œidœ: œPrompt-irBTiœ, œinputTypesœ: [œMessageœ, œTextœ], œtypeœ: œstrœ}" - }, { "animated": false, "className": "", @@ -678,7 +649,7 @@ "show": true, "title_case": false, "type": "str", - "value": "" + "value": "Build a post for Instagram:\n\n1. **Opening Line**: Start with a powerful, intriguing question or statement to grab attention. Example: \"Ever wondered what it feels like to fly?\"\n\n2. **Main Content**: \n - Briefly share a personal story or insight related to the opening line. Keep it engaging and relatable.\n - Include valuable information or a lesson learned that your audience can benefit from.\n\n3. **Emojis**: Integrate emojis naturally within your text to emphasize key points and add a playful tone.\n\n4. **Call to Action (CTA)**: End with a clear CTA. Encourage your audience to share their thoughts, experiences, or to take a specific action. Example: \"Share your dream adventure in the comments! 🌍✈️\"\n\n5. **Hashtags**: Conclude with a selection of relevant hashtags. Place them at the end of your post to maintain focus on your message." }, "template": { "_input_type": "PromptInput", @@ -764,144 +735,6 @@ "selected": false, "type": "genericNode" }, - { - "data": { - "id": "TextInput-4RTs6", - "node": { - "base_classes": [ - "Message" - ], - "beta": false, - "conditional_paths": [], - "custom_fields": {}, - "description": "Get user text inputs.", - "display_name": "Text Input", - "documentation": "", - "edited": false, - "field_order": [ - "input_value", - "use_global_variable" - ], - "frozen": false, - "icon": "type", - "legacy": false, - "lf_version": "1.0.19.post2", - "metadata": { - "code_hash": "518f16485886", - "dependencies": { - "dependencies": [ - { - "name": "lfx", - "version": null - } - ], - "total_dependencies": 1 - }, - "module": "lfx.components.input_output.text.TextInputComponent" - }, - "output_types": [], - "outputs": [ - { - "allows_loop": false, - "cache": true, - "display_name": "Output Text", - "group_outputs": false, - "method": "text_response", - "name": "text", - "selected": "Message", - "tool_mode": true, - "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 typing import Any\n\nfrom lfx.base.io.text import TextComponent\nfrom lfx.io import BoolInput, MultilineInput, Output\nfrom lfx.schema.message import Message\n\n\nclass TextInputComponent(TextComponent):\n display_name = \"Text Input\"\n description = \"Get user text inputs.\"\n documentation: str = \"https://docs.langflow.org/text-input-and-output\"\n icon = \"type\"\n name = \"TextInput\"\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n info=\"Text to be passed as input.\",\n ),\n BoolInput(\n name=\"use_global_variable\",\n display_name=\"Use Global Variable\",\n info=\"Enable to select from global variables (shows globe icon). Disables multiline editing.\",\n value=False,\n advanced=True,\n real_time_refresh=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Output Text\", name=\"text\", method=\"text_response\"),\n ]\n\n def update_build_config(self, build_config: dict, field_value: Any, field_name: str | None = None) -> dict:\n if field_name == \"use_global_variable\":\n if field_value:\n # Enable global variable mode: single-line with password masking and globe dropdown\n build_config[\"input_value\"][\"multiline\"] = False\n build_config[\"input_value\"][\"password\"] = True\n else:\n # Default mode: multiline text editing\n build_config[\"input_value\"][\"multiline\"] = True\n build_config[\"input_value\"][\"password\"] = False\n return build_config\n\n def text_response(self) -> Message:\n return Message(\n text=self.input_value,\n )\n" - }, - "input_value": { - "_input_type": "MultilineInput", - "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, - "trace_as_input": true, - "trace_as_metadata": true, - "type": "str", - "value": "Build a post for Instagram:\n\n1. **Opening Line**: Start with a powerful, intriguing question or statement to grab attention. Example: \"Ever wondered what it feels like to fly?\"\n\n2. **Main Content**: \n - Briefly share a personal story or insight related to the opening line. Keep it engaging and relatable.\n - Include valuable information or a lesson learned that your audience can benefit from.\n\n3. **Emojis**: Integrate emojis naturally within your text to emphasize key points and add a playful tone.\n\n4. **Call to Action (CTA)**: End with a clear CTA. Encourage your audience to share their thoughts, experiences, or to take a specific action. Example: \"Share your dream adventure in the comments! 🌍✈️\"\n\n5. **Hashtags**: Conclude with a selection of relevant hashtags. Place them at the end of your post to maintain focus on your message." - }, - "use_global_variable": { - "_input_type": "BoolInput", - "advanced": true, - "display_name": "Use Global Variable", - "dynamic": false, - "info": "Enable to select from global variables (shows globe icon). Disables multiline editing.", - "list": false, - "list_add_label": "Add More", - "name": "use_global_variable", - "override_skip": false, - "placeholder": "", - "real_time_refresh": true, - "required": false, - "show": true, - "title_case": false, - "tool_mode": false, - "trace_as_metadata": true, - "track_in_telemetry": true, - "type": "bool", - "value": false - } - } - }, - "selected_output": "text", - "type": "TextInput" - }, - "dragging": false, - "id": "TextInput-4RTs6", - "measured": { - "height": 234, - "width": 320 - }, - "position": { - "x": 5672.768365094557, - "y": 3457.8151629350077 - }, - "positionAbsolute": { - "x": 5671.190001393486, - "y": 3422.371192525402 - }, - "selected": false, - "type": "genericNode" - }, { "data": { "description": "Create a prompt template with dynamic variables.", diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Knowledge Retrieval.json b/src/backend/base/langflow/initial_setup/starter_projects/Knowledge Retrieval.json index 948963e3de..83da82f580 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Knowledge Retrieval.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Knowledge Retrieval.json @@ -5,9 +5,9 @@ "className": "", "data": { "sourceHandle": { - "dataType": "TextInput", - "id": "TextInput-k48NL", - "name": "text", + "dataType": "ChatInput", + "id": "ChatInput-k48NL", + "name": "message", "output_types": [ "Message" ] @@ -21,9 +21,9 @@ "type": "str" } }, - "id": "xy-edge__TextInput-k48NL{œdataTypeœ:œTextInputœ,œidœ:œTextInput-k48NLœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-Knowledge-kgwih{œfieldNameœ:œsearch_queryœ,œidœ:œKnowledge-kgwihœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "source": "TextInput-k48NL", - "sourceHandle": "{œdataTypeœ: œTextInputœ, œidœ: œTextInput-k48NLœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", + "id": "xy-edge__ChatInput-k48NL{œdataTypeœ:œChatInputœ,œidœ:œChatInput-k48NLœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Knowledge-kgwih{œfieldNameœ:œsearch_queryœ,œidœ:œKnowledge-kgwihœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", + "source": "ChatInput-k48NL", + "sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-k48NLœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}", "target": "Knowledge-kgwih", "targetHandle": "{œfieldNameœ: œsearch_queryœ, œidœ: œKnowledge-kgwihœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, @@ -122,7 +122,9 @@ }, { "data": { - "id": "TextInput-k48NL", + "description": "Get chat inputs from the Playground.", + "display_name": "Chat Input", + "id": "ChatInput-k48NL", "node": { "base_classes": [ "Message" @@ -130,20 +132,25 @@ "beta": false, "conditional_paths": [], "custom_fields": {}, - "description": "Get user text inputs.", - "display_name": "Text Input", - "documentation": "https://docs.langflow.org/components-io#text-input", + "description": "Get chat inputs from the Playground.", + "display_name": "Chat Input", + "documentation": "", "edited": false, "field_order": [ "input_value", - "use_global_variable" + "should_store_message", + "sender", + "sender_name", + "session_id", + "context_id", + "files" ], "frozen": false, - "icon": "type", + "icon": "MessagesSquare", "legacy": false, - "lf_version": "1.5.0.post1", + "lf_version": "1.7.0", "metadata": { - "code_hash": "518f16485886", + "code_hash": "7a26c54d89ed", "dependencies": { "dependencies": [ { @@ -153,18 +160,17 @@ ], "total_dependencies": 1 }, - "module": "lfx.components.input_output.text.TextInputComponent" + "module": "lfx.components.input_output.chat.ChatInput" }, - "minimized": false, "output_types": [], "outputs": [ { "allows_loop": false, "cache": true, - "display_name": "Output Text", + "display_name": "Chat Message", "group_outputs": false, - "method": "text_response", - "name": "text", + "method": "message_response", + "name": "message", "selected": "Message", "tool_mode": true, "types": [ @@ -192,23 +198,21 @@ "show": true, "title_case": false, "type": "code", - "value": "from typing import Any\n\nfrom lfx.base.io.text import TextComponent\nfrom lfx.io import BoolInput, MultilineInput, Output\nfrom lfx.schema.message import Message\n\n\nclass TextInputComponent(TextComponent):\n display_name = \"Text Input\"\n description = \"Get user text inputs.\"\n documentation: str = \"https://docs.langflow.org/text-input-and-output\"\n icon = \"type\"\n name = \"TextInput\"\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n info=\"Text to be passed as input.\",\n ),\n BoolInput(\n name=\"use_global_variable\",\n display_name=\"Use Global Variable\",\n info=\"Enable to select from global variables (shows globe icon). Disables multiline editing.\",\n value=False,\n advanced=True,\n real_time_refresh=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Output Text\", name=\"text\", method=\"text_response\"),\n ]\n\n def update_build_config(self, build_config: dict, field_value: Any, field_name: str | None = None) -> dict:\n if field_name == \"use_global_variable\":\n if field_value:\n # Enable global variable mode: single-line with password masking and globe dropdown\n build_config[\"input_value\"][\"multiline\"] = False\n build_config[\"input_value\"][\"password\"] = True\n else:\n # Default mode: multiline text editing\n build_config[\"input_value\"][\"multiline\"] = True\n build_config[\"input_value\"][\"password\"] = False\n return build_config\n\n def text_response(self) -> Message:\n return Message(\n text=self.input_value,\n )\n" + "value": "from lfx.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom lfx.base.io.chat import ChatComponent\nfrom lfx.inputs.inputs import BoolInput\nfrom lfx.io import (\n DropdownInput,\n FileInput,\n MessageTextInput,\n MultilineInput,\n Output,\n)\nfrom lfx.schema.message import Message\nfrom lfx.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 documentation: str = \"https://docs.langflow.org/chat-input-and-output\"\n icon = \"MessagesSquare\"\n name = \"ChatInput\"\n minimized = True\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Input 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 MessageTextInput(\n name=\"context_id\",\n display_name=\"Context ID\",\n info=\"The context ID of the chat. Adds an extra layer to the local memory.\",\n value=\"\",\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 temp_file=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Chat Message\", name=\"message\", method=\"message_response\"),\n ]\n\n async def message_response(self) -> Message:\n # Ensure files is a list and filter out empty/None values\n files = self.files if self.files else []\n if files and not isinstance(files, list):\n files = [files]\n # Filter out None/empty values\n files = [f for f in files if f is not None and f != \"\"]\n\n session_id = self.session_id or self.graph.session_id or \"\"\n message = await Message.create(\n text=self.input_value,\n sender=self.sender,\n sender_name=self.sender_name,\n session_id=session_id,\n context_id=self.context_id,\n files=files,\n )\n if 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" }, - "input_value": { - "_input_type": "MultilineInput", - "advanced": false, - "copy_field": false, - "display_name": "Text", + "context_id": { + "_input_type": "MessageTextInput", + "advanced": true, + "display_name": "Context ID", "dynamic": false, - "info": "Text to be passed as input.", + "info": "The context ID of the chat. Adds an extra layer to the local memory.", "input_types": [ "Message" ], "list": false, "list_add_label": "Add More", "load_from_db": false, - "multiline": true, - "name": "input_value", + "name": "context_id", "placeholder": "", "required": false, "show": true, @@ -217,37 +221,150 @@ "trace_as_input": true, "trace_as_metadata": true, "type": "str", - "value": "IBM Acquires DataStax" + "value": "" }, - "use_global_variable": { - "_input_type": "BoolInput", + "files": { "advanced": true, - "display_name": "Use Global Variable", + "display_name": "Files", "dynamic": false, - "info": "Enable to select from global variables (shows globe icon). Disables multiline editing.", - "list": false, - "list_add_label": "Add More", - "name": "use_global_variable", - "override_skip": false, + "fileTypes": [ + "csv", + "json", + "pdf", + "txt", + "md", + "mdx", + "yaml", + "yml", + "xml", + "html", + "htm", + "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, + "temp_file": true, + "title_case": false, + "trace_as_metadata": true, + "type": "file", + "value": "" + }, + "input_value": { + "advanced": false, + "display_name": "Input 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, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "IBM Acquires DataStax" + }, + "sender": { + "advanced": true, + "display_name": "Sender Type", + "dynamic": false, + "info": "Type of sender.", + "name": "sender", + "options": [ + "Machine", + "User" + ], + "placeholder": "", + "required": false, + "show": true, + "title_case": false, + "trace_as_metadata": true, + "type": "str", + "value": "User" + }, + "sender_name": { + "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, + "trace_as_input": true, + "trace_as_metadata": true, + "type": "str", + "value": "User" + }, + "session_id": { + "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, + "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": "", - "real_time_refresh": true, "required": false, "show": true, "title_case": false, - "tool_mode": false, "trace_as_metadata": true, - "track_in_telemetry": true, "type": "bool", - "value": false + "value": true } - }, - "tool_mode": false + } }, - "showNode": true, - "type": "TextInput" + "selected_output": "message", + "type": "ChatInput" }, "dragging": false, - "id": "TextInput-k48NL", + "id": "ChatInput-k48NL", "measured": { "height": 204, "width": 320 diff --git a/src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json b/src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json index cbcc15342c..9388ae56d1 100644 --- a/src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json +++ b/src/backend/base/langflow/initial_setup/starter_projects/Portfolio Website Code Generator.json @@ -29,34 +29,6 @@ "target": "LanguageModelComponent-FtHFF", "targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œLanguageModelComponent-FtHFFœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" }, - { - "animated": false, - "className": "", - "data": { - "sourceHandle": { - "dataType": "TextInput", - "id": "TextInput-385NK", - "name": "text", - "output_types": [ - "Message" - ] - }, - "targetHandle": { - "fieldName": "system_message", - "id": "LanguageModelComponent-FtHFF", - "inputTypes": [ - "Message" - ], - "type": "str" - } - }, - "id": "reactflow__edge-TextInput-385NK{œdataTypeœ:œTextInputœ,œidœ:œTextInput-385NKœ,œnameœ:œtextœ,œoutput_typesœ:[œMessageœ]}-LanguageModelComponent-FtHFF{œfieldNameœ:œsystem_messageœ,œidœ:œLanguageModelComponent-FtHFFœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}", - "selected": false, - "source": "TextInput-385NK", - "sourceHandle": "{œdataTypeœ: œTextInputœ, œidœ: œTextInput-385NKœ, œnameœ: œtextœ, œoutput_typesœ: [œMessageœ]}", - "target": "LanguageModelComponent-FtHFF", - "targetHandle": "{œfieldNameœ: œsystem_messageœ, œidœ: œLanguageModelComponent-FtHFFœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}" - }, { "animated": false, "className": "", @@ -150,148 +122,6 @@ } ], "nodes": [ - { - "data": { - "id": "TextInput-385NK", - "node": { - "base_classes": [ - "Message" - ], - "beta": false, - "category": "inputs", - "conditional_paths": [], - "custom_fields": {}, - "description": "Get user text inputs.", - "display_name": "Text Input", - "documentation": "", - "edited": false, - "field_order": [ - "input_value", - "use_global_variable" - ], - "frozen": false, - "icon": "type", - "key": "TextInput", - "legacy": false, - "lf_version": "1.6.0", - "metadata": { - "code_hash": "518f16485886", - "dependencies": { - "dependencies": [ - { - "name": "lfx", - "version": null - } - ], - "total_dependencies": 1 - }, - "module": "lfx.components.input_output.text.TextInputComponent" - }, - "minimized": false, - "output_types": [], - "outputs": [ - { - "allows_loop": false, - "cache": true, - "display_name": "Output Text", - "group_outputs": false, - "method": "text_response", - "name": "text", - "selected": "Message", - "tool_mode": true, - "types": [ - "Message" - ], - "value": "__UNDEFINED__" - } - ], - "pinned": false, - "score": 0.0020353564437605998, - "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 typing import Any\n\nfrom lfx.base.io.text import TextComponent\nfrom lfx.io import BoolInput, MultilineInput, Output\nfrom lfx.schema.message import Message\n\n\nclass TextInputComponent(TextComponent):\n display_name = \"Text Input\"\n description = \"Get user text inputs.\"\n documentation: str = \"https://docs.langflow.org/text-input-and-output\"\n icon = \"type\"\n name = \"TextInput\"\n\n inputs = [\n MultilineInput(\n name=\"input_value\",\n display_name=\"Text\",\n info=\"Text to be passed as input.\",\n ),\n BoolInput(\n name=\"use_global_variable\",\n display_name=\"Use Global Variable\",\n info=\"Enable to select from global variables (shows globe icon). Disables multiline editing.\",\n value=False,\n advanced=True,\n real_time_refresh=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Output Text\", name=\"text\", method=\"text_response\"),\n ]\n\n def update_build_config(self, build_config: dict, field_value: Any, field_name: str | None = None) -> dict:\n if field_name == \"use_global_variable\":\n if field_value:\n # Enable global variable mode: single-line with password masking and globe dropdown\n build_config[\"input_value\"][\"multiline\"] = False\n build_config[\"input_value\"][\"password\"] = True\n else:\n # Default mode: multiline text editing\n build_config[\"input_value\"][\"multiline\"] = True\n build_config[\"input_value\"][\"password\"] = False\n return build_config\n\n def text_response(self) -> Message:\n return Message(\n text=self.input_value,\n )\n" - }, - "input_value": { - "_input_type": "MultilineInput", - "advanced": false, - "display_name": "Text", - "dynamic": false, - "info": "Text to be passed as input.", - "input_types": [ - "Message" - ], - "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": "Generate a single-page portfolio website using HTML and CSS that takes a resume in JSON format as input and dynamically renders the following sections with a well-structured and aesthetic layout:\n\n📌 Sections & Content Requirements:\n\t1.\tHeader:\n\t•\tDisplay the person’s name, job title, and a professional tagline prominently.\n\t•\tEnsure the name is bold and eye-catching, with subtle emphasis on the job title.\n\t2.\tAbout Me:\n\t•\tExtract and enhance the personal summary from the resume, making it engaging, concise, and readable.\n\t•\tUse short, well-structured sentences to improve clarity.\n\t3.\tExperience:\n\t•\tList past job roles with company names, durations, and a refined description of responsibilities.\n\t•\tEnsure descriptions are professionally formatted, with key contributions highlighted.\n\t4.\tProjects:\n\t•\tDisplay projects as a neatly styled list.\n\t•\tEach project includes a title, refined description, technologies used, and rounded buttons linking to GitHub or live demo (if available).\n\t5.\tSkills:\n\t•\tDisplay skills as aesthetic pill-style badges below the Skills section title. Display all skills mentioned\n\t•\tArrange in a well-balanced, ensuring readability and consistent spacing.\n\t6.\tEducation:\n\t•\tList degrees, institutions, and years attended in a clean and professional format.\n\t•\tMaintain uniformity in typography and spacing.\n\t7.\tAwards & Publications (if any):\n\t•\tIf the resume contains awards or publications, display them in a separate section.\n\t•\tEach entry includes the title, organization, and year, ensuring clean alignment.\n\t8.\tContact:\n\t•\tDisplay email, social media links, and an optional contact button.\n\t•\tEnsure social media links are clearly visible, with modern and accessible icon buttons.\n\n🎨 Styling & Aesthetic Requirements:\n\n✅ Minimalist & Elegant:\n\t•\tClean layout with ample whitespace for breathing room.\n\t•\tConsistent spacing across all sections.\n\n✅ Fast & Lightweight:\n\t•\tUse only HTML & CSS (no JavaScript required).\n\t•\tEnsure a smooth, fast-loading experience.\n\n✅ Beautiful Typography:\n\t•\tUse a modern, professional Google Font that complements the design.\n\t•\tEnsure text readability with proper size, weight, and contrast.\n\n✅ Visually Harmonious Colors & Themes:\n\t•\tFollow a cohesive color palette that ensures a modern, professional feel.\n\t•\tEnsure background colors, text colors, and section dividers are consistent and complementary.\n\t•\tAvoid hard-to-read combinations (e.g., light text on a light background).\n\n✅ Responsive & Readable Design:\n\t•\tMobile-first approach, adapting to desktop, tablet, and mobile views.\n\t•\tMaintain consistency in padding, margins, and alignment.\n\n✅ Dark Mode Support:\n\t•\tAuto-detect system settings and adjust the theme accordingly.\n\t•\tEnsure clear contrasts and readability in both light and dark modes.\n\n✅ Embedded CSS:\n\t•\tEnsure CSS is written directly in the HTML file within