Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -95,7 +95,7 @@ with st.sidebar:
|
|
| 95 |
|
| 96 |
st.header("Configuration")
|
| 97 |
|
| 98 |
-
|
| 99 |
label = "OpenAI API Key:",
|
| 100 |
help="Required for OpenAI Models",
|
| 101 |
type="password",
|
|
@@ -143,7 +143,7 @@ if prompt := st.chat_input("How can I help you understand this bill?"):
|
|
| 143 |
st.warning("Enter API key to chat")
|
| 144 |
st.stop()
|
| 145 |
else:
|
| 146 |
-
client = OpenAI(api_key=openai_api_key)
|
| 147 |
|
| 148 |
with st.chat_message("user"):
|
| 149 |
st.markdown(prompt)
|
|
|
|
| 95 |
|
| 96 |
st.header("Configuration")
|
| 97 |
|
| 98 |
+
st.text_input(
|
| 99 |
label = "OpenAI API Key:",
|
| 100 |
help="Required for OpenAI Models",
|
| 101 |
type="password",
|
|
|
|
| 143 |
st.warning("Enter API key to chat")
|
| 144 |
st.stop()
|
| 145 |
else:
|
| 146 |
+
client = OpenAI(api_key=st.session_state["openai_api_key"])
|
| 147 |
|
| 148 |
with st.chat_message("user"):
|
| 149 |
st.markdown(prompt)
|