Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
from openai import OpenAI
|
| 2 |
import streamlit as st
|
| 3 |
import os
|
| 4 |
from openai import AzureOpenAI
|
|
@@ -13,7 +12,7 @@ client = AzureOpenAI(
|
|
| 13 |
)
|
| 14 |
|
| 15 |
if "openai_model" not in st.session_state:
|
| 16 |
-
st.session_state["openai_model"] = "gpt-35-turbo
|
| 17 |
|
| 18 |
if "messages" not in st.session_state:
|
| 19 |
st.session_state.messages = []
|
|
@@ -30,6 +29,7 @@ if prompt := st.chat_input("What is up?"):
|
|
| 30 |
with st.chat_message("assistant"):
|
| 31 |
message_placeholder = st.empty()
|
| 32 |
full_response = ""
|
|
|
|
| 33 |
for response in client.chat.completions.create(
|
| 34 |
model=st.session_state["openai_model"],
|
| 35 |
messages=[
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import os
|
| 3 |
from openai import AzureOpenAI
|
|
|
|
| 12 |
)
|
| 13 |
|
| 14 |
if "openai_model" not in st.session_state:
|
| 15 |
+
st.session_state["openai_model"] = "gpt-35-turbo"
|
| 16 |
|
| 17 |
if "messages" not in st.session_state:
|
| 18 |
st.session_state.messages = []
|
|
|
|
| 29 |
with st.chat_message("assistant"):
|
| 30 |
message_placeholder = st.empty()
|
| 31 |
full_response = ""
|
| 32 |
+
|
| 33 |
for response in client.chat.completions.create(
|
| 34 |
model=st.session_state["openai_model"],
|
| 35 |
messages=[
|