From ac25d9df0ab6134f17b6c1489e12936adc8047dc Mon Sep 17 00:00:00 2001 From: brockcraft <30579475+brockcraft@users.noreply.github.com> Date: Sat, 20 Apr 2024 05:41:13 +0000 Subject: [PATCH 01/12] first commit with toml file --- Chatbot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Chatbot.py b/Chatbot.py index b6fe7ee32..32157ea53 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -1,8 +1,10 @@ from openai import OpenAI import streamlit as st +import os with st.sidebar: - openai_api_key = st.text_input("OpenAI API Key", key="chatbot_api_key", type="password") +# openai_api_key = st.text_input("OpenAI API Key", key="chatbot_api_key", type="password") + openai_api_key = st.secrets["openai_1"] "[Get an OpenAI API key](https://platform.openai.com/account/api-keys)" "[View the source code](https://github.com/streamlit/llm-examples/blob/main/Chatbot.py)" "[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/streamlit/llm-examples?quickstart=1)" From 7f912a41a8655d3c84212dfa5040a94eafa8932e Mon Sep 17 00:00:00 2001 From: brockcraft <30579475+brockcraft@users.noreply.github.com> Date: Sat, 20 Apr 2024 05:50:50 +0000 Subject: [PATCH 02/12] revised toml --- Chatbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chatbot.py b/Chatbot.py index 32157ea53..5204fee8b 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -4,7 +4,7 @@ with st.sidebar: # openai_api_key = st.text_input("OpenAI API Key", key="chatbot_api_key", type="password") - openai_api_key = st.secrets["openai_1"] + openai_api_key = st.secrets["openai1"] "[Get an OpenAI API key](https://platform.openai.com/account/api-keys)" "[View the source code](https://github.com/streamlit/llm-examples/blob/main/Chatbot.py)" "[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/streamlit/llm-examples?quickstart=1)" From 49952e9da036a56ea05fb8e07bbabb7240736714 Mon Sep 17 00:00:00 2001 From: brockcraft <30579475+brockcraft@users.noreply.github.com> Date: Sat, 20 Apr 2024 06:17:28 +0000 Subject: [PATCH 03/12] toml test --- Chatbot.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Chatbot.py b/Chatbot.py index 5204fee8b..076186a37 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -4,6 +4,7 @@ with st.sidebar: # openai_api_key = st.text_input("OpenAI API Key", key="chatbot_api_key", type="password") + st.write("DB username:", st.secrets["openai1"]) openai_api_key = st.secrets["openai1"] "[Get an OpenAI API key](https://platform.openai.com/account/api-keys)" "[View the source code](https://github.com/streamlit/llm-examples/blob/main/Chatbot.py)" From 3725b2ca0490bca6bd5649bc3908e7222d4680b2 Mon Sep 17 00:00:00 2001 From: brockcraft <30579475+brockcraft@users.noreply.github.com> Date: Sat, 20 Apr 2024 06:42:00 +0000 Subject: [PATCH 04/12] test of secrets --- .vscode/settings.json | 5 +++++ Chatbot.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..b242572ef --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "githubPullRequests.ignoredPullRequestBranches": [ + "main" + ] +} \ No newline at end of file diff --git a/Chatbot.py b/Chatbot.py index 076186a37..c66e2d298 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -4,8 +4,8 @@ with st.sidebar: # openai_api_key = st.text_input("OpenAI API Key", key="chatbot_api_key", type="password") - st.write("DB username:", st.secrets["openai1"]) - openai_api_key = st.secrets["openai1"] + st.write("The donkey is:", st.secrets["thisdonkey"]) +# openai_api_key = st.secrets["openai1"] "[Get an OpenAI API key](https://platform.openai.com/account/api-keys)" "[View the source code](https://github.com/streamlit/llm-examples/blob/main/Chatbot.py)" "[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/streamlit/llm-examples?quickstart=1)" From 0280de7007772d26c6895beaefb1f8597895af02 Mon Sep 17 00:00:00 2001 From: brockcraft <30579475+brockcraft@users.noreply.github.com> Date: Sat, 20 Apr 2024 07:31:37 +0000 Subject: [PATCH 05/12] changes --- Chatbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Chatbot.py b/Chatbot.py index c66e2d298..35024764e 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -4,8 +4,8 @@ with st.sidebar: # openai_api_key = st.text_input("OpenAI API Key", key="chatbot_api_key", type="password") - st.write("The donkey is:", st.secrets["thisdonkey"]) -# openai_api_key = st.secrets["openai1"] + st.write("The keys are:", st.secrets.keys()) +# openai_api_key = st.secrets.thing["donkeykong"] "[Get an OpenAI API key](https://platform.openai.com/account/api-keys)" "[View the source code](https://github.com/streamlit/llm-examples/blob/main/Chatbot.py)" "[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/streamlit/llm-examples?quickstart=1)" From f82019f5b2693fc3fde28470112a1af72610f2df Mon Sep 17 00:00:00 2001 From: brockcraft <30579475+brockcraft@users.noreply.github.com> Date: Sat, 20 Apr 2024 07:32:46 +0000 Subject: [PATCH 06/12] thing --- Chatbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chatbot.py b/Chatbot.py index 35024764e..976ac537a 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -4,7 +4,7 @@ with st.sidebar: # openai_api_key = st.text_input("OpenAI API Key", key="chatbot_api_key", type="password") - st.write("The keys are:", st.secrets.keys()) + st.write("The keys are:", st.secrets.values()) # openai_api_key = st.secrets.thing["donkeykong"] "[Get an OpenAI API key](https://platform.openai.com/account/api-keys)" "[View the source code](https://github.com/streamlit/llm-examples/blob/main/Chatbot.py)" From 7a3d849a908b40ee933944547dd9a8c6f504c325 Mon Sep 17 00:00:00 2001 From: brockcraft <30579475+brockcraft@users.noreply.github.com> Date: Sat, 20 Apr 2024 07:33:45 +0000 Subject: [PATCH 07/12] test --- Chatbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chatbot.py b/Chatbot.py index 976ac537a..35024764e 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -4,7 +4,7 @@ with st.sidebar: # openai_api_key = st.text_input("OpenAI API Key", key="chatbot_api_key", type="password") - st.write("The keys are:", st.secrets.values()) + st.write("The keys are:", st.secrets.keys()) # openai_api_key = st.secrets.thing["donkeykong"] "[Get an OpenAI API key](https://platform.openai.com/account/api-keys)" "[View the source code](https://github.com/streamlit/llm-examples/blob/main/Chatbot.py)" From 678137693b3221e30fe6dbe9e4d0e9bffd7bd7a5 Mon Sep 17 00:00:00 2001 From: brockcraft <30579475+brockcraft@users.noreply.github.com> Date: Sat, 20 Apr 2024 07:35:30 +0000 Subject: [PATCH 08/12] thing --- Chatbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chatbot.py b/Chatbot.py index 35024764e..3655aa39c 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -4,7 +4,7 @@ with st.sidebar: # openai_api_key = st.text_input("OpenAI API Key", key="chatbot_api_key", type="password") - st.write("The keys are:", st.secrets.keys()) + st.write("The keys are:", st.secrets["donkeykong"]) # openai_api_key = st.secrets.thing["donkeykong"] "[Get an OpenAI API key](https://platform.openai.com/account/api-keys)" "[View the source code](https://github.com/streamlit/llm-examples/blob/main/Chatbot.py)" From 50040dd2dbaff391be309468d10f3ae35055afc2 Mon Sep 17 00:00:00 2001 From: brockcraft <30579475+brockcraft@users.noreply.github.com> Date: Sat, 20 Apr 2024 07:36:43 +0000 Subject: [PATCH 09/12] thing --- Chatbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chatbot.py b/Chatbot.py index 3655aa39c..041fe166d 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -4,7 +4,7 @@ with st.sidebar: # openai_api_key = st.text_input("OpenAI API Key", key="chatbot_api_key", type="password") - st.write("The keys are:", st.secrets["donkeykong"]) + st.write("The keys are:", st.secrets["openai1"]) # openai_api_key = st.secrets.thing["donkeykong"] "[Get an OpenAI API key](https://platform.openai.com/account/api-keys)" "[View the source code](https://github.com/streamlit/llm-examples/blob/main/Chatbot.py)" From 80f3d5eb3be2d1329b0ab033dcbc3edd221857bd Mon Sep 17 00:00:00 2001 From: brockcraft <30579475+brockcraft@users.noreply.github.com> Date: Sat, 20 Apr 2024 07:37:06 +0000 Subject: [PATCH 10/12] think --- Chatbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chatbot.py b/Chatbot.py index 041fe166d..3655aa39c 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -4,7 +4,7 @@ with st.sidebar: # openai_api_key = st.text_input("OpenAI API Key", key="chatbot_api_key", type="password") - st.write("The keys are:", st.secrets["openai1"]) + st.write("The keys are:", st.secrets["donkeykong"]) # openai_api_key = st.secrets.thing["donkeykong"] "[Get an OpenAI API key](https://platform.openai.com/account/api-keys)" "[View the source code](https://github.com/streamlit/llm-examples/blob/main/Chatbot.py)" From f6fe539174e2c73be82aea719da21f417cdf56e5 Mon Sep 17 00:00:00 2001 From: brockcraft <30579475+brockcraft@users.noreply.github.com> Date: Sat, 20 Apr 2024 07:39:45 +0000 Subject: [PATCH 11/12] think --- Chatbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chatbot.py b/Chatbot.py index 3655aa39c..5e9992831 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -5,7 +5,7 @@ with st.sidebar: # openai_api_key = st.text_input("OpenAI API Key", key="chatbot_api_key", type="password") st.write("The keys are:", st.secrets["donkeykong"]) -# openai_api_key = st.secrets.thing["donkeykong"] +# openai_api_key = st.secrets["donkeykong"] "[Get an OpenAI API key](https://platform.openai.com/account/api-keys)" "[View the source code](https://github.com/streamlit/llm-examples/blob/main/Chatbot.py)" "[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/streamlit/llm-examples?quickstart=1)" From b19cb7b52bd06ec42c1ada4eed63691975097bd7 Mon Sep 17 00:00:00 2001 From: brockcraft <30579475+brockcraft@users.noreply.github.com> Date: Sat, 20 Apr 2024 07:45:14 +0000 Subject: [PATCH 12/12] test --- Chatbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Chatbot.py b/Chatbot.py index 5e9992831..0b7e8fb3c 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -4,8 +4,8 @@ with st.sidebar: # openai_api_key = st.text_input("OpenAI API Key", key="chatbot_api_key", type="password") - st.write("The keys are:", st.secrets["donkeykong"]) -# openai_api_key = st.secrets["donkeykong"] +# st.write("The keys are:", st.secrets["donkeykong"]) + openai_api_key = st.secrets["openai1"] "[Get an OpenAI API key](https://platform.openai.com/account/api-keys)" "[View the source code](https://github.com/streamlit/llm-examples/blob/main/Chatbot.py)" "[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/streamlit/llm-examples?quickstart=1)"