Update app.py
Browse files
app.py
CHANGED
@@ -43,6 +43,7 @@ def ask_assistant_stream(st_model, st_messages, st_temp_value, st_max_tokens):
|
|
43 |
response["stream"] = stream
|
44 |
|
45 |
except Exception as e:
|
|
|
46 |
pass
|
47 |
|
48 |
return response
|
@@ -142,7 +143,6 @@ if prompt := st.chat_input(f"Hi I'm {selected_model}, ask me a question"):
|
|
142 |
|
143 |
# Display assistant response in chat message container
|
144 |
assistant = ask_assistant_stream(model_links[selected_model], st.session_state.messages, temp_values, max_token_value)
|
145 |
-
assistant
|
146 |
if "stream" in assistant:
|
147 |
with st.chat_message("assistant"):
|
148 |
response = st.write_stream(assistant["stream"])
|
|
|
43 |
response["stream"] = stream
|
44 |
|
45 |
except Exception as e:
|
46 |
+
st.write("exception")
|
47 |
pass
|
48 |
|
49 |
return response
|
|
|
143 |
|
144 |
# Display assistant response in chat message container
|
145 |
assistant = ask_assistant_stream(model_links[selected_model], st.session_state.messages, temp_values, max_token_value)
|
|
|
146 |
if "stream" in assistant:
|
147 |
with st.chat_message("assistant"):
|
148 |
response = st.write_stream(assistant["stream"])
|