davidtran999 commited on
Commit
ce03165
·
verified ·
1 Parent(s): 740f2ef

Upload hue_portal/chatbot/chatbot.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. hue_portal/chatbot/chatbot.py +2 -0
hue_portal/chatbot/chatbot.py CHANGED
@@ -182,6 +182,7 @@ class Chatbot(CoreChatbot):
182
  selected_doc_code = None
183
  selected_topic = None
184
  wizard_stage = None
 
185
  if session_id:
186
  try:
187
  ConversationContext.update_session_metadata(
@@ -193,6 +194,7 @@ class Chatbot(CoreChatbot):
193
  "wizard_depth": 0,
194
  }
195
  )
 
196
  except Exception as e:
197
  print(f"⚠️ Failed to reset wizard state: {e}")
198
 
 
182
  selected_doc_code = None
183
  selected_topic = None
184
  wizard_stage = None
185
+ # Update session metadata FIRST before continuing
186
  if session_id:
187
  try:
188
  ConversationContext.update_session_metadata(
 
194
  "wizard_depth": 0,
195
  }
196
  )
197
+ print("[WIZARD] ✅ Wizard state reset in session metadata")
198
  except Exception as e:
199
  print(f"⚠️ Failed to reset wizard state: {e}")
200