fix: update several other templates (#8569)

* Update Vector Store RAG.json

* fix: make starter projects auto refactor not remove selected output (#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (#8490)

* update templates

* update templates

* First round of template updates

* Update templates

* fix: Update SaaS, Social Media, and YouTube json file (#8441)

* update SaaS, Social Media, and YouTube json file

* fix: make starter projects auto refactor not remove selected output (#8400)

* Fixed bug where starter projects were refactored incorrectly

* fix: improve handling of selected outputs in custom component template builder

- Added checks to ensure selected output is valid before attempting to set its state.
- Enhanced code readability with comments explaining the logic for selecting outputs.

* Set selected output as the previous selected output

* Update base.py

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* fix: made clean edges clean after changing dropdown of output (#8460)

fixed output considering all outputs not just selected one

* refactor(docker): remove --extra deploy flag from uv sync commands (#8485)

🔧 (build_and_push_with_extras.Dockerfile): remove unnecessary uv sync command options to improve build efficiency and reduce redundancy

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: refactor mcp and freeze tests to be less prone to flaky results (#8486)

* Fixed mcp test to be less prone to errors

* Fix freeze spec

* fix: made button disabled state more congruent, made edit flow details submit on enter (#8339)

* Changed textarea classes

* Changed flowsettingscomponent to use form

* changed edit flow settings to use form and to submit on enter

* Reset form data on close

* Updated disabled state to have lower opacity instead of to have set background

* Fixed loading state of button

* Fix: chat memory store issue and fix output types (#8463)

* fix chat memory

* update template

* update update outputs

* update update outputs

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* ci: update setup-uv to possibly fix caching (#8490)

* update json

* fix custom component

* revert change

---------

Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>

* fix: templates (#8499)

* basic-prompting-template-updated

* show-system-message

* names

* blog-writer-tested

* financial-report-parser

* image-sentiment-analysis

* seo-keyword-generator

* seo-keyword-generator

* Merge branch 'fix-vector-search-template' into mendons-template-branch

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>

* Update Basic Prompting.json

* Update Blog Writer.json

* Further template updates

* Update Image Sentiment Analysis.json

* Update templates

* Update Financial Report Parser.json

* Update Market Research.json

* Update Market Research.json

* update several templates

* Update Image Sentiment Analysis.json

* Update Market Research.json

* Update image sentiment analysis template

* Update Market Research.json

* Update Custom Component Maker.json

* Update Custom Component Maker.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* Update Hybrid Search RAG.json

* More template updates

* Update Financial Report Parser.json

* updated templates

* change custom component maker

* Update Twitter Thread Generator.json

* updates from main

* change model

* Update Research Translation Loop.json

* expanded output component to fix tests

* update template

* autofix

* fix error

* fix change back

* change back

* ci: Skip truncated values test for refactoring (#8670)

* refactor: simplify init target by removing cache cleanup and adding pre-commit hook (#8590)

* build: add pyyaml dependency

* refactor: simplify init command by removing cache cleaning and langflow run call

* refactor: simplify init target by removing cache cleanup and adding pre-commit hook

* refactor: update langchain_core.prompts import paths to use specific modules

---------

Co-authored-by: Edwin Jose <edwin.jose@datastax.com>

* feat: update structured output to multiline input and revise system prompt (#8585)

* Update structured_output.py

* [autofix.ci] apply automated fixes

* Update structured_output.py

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* update to prompt

* template updates

* Update src/backend/base/langflow/components/processing/structured_output.py

* [autofix.ci] apply automated fixes

* Update src/backend/base/langflow/components/processing/structured_output.py

* Update src/backend/base/langflow/components/processing/structured_output.py

* Update src/backend/base/langflow/components/processing/structured_output.py

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

* feat: add sessions endpoint with session management enhancements (#8596)

* 📝 (monitor.py): Add endpoint to get sessions and handle session_id encoding for API requests
📝 (use-get-messages-mutation.ts): Implement a mutation function to fetch messages with query parameters and handle session_id encoding for API requests
📝 (use-get-messages-polling.ts): Ensure proper encoding of session_id for API requests in polling mutation
📝 (use-get-messages.ts): Handle session_id encoding for API requests in messages query
📝 (new-modal.tsx): Implement functions to handle session deletion and proper encoding of session_id for API requests
📝 (utils.ts): Add functions to encode, decode, validate, format, and prepare session IDs for API requests

* 📝 (constants.ts): Add SESSIONS constant to API URLs for monitoring sessions
🔧 (use-delete-messages.ts): Add queryClient to UseRequestProcessor to invalidate sessions query
 (use-get-sessions-from-flow.ts): Introduce useGetSessionsFromFlowQuery to fetch sessions from flow
🔧 (use-rename-session.ts): Change refetchQueries to invalidateQueries for useGetSessionsFromFlowQuery
🔧 (custom-new-modal.tsx): Update import path for IOModal to playground-modal
🔧 (session-selector.tsx): Add setActiveSession function to handle setting active session
🔧 (sidebar-open-view.tsx): Add setActiveSession function to handle setting active session
♻️ (new-modal.tsx): Refactor IOModal into playground-modal and update functionality
♻️ (playground-modal.tsx): Refactor IOModal to handle playground-specific functionality
⬆️ (flowStore.ts): Add newChatOnPlayground state and setNewChatOnPlayground function
⬆️ (index.ts): Update FlowStoreType to include newChatOnPlayground and setNewChatOnPlayground

* 🔧 (pyproject.toml): update testpaths to point to the correct directory for tests
 (test_session_endpoint.py): add unit tests for sessions endpoint with flow_id filtering
♻️ (session-selector.tsx): refactor to trim editedSession before setting it
♻️ (sidebar-open-view.tsx): refactor to set visibleSession instead of activeSession

*  (use-get-sessions-from-flow.ts): Always include the flow ID as the default session if it's not already present
♻️ (playground-modal.tsx): Refactor setting sessions to include currentFlowId as the default session if not present, and handle visibility of sessions more efficiently

* ♻️ (use-get-messages-mutation.ts): remove unused imports and refactor code for better readability and maintainability

*  (test_session_endpoint.py): refactor test function names for better clarity and consistency

*  (create-new-session-name.ts): add function to generate a new session name based on the current date and time
🔧 (playground-modal.tsx): import createNewSessionName function to dynamically set a new session name when no session is visible

* [autofix.ci] apply automated fixes

*  (monitor.py): rename get_sessions endpoint to get_message_sessions for clarity and consistency
🔧 (constants.ts): remove unused SESSIONS constant from API URLs
🔧 (use-delete-messages.ts): remove commented out code and unnecessary comments
 (use-delete-sessions.ts): add functionality to delete sessions in frontend
🔧 (use-get-sessions-from-flow.ts): update API endpoint for getting sessions to match backend changes
🔧 (playground-modal.tsx): add functionality to delete sessions and associated messages in the UI, update UI optimistically, and handle errors appropriately

* [autofix.ci] apply automated fixes

* 🐛 (monitor.py): Fix type hinting issue in delete_messages function
📝 (monitor.py): Add comments and improve readability in test_messages_endpoints.py
📝 (session_endpoint.py): Update endpoint paths for consistency and clarity in test_session_endpoint.py

* [autofix.ci] apply automated fixes

* fix: update SQL statement to use col() for session_id filtering in get_message_sessions function

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

* fix: implemented cached values and temporary MCP servers on MCP component (#8628)

* Added actionCount to fetch only servers without actionCount

* Updated queries and uses to use servers without action data first, and then to fetch them

* removed comment

* updated constants

* Added loading dropdown

* Make options persist

* Implemented new value format for McpComponent and implemented saving and removing temp Mcp Server if config is existent

* Changed value type

* Implemented cache and saving the server config

* Fixed mcp server test

* fix backend formatting

* fixed lint

* Added await

* Fixed save button not appearing when no servers are available

* added condition to only show save button when options is not null

* template autofix

* change template

* update text sentiment analysis

* change basic prompt back

* change image sentiment back

* update text sentiment and twitter

* Update Twitter Thread Generator.json

* Add back the input for the chat

* add change

* fix text sentiment

* update research translation

* Update Research Translation Loop.json

---------

Co-authored-by: Eric Hare <ericrhare@gmail.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
Co-authored-by: Cristhian Zanforlin Lousa <cristhian.lousa@gmail.com>
Co-authored-by: Mendon Kissling <59585235+mendonk@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Yuqi Tang 2025-06-23 13:39:28 -07:00 committed by GitHub
commit 19cc82f45c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 224 additions and 216 deletions

View file

@ -7,7 +7,7 @@
"data": {
"sourceHandle": {
"dataType": "ChatInput",
"id": "ChatInput-tlH0y",
"id": "ChatInput-OF2vZ",
"name": "message",
"output_types": [
"Message"
@ -15,19 +15,19 @@
},
"targetHandle": {
"fieldName": "search_query",
"id": "ArXivComponent-gRTc5",
"id": "ArXivComponent-WxSYF",
"inputTypes": [
"Message"
],
"type": "str"
}
},
"id": "reactflow__edge-ChatInput-tlH0y{œdataTypeœ:œChatInputœ,œidœ:œChatInput-tlH0yœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-ArXivComponent-gRTc5{œfieldNameœ:œsearch_queryœ,œidœ:œArXivComponent-gRTc5œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
"id": "reactflow__edge-ChatInput-OF2vZ{œdataTypeœ:œChatInputœ,œidœ:œChatInput-OF2vZœ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-ArXivComponent-WxSYF{œfieldNameœ:œsearch_queryœ,œidœ:œArXivComponent-WxSYFœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
"selected": false,
"source": "ChatInput-tlH0y",
"sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-tlH0yœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}",
"target": "ArXivComponent-gRTc5",
"targetHandle": "{œfieldNameœ: œsearch_queryœ, œidœ: œArXivComponent-gRTc5œ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
"source": "ChatInput-OF2vZ",
"sourceHandle": "{œdataTypeœ: œChatInputœ, œidœ: œChatInput-OF2vZœ, œnameœ: œmessageœ, œoutput_typesœ: [œMessageœ]}",
"target": "ArXivComponent-WxSYF",
"targetHandle": "{œfieldNameœ: œsearch_queryœ, œidœ: œArXivComponent-WxSYFœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
},
{
"animated": false,
@ -35,7 +35,7 @@
"data": {
"sourceHandle": {
"dataType": "ArXivComponent",
"id": "ArXivComponent-gRTc5",
"id": "ArXivComponent-WxSYF",
"name": "dataframe",
"output_types": [
"DataFrame"
@ -43,19 +43,19 @@
},
"targetHandle": {
"fieldName": "data",
"id": "LoopComponent-F5Djy",
"id": "LoopComponent-zuKTL",
"inputTypes": [
"DataFrame"
],
"type": "other"
}
},
"id": "reactflow__edge-ArXivComponent-gRTc5{œdataTypeœ:œArXivComponentœ,œidœ:œArXivComponent-gRTc5œ,œnameœ:œdataframeœ,œoutput_typesœ:[œDataFrameœ]}-LoopComponent-F5Djy{œfieldNameœ:œdataœ,œidœ:œLoopComponent-F5Djyœ,œinputTypesœ:[œDataFrameœ],œtypeœ:œotherœ}",
"id": "reactflow__edge-ArXivComponent-WxSYF{œdataTypeœ:œArXivComponentœ,œidœ:œArXivComponent-WxSYFœ,œnameœ:œdataframeœ,œoutput_typesœ:[œDataFrameœ]}-LoopComponent-zuKTL{œfieldNameœ:œdataœ,œidœ:œLoopComponent-zuKTLœ,œinputTypesœ:[œDataFrameœ],œtypeœ:œotherœ}",
"selected": false,
"source": "ArXivComponent-gRTc5",
"sourceHandle": "{œdataTypeœ: œArXivComponentœ, œidœ: œArXivComponent-gRTc5œ, œnameœ: œdataframeœ, œoutput_typesœ: [œDataFrameœ]}",
"target": "LoopComponent-F5Djy",
"targetHandle": "{œfieldNameœ: œdataœ, œidœ: œLoopComponent-F5Djyœ, œinputTypesœ: [œDataFrameœ], œtypeœ: œotherœ}"
"source": "ArXivComponent-WxSYF",
"sourceHandle": "{œdataTypeœ: œArXivComponentœ, œidœ: œArXivComponent-WxSYFœ, œnameœ: œdataframeœ, œoutput_typesœ: [œDataFrameœ]}",
"target": "LoopComponent-zuKTL",
"targetHandle": "{œfieldNameœ: œdataœ, œidœ: œLoopComponent-zuKTLœ, œinputTypesœ: [œDataFrameœ], œtypeœ: œotherœ}"
},
{
"animated": false,
@ -63,7 +63,7 @@
"data": {
"sourceHandle": {
"dataType": "LoopComponent",
"id": "LoopComponent-F5Djy",
"id": "LoopComponent-zuKTL",
"name": "item",
"output_types": [
"Data"
@ -71,7 +71,7 @@
},
"targetHandle": {
"fieldName": "input_data",
"id": "ParserComponent-fEmaG",
"id": "ParserComponent-2OCL9",
"inputTypes": [
"DataFrame",
"Data"
@ -79,40 +79,12 @@
"type": "other"
}
},
"id": "reactflow__edge-LoopComponent-F5Djy{œdataTypeœ:œLoopComponentœ,œidœ:œLoopComponent-F5Djyœ,œnameœ:œitemœ,œoutput_typesœ:[œDataœ]}-ParserComponent-fEmaG{œfieldNameœ:œinput_dataœ,œidœ:œParserComponent-fEmaGœ,œinputTypesœ:[œDataFrameœ,œDataœ],œtypeœ:œotherœ}",
"id": "reactflow__edge-LoopComponent-zuKTL{œdataTypeœ:œLoopComponentœ,œidœ:œLoopComponent-zuKTLœ,œnameœ:œitemœ,œoutput_typesœ:[œDataœ]}-ParserComponent-2OCL9{œfieldNameœ:œinput_dataœ,œidœ:œParserComponent-2OCL9œ,œinputTypesœ:[œDataFrameœ,œDataœ],œtypeœ:œotherœ}",
"selected": false,
"source": "LoopComponent-F5Djy",
"sourceHandle": "{œdataTypeœ: œLoopComponentœ, œidœ: œLoopComponent-F5Djyœ, œnameœ: œitemœ, œoutput_typesœ: [œDataœ]}",
"target": "ParserComponent-fEmaG",
"targetHandle": "{œfieldNameœ: œinput_dataœ, œidœ: œParserComponent-fEmaGœ, œinputTypesœ: [œDataFrameœ, œDataœ], œtypeœ: œotherœ}"
},
{
"animated": false,
"className": "",
"data": {
"sourceHandle": {
"dataType": "MessagetoData",
"id": "MessagetoData-gTNDz",
"name": "data",
"output_types": [
"Data"
]
},
"targetHandle": {
"dataType": "LoopComponent",
"id": "LoopComponent-F5Djy",
"name": "item",
"output_types": [
"Data"
]
}
},
"id": "reactflow__edge-MessagetoData-gTNDz{œdataTypeœ:œMessagetoDataœ,œidœ:œMessagetoData-gTNDzœ,œnameœ:œdataœ,œoutput_typesœ:[œDataœ]}-LoopComponent-F5Djy{œdataTypeœ:œLoopComponentœ,œidœ:œLoopComponent-F5Djyœ,œnameœ:œitemœ,œoutput_typesœ:[œDataœ]}",
"selected": false,
"source": "MessagetoData-gTNDz",
"sourceHandle": "{œdataTypeœ: œMessagetoDataœ, œidœ: œMessagetoData-gTNDzœ, œnameœ: œdataœ, œoutput_typesœ: [œDataœ]}",
"target": "LoopComponent-F5Djy",
"targetHandle": "{œdataTypeœ: œLoopComponentœ, œidœ: œLoopComponent-F5Djyœ, œnameœ: œitemœ, œoutput_typesœ: [œDataœ]}"
"source": "LoopComponent-zuKTL",
"sourceHandle": "{œdataTypeœ: œLoopComponentœ, œidœ: œLoopComponent-zuKTLœ, œnameœ: œitemœ, œoutput_typesœ: [œDataœ]}",
"target": "ParserComponent-2OCL9",
"targetHandle": "{œfieldNameœ: œinput_dataœ, œidœ: œParserComponent-2OCL9œ, œinputTypesœ: [œDataFrameœ, œDataœ], œtypeœ: œotherœ}"
},
{
"animated": false,
@ -120,7 +92,7 @@
"data": {
"sourceHandle": {
"dataType": "LoopComponent",
"id": "LoopComponent-F5Djy",
"id": "LoopComponent-zuKTL",
"name": "done",
"output_types": [
"DataFrame"
@ -128,7 +100,7 @@
},
"targetHandle": {
"fieldName": "input_data",
"id": "TypeConverterComponent-bRDWF",
"id": "TypeConverterComponent-mWgMR",
"inputTypes": [
"Message",
"Data",
@ -137,12 +109,12 @@
"type": "other"
}
},
"id": "reactflow__edge-LoopComponent-F5Djy{œdataTypeœ:œLoopComponentœ,œidœ:œLoopComponent-F5Djyœ,œnameœ:œdoneœ,œoutput_typesœ:[œDataFrameœ]}-TypeConverterComponent-bRDWF{œfieldNameœ:œinput_dataœ,œidœ:œTypeConverterComponent-bRDWFœ,œinputTypesœ:[œMessageœ,œDataœ,œDataFrameœ],œtypeœ:œotherœ}",
"id": "reactflow__edge-LoopComponent-zuKTL{œdataTypeœ:œLoopComponentœ,œidœ:œLoopComponent-zuKTLœ,œnameœ:œdoneœ,œoutput_typesœ:[œDataFrameœ]}-TypeConverterComponent-mWgMR{œfieldNameœ:œinput_dataœ,œidœ:œTypeConverterComponent-mWgMRœ,œinputTypesœ:[œMessageœ,œDataœ,œDataFrameœ],œtypeœ:œotherœ}",
"selected": false,
"source": "LoopComponent-F5Djy",
"sourceHandle": "{œdataTypeœ: œLoopComponentœ, œidœ: œLoopComponent-F5Djyœ, œnameœ: œdoneœ, œoutput_typesœ: [œDataFrameœ]}",
"target": "TypeConverterComponent-bRDWF",
"targetHandle": "{œfieldNameœ: œinput_dataœ, œidœ: œTypeConverterComponent-bRDWFœ, œinputTypesœ: [œMessageœ, œDataœ, œDataFrameœ], œtypeœ: œotherœ}"
"source": "LoopComponent-zuKTL",
"sourceHandle": "{œdataTypeœ: œLoopComponentœ, œidœ: œLoopComponent-zuKTLœ, œnameœ: œdoneœ, œoutput_typesœ: [œDataFrameœ]}",
"target": "TypeConverterComponent-mWgMR",
"targetHandle": "{œfieldNameœ: œinput_dataœ, œidœ: œTypeConverterComponent-mWgMRœ, œinputTypesœ: [œMessageœ, œDataœ, œDataFrameœ], œtypeœ: œotherœ}"
},
{
"animated": false,
@ -150,7 +122,7 @@
"data": {
"sourceHandle": {
"dataType": "TypeConverterComponent",
"id": "TypeConverterComponent-bRDWF",
"id": "TypeConverterComponent-mWgMR",
"name": "message_output",
"output_types": [
"Message"
@ -158,7 +130,7 @@
},
"targetHandle": {
"fieldName": "input_value",
"id": "ChatOutput-qmosp",
"id": "ChatOutput-ylHrO",
"inputTypes": [
"Data",
"DataFrame",
@ -167,19 +139,20 @@
"type": "other"
}
},
"id": "reactflow__edge-TypeConverterComponent-bRDWF{œdataTypeœ:œTypeConverterComponentœ,œidœ:œTypeConverterComponent-bRDWFœ,œnameœ:œmessage_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-qmosp{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-qmospœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œotherœ}",
"id": "reactflow__edge-TypeConverterComponent-mWgMR{œdataTypeœ:œTypeConverterComponentœ,œidœ:œTypeConverterComponent-mWgMRœ,œnameœ:œmessage_outputœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-ylHrO{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-ylHrOœ,œinputTypesœ:[œDataœ,œDataFrameœ,œMessageœ],œtypeœ:œotherœ}",
"selected": false,
"source": "TypeConverterComponent-bRDWF",
"sourceHandle": "{œdataTypeœ: œTypeConverterComponentœ, œidœ: œTypeConverterComponent-bRDWFœ, œnameœ: œmessage_outputœ, œoutput_typesœ: [œMessageœ]}",
"target": "ChatOutput-qmosp",
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-qmospœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œotherœ}"
"source": "TypeConverterComponent-mWgMR",
"sourceHandle": "{œdataTypeœ: œTypeConverterComponentœ, œidœ: œTypeConverterComponent-mWgMRœ, œnameœ: œmessage_outputœ, œoutput_typesœ: [œMessageœ]}",
"target": "ChatOutput-ylHrO",
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œChatOutput-ylHrOœ, œinputTypesœ: [œDataœ, œDataFrameœ, œMessageœ], œtypeœ: œotherœ}"
},
{
"animated": false,
"className": "",
"data": {
"sourceHandle": {
"dataType": "ParserComponent",
"id": "ParserComponent-fEmaG",
"id": "ParserComponent-2OCL9",
"name": "parsed_text",
"output_types": [
"Message"
@ -187,26 +160,27 @@
},
"targetHandle": {
"fieldName": "input_value",
"id": "LanguageModelComponent-1OIsN",
"id": "LanguageModelComponent-Te29P",
"inputTypes": [
"Message"
],
"type": "str"
}
},
"id": "xy-edge__ParserComponent-fEmaG{œdataTypeœ:œParserComponentœ,œidœ:œParserComponent-fEmaGœ,œnameœ:œparsed_textœ,œoutput_typesœ:[œMessageœ]}-LanguageModelComponent-1OIsN{œfieldNameœ:œinput_valueœ,œidœ:œLanguageModelComponent-1OIsNœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
"id": "reactflow__edge-ParserComponent-2OCL9{œdataTypeœ:œParserComponentœ,œidœ:œParserComponent-2OCL9œ,œnameœ:œparsed_textœ,œoutput_typesœ:[œMessageœ]}-LanguageModelComponent-Te29P{œfieldNameœ:œinput_valueœ,œidœ:œLanguageModelComponent-Te29Pœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
"selected": false,
"source": "ParserComponent-fEmaG",
"sourceHandle": "{œdataTypeœ: œParserComponentœ, œidœ: œParserComponent-fEmaGœ, œnameœ: œparsed_textœ, œoutput_typesœ: [œMessageœ]}",
"target": "LanguageModelComponent-1OIsN",
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œLanguageModelComponent-1OIsNœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
"source": "ParserComponent-2OCL9",
"sourceHandle": "{œdataTypeœ: œParserComponentœ, œidœ: œParserComponent-2OCL9œ, œnameœ: œparsed_textœ, œoutput_typesœ: [œMessageœ]}",
"target": "LanguageModelComponent-Te29P",
"targetHandle": "{œfieldNameœ: œinput_valueœ, œidœ: œLanguageModelComponent-Te29Pœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
},
{
"animated": false,
"className": "",
"data": {
"sourceHandle": {
"dataType": "LanguageModelComponent",
"id": "LanguageModelComponent-1OIsN",
"id": "LanguageModelComponent-Te29P",
"name": "text_output",
"output_types": [
"Message"
@ -214,25 +188,53 @@
},
"targetHandle": {
"fieldName": "message",
"id": "MessagetoData-gTNDz",
"id": "MessagetoData-IbO6b",
"inputTypes": [
"Message"
],
"type": "str"
}
},
"id": "xy-edge__LanguageModelComponent-1OIsN{œdataTypeœ:œLanguageModelComponentœ,œidœ:œLanguageModelComponent-1OIsNœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-MessagetoData-gTNDz{œfieldNameœ:œmessageœ,œidœ:œMessagetoData-gTNDzœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
"id": "reactflow__edge-LanguageModelComponent-Te29P{œdataTypeœ:œLanguageModelComponentœ,œidœ:œLanguageModelComponent-Te29Pœ,œnameœ:œtext_outputœ,œoutput_typesœ:[œMessageœ]}-MessagetoData-IbO6b{œfieldNameœ:œmessageœ,œidœ:œMessagetoData-IbO6bœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
"selected": false,
"source": "LanguageModelComponent-1OIsN",
"sourceHandle": "{œdataTypeœ: œLanguageModelComponentœ, œidœ: œLanguageModelComponent-1OIsNœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}",
"target": "MessagetoData-gTNDz",
"targetHandle": "{œfieldNameœ: œmessageœ, œidœ: œMessagetoData-gTNDzœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
"source": "LanguageModelComponent-Te29P",
"sourceHandle": "{œdataTypeœ: œLanguageModelComponentœ, œidœ: œLanguageModelComponent-Te29Pœ, œnameœ: œtext_outputœ, œoutput_typesœ: [œMessageœ]}",
"target": "MessagetoData-IbO6b",
"targetHandle": "{œfieldNameœ: œmessageœ, œidœ: œMessagetoData-IbO6bœ, œinputTypesœ: [œMessageœ], œtypeœ: œstrœ}"
},
{
"animated": false,
"className": "",
"data": {
"sourceHandle": {
"dataType": "MessagetoData",
"id": "MessagetoData-IbO6b",
"name": "data",
"output_types": [
"Data"
]
},
"targetHandle": {
"dataType": "LoopComponent",
"id": "LoopComponent-zuKTL",
"name": "item",
"output_types": [
"Data"
]
}
},
"id": "reactflow__edge-MessagetoData-IbO6b{œdataTypeœ:œMessagetoDataœ,œidœ:œMessagetoData-IbO6bœ,œnameœ:œdataœ,œoutput_typesœ:[œDataœ]}-LoopComponent-zuKTL{œdataTypeœ:œLoopComponentœ,œidœ:œLoopComponent-zuKTLœ,œnameœ:œitemœ,œoutput_typesœ:[œDataœ]}",
"selected": false,
"source": "MessagetoData-IbO6b",
"sourceHandle": "{œdataTypeœ: œMessagetoDataœ, œidœ: œMessagetoData-IbO6bœ, œnameœ: œdataœ, œoutput_typesœ: [œDataœ]}",
"target": "LoopComponent-zuKTL",
"targetHandle": "{œdataTypeœ: œLoopComponentœ, œidœ: œLoopComponent-zuKTLœ, œnameœ: œitemœ, œoutput_typesœ: [œDataœ]}"
}
],
"nodes": [
{
"data": {
"id": "ArXivComponent-gRTc5",
"id": "ArXivComponent-WxSYF",
"node": {
"base_classes": [
"DataFrame"
@ -252,6 +254,7 @@
"frozen": false,
"icon": "arXiv",
"legacy": false,
"lf_version": "1.4.3",
"metadata": {},
"minimized": false,
"output_types": [],
@ -368,9 +371,9 @@
"type": "ArXivComponent"
},
"dragging": false,
"id": "ArXivComponent-gRTc5",
"id": "ArXivComponent-WxSYF",
"measured": {
"height": 369,
"height": 368,
"width": 320
},
"position": {
@ -382,109 +385,7 @@
},
{
"data": {
"id": "MessagetoData-gTNDz",
"node": {
"base_classes": [
"Data"
],
"beta": true,
"conditional_paths": [],
"custom_fields": {},
"description": "Convert a Message object to a Data object",
"display_name": "Message to Data",
"documentation": "",
"edited": false,
"field_order": [
"message"
],
"frozen": false,
"icon": "message-square-share",
"legacy": true,
"metadata": {},
"minimized": false,
"output_types": [],
"outputs": [
{
"allows_loop": false,
"cache": true,
"display_name": "Data",
"group_outputs": false,
"method": "convert_message_to_data",
"name": "data",
"selected": "Data",
"tool_mode": true,
"types": [
"Data"
],
"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 loguru import logger\n\nfrom langflow.custom.custom_component.component import Component\nfrom langflow.io import MessageInput, Output\nfrom langflow.schema.data import Data\nfrom langflow.schema.message import Message\n\n\nclass MessageToDataComponent(Component):\n display_name = \"Message to Data\"\n description = \"Convert a Message object to a Data object\"\n icon = \"message-square-share\"\n beta = True\n name = \"MessagetoData\"\n legacy = True\n\n inputs = [\n MessageInput(\n name=\"message\",\n display_name=\"Message\",\n info=\"The Message object to convert to a Data object\",\n ),\n ]\n\n outputs = [\n Output(display_name=\"Data\", name=\"data\", method=\"convert_message_to_data\"),\n ]\n\n def convert_message_to_data(self) -> Data:\n if isinstance(self.message, Message):\n # Convert Message to Data\n return Data(data=self.message.data)\n\n msg = \"Error converting Message to Data: Input must be a Message object\"\n logger.opt(exception=True).debug(msg)\n self.status = msg\n return Data(data={\"error\": msg})\n"
},
"message": {
"_input_type": "MessageInput",
"advanced": false,
"display_name": "Message",
"dynamic": false,
"info": "The Message object to convert to a Data object",
"input_types": [
"Message"
],
"list": false,
"list_add_label": "Add More",
"load_from_db": false,
"name": "message",
"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": "MessagetoData"
},
"dragging": false,
"id": "MessagetoData-gTNDz",
"measured": {
"height": 204,
"width": 320
},
"position": {
"x": 1863.8805295746977,
"y": 440.56780240629814
},
"selected": false,
"type": "genericNode"
},
{
"data": {
"id": "ChatOutput-qmosp",
"id": "ChatOutput-ylHrO",
"node": {
"base_classes": [
"Message"
@ -511,6 +412,7 @@
"frozen": false,
"icon": "MessagesSquare",
"legacy": false,
"lf_version": "1.4.3",
"metadata": {},
"minimized": true,
"output_types": [],
@ -778,7 +680,7 @@
"type": "ChatOutput"
},
"dragging": false,
"id": "ChatOutput-qmosp",
"id": "ChatOutput-ylHrO",
"measured": {
"height": 48,
"width": 192
@ -792,7 +694,7 @@
},
{
"data": {
"id": "ChatInput-tlH0y",
"id": "ChatInput-OF2vZ",
"node": {
"base_classes": [
"Message"
@ -818,6 +720,7 @@
"frozen": false,
"icon": "MessagesSquare",
"legacy": false,
"lf_version": "1.4.3",
"metadata": {},
"minimized": true,
"output_types": [],
@ -1089,9 +992,9 @@
"type": "ChatInput"
},
"dragging": false,
"id": "ChatInput-tlH0y",
"id": "ChatInput-OF2vZ",
"measured": {
"height": 204,
"height": 203,
"width": 320
},
"position": {
@ -1103,7 +1006,7 @@
},
{
"data": {
"id": "note-9tIWh",
"id": "note-uG7pK",
"node": {
"description": "### 💡 Add your Anthropic API key here 👇",
"display_name": "",
@ -1116,10 +1019,10 @@
},
"dragging": false,
"height": 324,
"id": "note-9tIWh",
"id": "note-uG7pK",
"measured": {
"height": 324,
"width": 358
"width": 359
},
"position": {
"x": 1479.4278434913201,
@ -1132,9 +1035,9 @@
},
{
"data": {
"id": "note-Hrxxt",
"id": "note-F4Ff1",
"node": {
"description": "# **Langflow Loop Component Template - ArXiv search result Translator** \nThis template translates research paper summaries on ArXiv into Portuguese and summarizes them. \n Using **Langflows looping mechanism**, the template iterates through multiple research papers, translates them with the **Anthropic** model component, and outputs an aggregated version of all translated papers. \n\n## Quickstart \n 1. Add your Anthropic API key to the **Anthropic** component. \n2. In the **Playground**, enter a query related to a research topic (for example, “Quantum Computing Advancements”). \n\n The flow fetches a list of research papers from ArXiv matching the query. Each paper in the retrieved list is processed one-by-one using the Langflow **Loop component**. \n\n The abstract of each paper is translated into Portuguese by the **Anthropic** model component. \n\n Once all papers are translated, the system aggregates them into a **single structured output**.",
"description": "# **Langflow Loop Component Template - ArXiv search result Translator** \nThis template translates research paper summaries on ArXiv into Portuguese and summarizes them. \n Using **Langflows looping mechanism**, the template iterates through multiple research papers, translates them with the **OpenAI** model component, and outputs an aggregated version of all translated papers. \n\n## Quickstart \n 1. Add your OpenAI API key to the **Language Model** component. \n2. In the **Playground**, enter a query related to a research topic (for example, “Quantum Computing Advancements”). \n\n The flow fetches a list of research papers from ArXiv matching the query. Each paper in the retrieved list is processed one-by-one using the Langflow **Loop component**. \n\n The abstract of each paper is translated into Portuguese by the **OpenAI** model component. \n\n Once all papers are translated, the system aggregates them into a **single structured output**.",
"display_name": "",
"documentation": "",
"template": {}
@ -1143,10 +1046,10 @@
},
"dragging": false,
"height": 647,
"id": "note-Hrxxt",
"id": "note-F4Ff1",
"measured": {
"height": 647,
"width": 577
"width": 576
},
"position": {
"x": -890.9006297459302,
@ -1159,7 +1062,7 @@
},
{
"data": {
"id": "ParserComponent-fEmaG",
"id": "ParserComponent-2OCL9",
"node": {
"base_classes": [
"Message"
@ -1318,9 +1221,9 @@
"type": "ParserComponent"
},
"dragging": false,
"id": "ParserComponent-fEmaG",
"id": "ParserComponent-2OCL9",
"measured": {
"height": 329,
"height": 328,
"width": 320
},
"position": {
@ -1332,7 +1235,7 @@
},
{
"data": {
"id": "LoopComponent-F5Djy",
"id": "LoopComponent-zuKTL",
"node": {
"base_classes": [
"Data",
@ -1351,6 +1254,7 @@
"frozen": false,
"icon": "infinity",
"legacy": false,
"lf_version": "1.4.3",
"metadata": {},
"minimized": false,
"output_types": [],
@ -1432,9 +1336,9 @@
"type": "LoopComponent"
},
"dragging": false,
"id": "LoopComponent-F5Djy",
"id": "LoopComponent-zuKTL",
"measured": {
"height": 242,
"height": 241,
"width": 320
},
"position": {
@ -1446,7 +1350,7 @@
},
{
"data": {
"id": "TypeConverterComponent-bRDWF",
"id": "TypeConverterComponent-mWgMR",
"node": {
"base_classes": [
"Message"
@ -1467,6 +1371,7 @@
"icon": "repeat",
"key": "TypeConverterComponent",
"legacy": false,
"lf_version": "1.4.3",
"metadata": {},
"minimized": false,
"output_types": [],
@ -1559,7 +1464,7 @@
"type": "TypeConverterComponent"
},
"dragging": false,
"id": "TypeConverterComponent-bRDWF",
"id": "TypeConverterComponent-mWgMR",
"measured": {
"height": 262,
"width": 320
@ -1573,7 +1478,7 @@
},
{
"data": {
"id": "LanguageModelComponent-1OIsN",
"id": "LanguageModelComponent-Te29P",
"node": {
"base_classes": [
"LanguageModel",
@ -1658,7 +1563,7 @@
"show": true,
"title_case": false,
"type": "str",
"value": ""
"value": "OPENAI_API_KEY"
},
"code": {
"advanced": true,
@ -1731,7 +1636,7 @@
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "claude-opus-4-20250514"
"value": "gpt-4o-mini"
},
"provider": {
"_input_type": "DropdownInput",
@ -1749,10 +1654,10 @@
],
"options_metadata": [
{
"icon": "OpenAI"
"icon": "Anthropic"
},
{
"icon": "Anthropic"
"icon": "OpenAI"
},
{
"icon": "Google"
@ -1767,7 +1672,7 @@
"tool_mode": false,
"trace_as_metadata": true,
"type": "str",
"value": "Anthropic"
"value": "OpenAI"
},
"stream": {
"_input_type": "BoolInput",
@ -1847,9 +1752,9 @@
"type": "LanguageModelComponent"
},
"dragging": false,
"id": "LanguageModelComponent-1OIsN",
"id": "LanguageModelComponent-Te29P",
"measured": {
"height": 534,
"height": 532,
"width": 320
},
"position": {
@ -1858,17 +1763,122 @@
},
"selected": false,
"type": "genericNode"
},
{
"data": {
"id": "MessagetoData-IbO6b",
"node": {
"base_classes": [
"Data"
],
"beta": true,
"category": "processing",
"conditional_paths": [],
"custom_fields": {},
"description": "Convert a Message object to a Data object",
"display_name": "Message to Data",
"documentation": "",
"edited": false,
"field_order": [
"message"
],
"frozen": false,
"icon": "message-square-share",
"key": "MessagetoData",
"legacy": true,
"metadata": {},
"minimized": false,
"output_types": [],
"outputs": [
{
"allows_loop": false,
"cache": true,
"display_name": "Data",
"group_outputs": false,
"method": "convert_message_to_data",
"name": "data",
"selected": "Data",
"tool_mode": true,
"types": [
"Data"
],
"value": "__UNDEFINED__"
}
],
"pinned": false,
"score": 0.008222426499470714,
"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 loguru import logger\n\nfrom langflow.custom.custom_component.component import Component\nfrom langflow.io import MessageInput, Output\nfrom langflow.schema.data import Data\nfrom langflow.schema.message import Message\n\n\nclass MessageToDataComponent(Component):\n display_name = \"Message to Data\"\n description = \"Convert a Message object to a Data object\"\n icon = \"message-square-share\"\n beta = True\n name = \"MessagetoData\"\n legacy = True\n\n inputs = [\n MessageInput(\n name=\"message\",\n display_name=\"Message\",\n info=\"The Message object to convert to a Data object\",\n ),\n ]\n\n outputs = [\n Output(display_name=\"Data\", name=\"data\", method=\"convert_message_to_data\"),\n ]\n\n def convert_message_to_data(self) -> Data:\n if isinstance(self.message, Message):\n # Convert Message to Data\n return Data(data=self.message.data)\n\n msg = \"Error converting Message to Data: Input must be a Message object\"\n logger.opt(exception=True).debug(msg)\n self.status = msg\n return Data(data={\"error\": msg})\n"
},
"message": {
"_input_type": "MessageInput",
"advanced": false,
"display_name": "Message",
"dynamic": false,
"info": "The Message object to convert to a Data object",
"input_types": [
"Message"
],
"list": false,
"list_add_label": "Add More",
"load_from_db": false,
"name": "message",
"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": "MessagetoData"
},
"dragging": false,
"id": "MessagetoData-IbO6b",
"measured": {
"height": 203,
"width": 320
},
"position": {
"x": 1836.3049922790483,
"y": 411.76970008520357
},
"selected": false,
"type": "genericNode"
}
],
"viewport": {
"x": -542.6575578166919,
"y": 461.5588015794615,
"zoom": 0.638990610387083
"x": 718.2366665584553,
"y": 264.2875075099402,
"zoom": 0.46271902027504264
}
},
"description": "This template iterates over search results using LoopComponent and translates each result into Portuguese automatically. 🚀",
"endpoint_name": null,
"id": "ecfcbade-de2b-4f96-83e3-2eeb365fbed0",
"id": "00674d9d-d897-4c75-aedd-dcca1c8e8d9d",
"is_component": false,
"last_tested_version": "1.4.3",
"name": "Research Translation Loop",

View file

@ -3,8 +3,6 @@ import * as dotenv from "dotenv";
import path from "path";
import { awaitBootstrapTest } from "../../utils/await-bootstrap-test";
import { getAllResponseMessage } from "../../utils/get-all-response-message";
import { initialGPTsetup } from "../../utils/initialGPTsetup";
import { waitForOpenModalWithChatInput } from "../../utils/wait-for-open-modal";
import { withEventDeliveryModes } from "../../utils/withEventDeliveryModes";
withEventDeliveryModes(