Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -139,7 +139,7 @@ def run_with_timeout(func, args, timeout):
|
|
139 |
# In your Streamlit app
|
140 |
def generate_response(chain, query, context):
|
141 |
timeout_seconds = 180
|
142 |
-
result =
|
143 |
if result is None:
|
144 |
return result
|
145 |
# return "I apologize, but I couldn't generate a response in time. The query might be too complex for me to process quickly. Could you try simplifying your question?"
|
|
|
139 |
# In your Streamlit app
|
140 |
def generate_response(chain, query, context):
|
141 |
timeout_seconds = 180
|
142 |
+
result = chain.invoke, ({"question": query, "chat_history": st.session_state.messages},)
|
143 |
if result is None:
|
144 |
return result
|
145 |
# return "I apologize, but I couldn't generate a response in time. The query might be too complex for me to process quickly. Could you try simplifying your question?"
|