langflow-ai / langflow

Langflow is a low-code app builder for RAG and multi-agent AI applications. It’s Python-based and agnostic to any model, API, or database.
http://www.langflow.org
MIT License
35.65k stars 4.24k forks source link

New Store Message component (11/6/24) doesn't work without external memory #4433

Open SonicDMG opened 2 weeks ago

SonicDMG commented 2 weeks ago

Bug Description

When attempting to use the new Store Message component in DS Langflow without external memory I see the following error:

Error building Component Store Message: (sqlite3.ProgrammingError) Error binding parameter 2: type 'Message' is not supported [SQL: INSERT INTO message (timestamp, sender, sender_name, session_id, text, id, flow_id, files) VALUES (?, ?, ?, ?, ?, ?, ?, ?)] [parameters: ('2024-11-06 22:15:27.000000', Message(text_key='text', data={'text': '', 'files': [], 'timestamp': '2024-11-06 22:15:28'}, default_value='', text='', sender=None, sender_name=None, files=[], session_id='', timestamp='2024-11-06 22:15:28', flow_id=None), Message(text_key='text', data={'text': '', 'files': [], 'timestamp': '2024-11-06 22:15:28'}, default_value='', text='', sender=None, sender_name=None, files=[], session_id='', timestamp='2024-11-06 22:15:28', flow_id=None), Message(text_key='text', data={'text': '01418a0a-be42-4773-ad3e-a009819fb8c5', 'files': [], 'timestamp': '2024-11-06 22:15:28'}, default_value='', text='01418a0a-be42-4773-ad3e-a009819fb8c5', sender=None, sender_name=None, files=[], session_id='', timestamp='2024-11-06 22:15:28', flow_id=None), 'Yes, streaming works effectively, allowing for realistic video and audio streams in real-time during meetings.', '10754203627848a2b81c6388e3fd50a1', '01418a0abe424773ad3ea009819fb8c5', '[]')] (Background on this error at: https://sqlalche.me/e/20/f405)

The previous version of this component seems to work fine using the same scenario.

Reproduction

  1. Create a Store Message component
  2. Wire up an input
  3. Execute without external memory attached

Expected behavior

The component should work with or without external memory attached

Who can help?

No response

Operating System

DataStax Langflow

Langflow Version

1.0.19.post1???

Python Version

None

Screenshot

Screenshot 2024-11-06 at 5 17 28 PM

Flow File

Zoom _ Astra_ERROR.json

edwinjosechittilappilly commented 2 weeks ago

@erichare Please consult with @ogabrielluiz regarding this issue. I believe this is fixed in one of the agent branches. If its an issue related to datetime not JSON serializable

erichare commented 2 weeks ago

Thanks for the heads up @edwinjosechittilappilly . @ogabrielluiz would love your comments before diving further