Call a function from main.py in stream lit.py

I have a problem when using streamlit interface to talk with the assistant. It works perfectly but when it has to call a function from the main.py it doesn’t work anymore. I think I should add in the streamlit_app.py the part of the main.py code where it has the chat part and calls the function. Here’s are the paste bin links. Please help me!! I think the part of the main to be copied/imported is the part of response generation and the part of the streamlit where it has to be pasted is from the raw 58 onwards (the part to create run with new thread)

Hi @Dany

You forgot to paste the links of the code snippets.

1 Like

Here are the code images!! Thank you


Hi Chanin did you check? Thank you !

Here are the snippets! Let me know the solution please thank you very much!
https://pastecode.io/s/ych4iow6
https://pastecode.io/s/jyomg2mx