Fixed re instead of requests in visit_webpage
Browse files
tools/.ipynb_checkpoints/visit_webpage-checkpoint.py
CHANGED
@@ -30,7 +30,7 @@ class VisitWebpageTool(Tool):
|
|
30 |
markdown_content = markdownify(response.text).strip()
|
31 |
|
32 |
# Remove multiple line breaks
|
33 |
-
markdown_content =
|
34 |
|
35 |
return truncate_content(markdown_content, 10000)
|
36 |
|
|
|
30 |
markdown_content = markdownify(response.text).strip()
|
31 |
|
32 |
# Remove multiple line breaks
|
33 |
+
markdown_content = requests.sub(r"\n{3,}", "\n\n", markdown_content)
|
34 |
|
35 |
return truncate_content(markdown_content, 10000)
|
36 |
|
tools/visit_webpage.py
CHANGED
@@ -30,7 +30,7 @@ class VisitWebpageTool(Tool):
|
|
30 |
markdown_content = markdownify(response.text).strip()
|
31 |
|
32 |
# Remove multiple line breaks
|
33 |
-
markdown_content =
|
34 |
|
35 |
return truncate_content(markdown_content, 10000)
|
36 |
|
|
|
30 |
markdown_content = markdownify(response.text).strip()
|
31 |
|
32 |
# Remove multiple line breaks
|
33 |
+
markdown_content = requests.sub(r"\n{3,}", "\n\n", markdown_content)
|
34 |
|
35 |
return truncate_content(markdown_content, 10000)
|
36 |
|