DeltaGenerator Text Returning

Im running streamlit locally using PyCharm. I created a chatbot that in some cases will return a list of data that I return back as an st.table. The issue Im having is that to show the chat history I have to store all this in a sessionstate variable which is fine. But when I try to retrieve the list and write it back into a st.container I get the list and the DeltaGenerator response

st.table(x[“content”])DeltaGeneratorDeltaGenerator(_provided_cursor=LockedCursor(_parent_path=(1,), _props={‘delta_type’: ‘arrow_table’, ‘add_rows_metadata’: None}), _parent=DeltaGenerator(_provided_cursor=RunningCursor(_parent_path=(1,), _index=1), _parent=DeltaGenerator(), _block_type=‘vertical’, _form_data=FormData(form_id=‘’)))

here is my code, every time I enter to the prompt it should just append a new list into the sessionstate variable. The output should just be a new list appended to the container each time I enter something.

if “history” not in st.session_state:
st.session_state.history =

chat_history = st.container(border=True)

with chat_history:
for x in st.session_state.history:
print(type(x[‘content’]))
chat_history.write(st.table(x[“content”]))

prompt = st.chat_input(“Type here”)
if prompt:
# Display user message
chat_history.chat_message(“user”).markdown(prompt)
# Add user message to chat history
st.session_state.history.append(
{“role”:“assistant”,
“type”:“table”,
“content”: [‘Test’, ‘Test1’, ‘Test2’]
}
)

Turns out the st.write seems to be the issue causing this.

I was able to just use st.table with the content and it worked.