I moved the initialization of the thread (communication with openAI assistant API) from rendering the chat component to sending a message.
Now the initial answer will take slightly longer, but we do not create a lot of empty threads each time it gets rendered.
I moved the initialization of the thread (communication with openAI assistant API) from rendering the chat component to sending a message. Now the initial answer will take slightly longer, but we do not create a lot of empty threads each time it gets rendered.