run-llama / rags

Build ChatGPT over your data, all with natural language
MIT License
6.17k stars 629 forks source link

Taking care of the case when no secret file exits #29

Closed alexfilothodoros closed 8 months ago

alexfilothodoros commented 9 months ago

Instead of having an ugly error message like this:

Screenshot 2023-11-24 at 16 41 24

I added an exception. Now a simpler and more direct message notifies the user that there's something wrong with the secrets.toml file.

anoopshrma commented 8 months ago

I think we can check for the secrets with something like this in the home page

if not st.secrets.get(Secret key name):
      use st.info to show that key is not added

and if secrets are there we can put a flag in st.session then before accessing the secrets we can check the flag

alexfilothodoros commented 8 months ago

That's fine by me. @jerryjliu ?