refactor: example usage in deep_research_swarm.py

pull/873/head
harshalmore31 3 weeks ago
parent bf26ade931
commit 7a40494101

@ -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()

Loading…
Cancel
Save