Spaces:
Running
Running
Update some of the error messages
Browse files
app.py
CHANGED
@@ -167,7 +167,10 @@ def set_up_chat_ui():
|
|
167 |
)
|
168 |
return
|
169 |
|
170 |
-
logger.info(
|
|
|
|
|
|
|
171 |
st.chat_message('user').write(prompt)
|
172 |
|
173 |
user_messages = _get_user_messages()
|
@@ -213,6 +216,7 @@ def set_up_chat_ui():
|
|
213 |
msg = (
|
214 |
'A connection error occurred while streaming content from the LLM endpoint.'
|
215 |
' Unfortunately, the slide deck cannot be generated. Please try again later.'
|
|
|
216 |
)
|
217 |
logger.error(msg)
|
218 |
st.error(msg)
|
@@ -229,6 +233,7 @@ def set_up_chat_ui():
|
|
229 |
msg = (
|
230 |
f'An unexpected error occurred while generating the content: {ex}'
|
231 |
'\nPlease try again later, possibly with different inputs.'
|
|
|
232 |
)
|
233 |
logger.error(msg)
|
234 |
st.error(msg)
|
|
|
167 |
)
|
168 |
return
|
169 |
|
170 |
+
logger.info(
|
171 |
+
'User input: %s | #characters: %d | LLM: %s',
|
172 |
+
prompt, len(prompt), llm_to_use
|
173 |
+
)
|
174 |
st.chat_message('user').write(prompt)
|
175 |
|
176 |
user_messages = _get_user_messages()
|
|
|
216 |
msg = (
|
217 |
'A connection error occurred while streaming content from the LLM endpoint.'
|
218 |
' Unfortunately, the slide deck cannot be generated. Please try again later.'
|
219 |
+
' Alternatively, try selecting a different LLM from the dropdown list.'
|
220 |
)
|
221 |
logger.error(msg)
|
222 |
st.error(msg)
|
|
|
233 |
msg = (
|
234 |
f'An unexpected error occurred while generating the content: {ex}'
|
235 |
'\nPlease try again later, possibly with different inputs.'
|
236 |
+
' Alternatively, try selecting a different LLM from the dropdown list.'
|
237 |
)
|
238 |
logger.error(msg)
|
239 |
st.error(msg)
|