Update agent.py
Browse files
agent.py
CHANGED
@@ -346,6 +346,7 @@ def search_and_extract_content_from_url(query: str) -> List[Document]:
|
|
346 |
return [Document(text="No URL could be extracted from the search results.")]
|
347 |
|
348 |
url = url_match.group(0)[:-2]
|
|
|
349 |
documents = []
|
350 |
|
351 |
try:
|
@@ -359,6 +360,7 @@ def search_and_extract_content_from_url(query: str) -> List[Document]:
|
|
359 |
for doc in documents:
|
360 |
doc.metadata["source"] = url
|
361 |
doc.metadata["type"] = "web_text"
|
|
|
362 |
return documents
|
363 |
except Exception as e:
|
364 |
# Handle any exceptions that occur during content extraction
|
|
|
346 |
return [Document(text="No URL could be extracted from the search results.")]
|
347 |
|
348 |
url = url_match.group(0)[:-2]
|
349 |
+
print(url)
|
350 |
documents = []
|
351 |
|
352 |
try:
|
|
|
360 |
for doc in documents:
|
361 |
doc.metadata["source"] = url
|
362 |
doc.metadata["type"] = "web_text"
|
363 |
+
print(documents)
|
364 |
return documents
|
365 |
except Exception as e:
|
366 |
# Handle any exceptions that occur during content extraction
|