victor7246 commited on
Commit
9f7df35
·
verified ·
1 Parent(s): 5cdd685

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +5 -2
utils.py CHANGED
@@ -131,8 +131,11 @@ def extract_question_list(llm, query):
131
 
132
  output = llm.invoke(message_log)
133
  pred = output.content
134
-
135
- return pred
 
 
 
136
 
137
 
138
  warnings.filterwarnings('ignore', message="pandas only supports SQLAlchemy connectable.*", category=UserWarning, module='chain')
 
131
 
132
  output = llm.invoke(message_log)
133
  pred = output.content
134
+
135
+ try:
136
+ return literal_eval(pred)
137
+ except:
138
+ return query
139
 
140
 
141
  warnings.filterwarnings('ignore', message="pandas only supports SQLAlchemy connectable.*", category=UserWarning, module='chain')