Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -459,7 +459,6 @@ def parse_followup_response(input_text):
|
|
| 459 |
|
| 460 |
return combined_response.strip(), parsed_interacts
|
| 461 |
|
| 462 |
-
|
| 463 |
import re
|
| 464 |
|
| 465 |
def parse_followup_and_tools(input_text):
|
|
@@ -471,6 +470,9 @@ def parse_followup_and_tools(input_text):
|
|
| 471 |
response_parts = response_pattern.findall(cleaned_text)
|
| 472 |
combined_response = ' '.join(response_parts).strip()
|
| 473 |
|
|
|
|
|
|
|
|
|
|
| 474 |
parsed_interacts = []
|
| 475 |
parsed_tools = []
|
| 476 |
|
|
|
|
| 459 |
|
| 460 |
return combined_response.strip(), parsed_interacts
|
| 461 |
|
|
|
|
| 462 |
import re
|
| 463 |
|
| 464 |
def parse_followup_and_tools(input_text):
|
|
|
|
| 470 |
response_parts = response_pattern.findall(cleaned_text)
|
| 471 |
combined_response = ' '.join(response_parts).strip()
|
| 472 |
|
| 473 |
+
# Remove tool and interact content from combined_response
|
| 474 |
+
combined_response = re.sub(r'<(tool|interact)>.*?</\1>', '', combined_response, flags=re.DOTALL).strip()
|
| 475 |
+
|
| 476 |
parsed_interacts = []
|
| 477 |
parsed_tools = []
|
| 478 |
|