Asish Karthikeya Gogineni commited on
Commit
d79ce72
·
1 Parent(s): b4f4533

fix: Revert to blocking chat for stability

Browse files

- Disabled streaming UI to resolve specific environment issues
- Backend still uses enhanced RAG (Top-30 context + File Tree)
- Ensuring reliable answer delivery over latency

Files changed (1) hide show
  1. pages/2_💬_Chat.py +4 -2
pages/2_💬_Chat.py CHANGED
@@ -88,9 +88,10 @@ if prompt:
88
  with st.chat_message("assistant"):
89
  with st.spinner("Thinking..."):
90
  try:
 
91
  answer_payload = chat_engine.chat(prompt)
92
 
93
- # Handle response format (string or tuple with sources)
94
  if isinstance(answer_payload, tuple):
95
  response, sources = answer_payload
96
  else:
@@ -118,7 +119,7 @@ if prompt:
118
 
119
  st.markdown(response)
120
 
121
- # Save to history with sources
122
  st.session_state.messages.append({
123
  "role": "assistant",
124
  "content": response,
@@ -129,3 +130,4 @@ if prompt:
129
  error_msg = f"Error: {str(e)}"
130
  st.error(error_msg)
131
  st.session_state.messages.append({"role": "assistant", "content": error_msg})
 
 
88
  with st.chat_message("assistant"):
89
  with st.spinner("Thinking..."):
90
  try:
91
+ # Revert to blocking chat for stability
92
  answer_payload = chat_engine.chat(prompt)
93
 
94
+ # Handle response format
95
  if isinstance(answer_payload, tuple):
96
  response, sources = answer_payload
97
  else:
 
119
 
120
  st.markdown(response)
121
 
122
+ # Save to history
123
  st.session_state.messages.append({
124
  "role": "assistant",
125
  "content": response,
 
130
  error_msg = f"Error: {str(e)}"
131
  st.error(error_msg)
132
  st.session_state.messages.append({"role": "assistant", "content": error_msg})
133
+