Spaces:
Configuration error
Configuration error
Update agent.py
Browse files
agent.py
CHANGED
@@ -518,8 +518,6 @@ def search_and_extract_content_from_url(query: str) -> List[Document]:
|
|
518 |
doc.metadata["source"] = url
|
519 |
doc.metadata["type"] = "web_text"
|
520 |
|
521 |
-
print(documents)
|
522 |
-
|
523 |
return documents
|
524 |
except Exception as e:
|
525 |
# Handle any exceptions that occur during content extraction
|
@@ -880,11 +878,11 @@ If you are asked for a comma separated list, apply the above rules depending of
|
|
880 |
print("\n=== END REASONING ===")
|
881 |
|
882 |
# Extract the final formatted answer
|
883 |
-
final_answer = final_answer_tool(str(final_response), question)
|
884 |
-
print(f"Final GAIA formatted answer: {final_answer}")
|
885 |
-
print(f"Knowledge base now contains {len(self.dynamic_qe_manager.documents)} documents")
|
886 |
|
887 |
-
return
|
888 |
except Exception as e:
|
889 |
error_msg = f"Error processing question: {str(e)}"
|
890 |
print(error_msg)
|
|
|
518 |
doc.metadata["source"] = url
|
519 |
doc.metadata["type"] = "web_text"
|
520 |
|
|
|
|
|
521 |
return documents
|
522 |
except Exception as e:
|
523 |
# Handle any exceptions that occur during content extraction
|
|
|
878 |
print("\n=== END REASONING ===")
|
879 |
|
880 |
# Extract the final formatted answer
|
881 |
+
#final_answer = final_answer_tool(str(final_response), question)
|
882 |
+
#print(f"Final GAIA formatted answer: {final_answer}")
|
883 |
+
#print(f"Knowledge base now contains {len(self.dynamic_qe_manager.documents)} documents")
|
884 |
|
885 |
+
return final_response
|
886 |
except Exception as e:
|
887 |
error_msg = f"Error processing question: {str(e)}"
|
888 |
print(error_msg)
|