MrSimple01 commited on
Commit
2f54f79
·
verified ·
1 Parent(s): a80db22

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +3 -2
utils.py CHANGED
@@ -201,9 +201,10 @@ def answer_question(question, query_engine, reranker, current_model, chunks_df=N
201
 
202
  normalized_question = normalize_text(question)
203
  log_message(f"Normalized question: {normalized_question}")
204
- normalized_question_2, query_changes = normalize_steel_designations(question)
205
  log_message(f"After steel normalization: {normalized_question_2}")
206
-
 
207
  if query_engine is None:
208
  return "<div style='background-color: #e53e3e; color: white; padding: 20px; border-radius: 10px;'>Система не инициализирована</div>", "", ""
209
 
 
201
 
202
  normalized_question = normalize_text(question)
203
  log_message(f"Normalized question: {normalized_question}")
204
+ normalized_question_2, query_changes, change_list = normalize_steel_designations(question) # FIX: 3 values
205
  log_message(f"After steel normalization: {normalized_question_2}")
206
+ if change_list:
207
+ log_message(f"Query changes: {', '.join(change_list)}")
208
  if query_engine is None:
209
  return "<div style='background-color: #e53e3e; color: white; padding: 20px; border-radius: 10px;'>Система не инициализирована</div>", "", ""
210