I wrote a simple datalayer that stores elements in JSON on disk and in list_threads method, I read the elements and assign them to threads under elements field. For Plotly, I store the json string of the figure in the content field.
When I resumed the thread, simple elements like Pdf and Text could be resumed correctly, but for Plotly, the UI only reserved a blank div container without the plot.
Because the figure can't be serialized to JSON, I tried removing the element and sending it again in on_chat_resume hook with the same id and forId, but still encountered the serialization issue.
Hello,
I wrote a simple datalayer that stores elements in JSON on disk and in
list_threads
method, I read the elements and assign them to threads underelements
field. ForPlotly
, I store the json string of the figure in thecontent
field.When I resumed the thread, simple elements like
Pdf
andText
could be resumed correctly, but forPlotly
, the UI only reserved a blank div container without the plot.Because the figure can't be serialized to JSON, I tried removing the element and sending it again in
on_chat_resume
hook with the sameid
andforId
, but still encountered the serialization issue.Does anyone know how to resume a
Plotly
plot?