srilakshu012456 commited on
Commit
fea8e5d
·
verified ·
1 Parent(s): dd6af25

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -0
main.py CHANGED
@@ -1091,6 +1091,8 @@ async def chat_with_ai(input_data: ChatInput):
1091
  best_distance = min([d for d in distances if d is not None], default=None) if distances else None
1092
  best_combined = max([c for c in combined if c is not None], default=None) if combined else None
1093
  detected_intent = kb_results.get("user_intent", "neutral")
 
 
1094
  best_doc = kb_results.get("best_doc")
1095
  top_meta = (metadatas or [{}])[0] if metadatas else {}
1096
  msg_low = (input_data.user_message or "").lower()
 
1091
  best_distance = min([d for d in distances if d is not None], default=None) if distances else None
1092
  best_combined = max([c for c in combined if c is not None], default=None) if combined else None
1093
  detected_intent = kb_results.get("user_intent", "neutral")
1094
+ if _detect_next_intent(input_data.user_message):
1095
+ detected_intent = "steps"
1096
  best_doc = kb_results.get("best_doc")
1097
  top_meta = (metadatas or [{}])[0] if metadatas else {}
1098
  msg_low = (input_data.user_message or "").lower()