Open sjondavey opened 7 months ago
The problem is in the cookie manager, I was having similar issue and commented all the cookie logic of the library and it worked. The problem now is, well, you dont have the cookie management.
Thanks @Jerry-Master , I raised this with the Extra-Streamlit-Components project here who seem to handle the cookie library. I hope we can get this resolved because having working authentication really helps to demo working prototypes.
I'm having the same issues - glad i'm not going nuts trying to figure out the root cause!
Hello everyone, apologies for the inconvenience this issue is causing, I promise to delve deeper into this issue.
Thank you @mkhorasani for the great work! we appreciate it!
I'm seemingly having the same issue and I'm glad it is being investigated. I will just put out observations of mine: This issue seems to be related specifically to using "Markdown" to update the chat messages. If "Markdown" is used, the stauth will cause the input prompt to only work every other time (e.g. 1st prompt: OK; 2nd prompt: nothing happens; 3rd prompt: OK; 4th prompt: nothing happens...). If we use .ai_say to update the message only by text strings, everything is fine (but passing Markdown as one of the elements to be updated by .ai_say IS NOT FINE); but we lose a lot of functionalities of the chatbox which would be unacceptable.
Update: I tried commenting out all cookie functionalities, and it does resolve the problem. It seems the cookie function is causing the page to rerun multiple times at every prompt input, regardless of the authentication status, which breaks the functionality of some st elements.
I created a minimum wrapper for the openai chat completion api. It runs locally and on the Streamlit cloud without issue. When I add authentication, the local version still works fine but if I deploy to the streamlit community cloud, the chat stops working after one or two user inputs. Below is the code that includes the authentication.
If I comment out the authentication, I can deploy to the Streamlit cloud and it works fine. See below
I have tried a few variations. As soon as the code
is uncommented (even if I don't check the authentication status), chat stops working after one or two user inputs