langflow
langflow copied to clipboard
fix: Update stored message to give out only the latest message
Update stored message to give out only the latest message.
This pull request includes changes to the StoreMessageComponent
class in the store_message.py
file to improve the handling of stored messages. The most important changes include renaming an output and modifying the store_message
method to use more efficient message retrieval logic.
Changes to output naming:
-
src/backend/base/langflow/components/helpers/store_message.py
: Renamed the output from "Stored Messages" to "Stored Message" to reflect that only a single message is stored.
Improvements to message retrieval logic:
-
src/backend/base/langflow/components/helpers/store_message.py
: Modified thestore_message
method to use thenext
function for retrieving messages, ensuring that only the first matching message is returned, and added a default value ofNone
if no messages match.