Spaces:
Paused
Paused
Update app_web.py
Browse files- app_web.py +3 -3
app_web.py
CHANGED
|
@@ -244,7 +244,7 @@ def render_chat():
|
|
| 244 |
Please let me know if there's anything else I can assist you with today.")
|
| 245 |
return
|
| 246 |
|
| 247 |
-
print("stata: ",qcat_result.get("sub-action"))
|
| 248 |
if qcat_result.get("category") == "stata" and (qcat_result.get("sub-action")=="unresolved" or st.session_state.stata_options is None):
|
| 249 |
# Ask clarification — store original query and question for context
|
| 250 |
st.session_state.unresolved_category = original_query_cat
|
|
@@ -281,14 +281,14 @@ def render_chat():
|
|
| 281 |
st.session_state.unresolved_category_question = f"Please let me know what you need help with: {' or '.join(options.keys())}. List all options that apply."
|
| 282 |
st.session_state.resolution_rounds += 1
|
| 283 |
resolution_msg = f"**Before I search, could you clarify?** Please let me know what you need help with: {' or '.join(options.keys())}. List all options that apply."
|
| 284 |
-
st.session_state.messages.append({"role": "
|
| 285 |
|
| 286 |
with st.chat_message("assistant"):
|
| 287 |
st.markdown(resolution_msg)
|
| 288 |
return
|
| 289 |
|
| 290 |
selection = qcat_result.get("sub-action", "unresolved")
|
| 291 |
-
print("selection: ", selection)
|
| 292 |
if selection != "unresolved" or isinstance(selection, list):
|
| 293 |
qu_enabled = False
|
| 294 |
selected_options = [st.session_state.stata_options.get(s) for s in selection]
|
|
|
|
| 244 |
Please let me know if there's anything else I can assist you with today.")
|
| 245 |
return
|
| 246 |
|
| 247 |
+
# print("stata: ",qcat_result.get("sub-action"))
|
| 248 |
if qcat_result.get("category") == "stata" and (qcat_result.get("sub-action")=="unresolved" or st.session_state.stata_options is None):
|
| 249 |
# Ask clarification — store original query and question for context
|
| 250 |
st.session_state.unresolved_category = original_query_cat
|
|
|
|
| 281 |
st.session_state.unresolved_category_question = f"Please let me know what you need help with: {' or '.join(options.keys())}. List all options that apply."
|
| 282 |
st.session_state.resolution_rounds += 1
|
| 283 |
resolution_msg = f"**Before I search, could you clarify?** Please let me know what you need help with: {' or '.join(options.keys())}. List all options that apply."
|
| 284 |
+
st.session_state.messages.append({"role": "assistant", "content": resolution_msg})
|
| 285 |
|
| 286 |
with st.chat_message("assistant"):
|
| 287 |
st.markdown(resolution_msg)
|
| 288 |
return
|
| 289 |
|
| 290 |
selection = qcat_result.get("sub-action", "unresolved")
|
| 291 |
+
# print("selection: ", selection)
|
| 292 |
if selection != "unresolved" or isinstance(selection, list):
|
| 293 |
qu_enabled = False
|
| 294 |
selected_options = [st.session_state.stata_options.get(s) for s in selection]
|