Spaces:
Sleeping
Sleeping
remove excess "
Browse files
main.py
CHANGED
|
@@ -469,12 +469,12 @@ def parse_followup_response(input_text):
|
|
| 469 |
# Extract the question using regex (up to the "options:" part)
|
| 470 |
question_match = re.search(r'^(.*?)\s*options:', block, re.DOTALL)
|
| 471 |
if question_match:
|
| 472 |
-
question = question_match.group(1).strip()
|
| 473 |
|
| 474 |
# Extract the options using regex
|
| 475 |
options_match = re.search(r'options:\s*(.*?)$', block, re.DOTALL)
|
| 476 |
if options_match:
|
| 477 |
-
options = [option.strip() for option in options_match.group(1).split('-') if option.strip()]
|
| 478 |
|
| 479 |
# Add the parsed question and options to the list
|
| 480 |
parsed_interacts.append({'question': question, 'options': options})
|
|
|
|
| 469 |
# Extract the question using regex (up to the "options:" part)
|
| 470 |
question_match = re.search(r'^(.*?)\s*options:', block, re.DOTALL)
|
| 471 |
if question_match:
|
| 472 |
+
question = question_match.group(1).strip().strip('"')
|
| 473 |
|
| 474 |
# Extract the options using regex
|
| 475 |
options_match = re.search(r'options:\s*(.*?)$', block, re.DOTALL)
|
| 476 |
if options_match:
|
| 477 |
+
options = [option.strip().strip('"') for option in options_match.group(1).split('-') if option.strip()]
|
| 478 |
|
| 479 |
# Add the parsed question and options to the list
|
| 480 |
parsed_interacts.append({'question': question, 'options': options})
|