From 870bfa24de7e55cf6ff81d61b1aaafe239142988 Mon Sep 17 00:00:00 2001 From: Gustav von Zitzewitz Date: Fri, 12 May 2023 12:01:27 +0200 Subject: [PATCH] add Authentication help --- app.py | 7 +++++-- constants.py | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index c76fc65..cd8b980 100644 --- a/app.py +++ b/app.py @@ -5,6 +5,7 @@ from streamlit_chat import message from constants import ( ACTIVELOOP_HELP, APP_NAME, + AUTHENTICATION_HELP, DEFAULT_DATA_SOURCE, OPENAI_HELP, PAGE_ICON, @@ -23,7 +24,9 @@ load_dotenv() # Page options and header st.set_option("client.showErrorDetails", True) -st.set_page_config(page_title=APP_NAME, page_icon=PAGE_ICON, initial_sidebar_state="expanded") +st.set_page_config( + page_title=APP_NAME, page_icon=PAGE_ICON, initial_sidebar_state="expanded" +) st.markdown( f"

{APP_NAME} {PAGE_ICON}
I know all about your data!

", unsafe_allow_html=True, @@ -51,7 +54,7 @@ if "activeloop_org_name" not in st.session_state: # Sidebar with st.sidebar: - st.title("Authentication") + st.title("Authentication", help=AUTHENTICATION_HELP) with st.form("authentication"): openai_api_key = st.text_input( "OpenAI API Key", diff --git a/constants.py b/constants.py index 8146b30..413144a 100644 --- a/constants.py +++ b/constants.py @@ -7,6 +7,12 @@ PAGE_ICON = "🤖" DATA_PATH = Path.cwd() / "data" DEFAULT_DATA_SOURCE = "git@github.com:gustavz/DataChad.git" +AUTHENTICATION_HELP = """ +Your credentials are only stored in your session state.\n +The keys are neither exposed nor made visible or stored permanently in any way.\n +Feel free to check out [the code base](https://github.com/gustavz/DataChad) to validate how things work. +""" + OPENAI_HELP = """ You can sign-up for OpenAI's API [here](https://openai.com/blog/openai-api).\n Once you are logged in, you find the API keys [here](https://platform.openai.com/account/api-keys)