Phoenix21 commited on
Commit
2acee8d
·
verified ·
1 Parent(s): e27c8c7

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +4 -0
pipeline.py CHANGED
@@ -179,6 +179,10 @@ def do_web_search(query: str) -> str:
179
  def run_with_chain(query: str) -> str:
180
  print("DEBUG: Starting run_with_chain...")
181
 
 
 
 
 
182
  # 1) Moderate the query for harmful content
183
  moderated_query = moderate_text(query)
184
  if moderated_query == "OutOfScope":
 
179
  def run_with_chain(query: str) -> str:
180
  print("DEBUG: Starting run_with_chain...")
181
 
182
+
183
+ # Ensure the query is a string
184
+ query = str(query).strip()
185
+
186
  # 1) Moderate the query for harmful content
187
  moderated_query = moderate_text(query)
188
  if moderated_query == "OutOfScope":