langflow icon indicating copy to clipboard operation
langflow copied to clipboard

fix: Update stored message to give out only the latest message

Open edwinjosechittilappilly opened this issue 3 months ago • 3 comments

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 the store_message method to use the next function for retrieving messages, ensuring that only the first matching message is returned, and added a default value of None if no messages match.

edwinjosechittilappilly avatar Nov 29 '24 19:11 edwinjosechittilappilly