|
|
@ -609,20 +609,19 @@ class DeepResearchSwarm:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Example usage
|
|
|
|
# Example usage
|
|
|
|
|
|
|
|
# if __name__ == "__main__":
|
|
|
|
if __name__ == "__main__":
|
|
|
|
# try:
|
|
|
|
try:
|
|
|
|
# swarm = DeepResearchSwarm(
|
|
|
|
swarm = DeepResearchSwarm(
|
|
|
|
# output_type="json",
|
|
|
|
output_type="json",
|
|
|
|
# )
|
|
|
|
)
|
|
|
|
# result = swarm.step(
|
|
|
|
result = swarm.step(
|
|
|
|
# "What is the active tariff situation with mexico? Only create 2 queries"
|
|
|
|
"What is the active tariff situation with mexico? Only create 2 queries"
|
|
|
|
# )
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Parse and display results in rich format with markdown export
|
|
|
|
# # Parse and display results in rich format with markdown export
|
|
|
|
swarm.parse_and_display_results(result, export_markdown=True)
|
|
|
|
# swarm.parse_and_display_results(result, export_markdown=True)
|
|
|
|
|
|
|
|
|
|
|
|
except Exception as e:
|
|
|
|
# except Exception as e:
|
|
|
|
print(f"Error running deep research swarm: {str(e)}")
|
|
|
|
# print(f"Error running deep research swarm: {str(e)}")
|
|
|
|
import traceback
|
|
|
|
# import traceback
|
|
|
|
traceback.print_exc()
|
|
|
|
# traceback.print_exc()
|
|
|
|