yrobel-lima commited on
Commit
cceb9b5
·
verified ·
1 Parent(s): 4b243fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -5,13 +5,16 @@ import openai
5
  from openai import OpenAI, OpenAIError
6
  import streamlit as st
7
  from langchain_core.messages import AIMessage, HumanMessage
8
- from utils.error_message_template import ERROR_MESSAGE
9
 
10
  try:
11
  from rag.runnable_and_memory import get_runnable_and_memory
12
  except OpenAIError:
13
  handle_errors()
14
  st.stop()
 
 
 
15
 
16
  logging.basicConfig(level=logging.ERROR)
17
 
 
5
  from openai import OpenAI, OpenAIError
6
  import streamlit as st
7
  from langchain_core.messages import AIMessage, HumanMessage
8
+ from utils.error_message_template import handle_errors
9
 
10
  try:
11
  from rag.runnable_and_memory import get_runnable_and_memory
12
  except OpenAIError:
13
  handle_errors()
14
  st.stop()
15
+ except Exception:
16
+ handle_errors()
17
+ st.stop()
18
 
19
  logging.basicConfig(level=logging.ERROR)
20