-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
I'm encountering an issue where a dataframe sent in a message is correctly stored in the data layer, but it does not get restored or displayed when the chat is resumed.
Here's the simplified version of my code:
@cl.on_message
async def main(message: cl.Message):
await chain(message.content)
@cl.step(type="tool", name="Agent")
async def chain(question: str):
sql = generate_sql(question)
df = run_sql(sql)
if df is None or df.empty:
await cl.Message(content="La consulta no devolvió resultados.").send()
return
elements = [cl.Dataframe(data=df, display="inline", name="Datos", language="ES")]
await cl.Message(
content="Aquí tienes una tabla con los datos solicitados:",
elements=elements
).send()
@cl.on_chat_resume
async def on_chat_resume(thread):
pass
Chainlit seems to restore basic messages but skips over rich elements like cl.Dataframe
Thanks for the great work and for any help you can provide
Metadata
Metadata
Assignees
Labels
No labels