Help for saving and extracting TinyDB values for Chat View

Hi all friends, I am making a chatGPT chatbot. But I want to save the conversations in the TinyDB, what can I do to save and extract the values from the TinyDB. I have been making some blocks but I get error and I need your help.

Please translate your blocks to English. Thank you.

I have already translated them, Help me please @Gordon_Lu