Files
gpt-researcher/examples/sample_report.py

27 lines
630 B
Python

from gpt_researcher import GPTResearcher
import asyncio
async def main():
"""
This is a sample script that shows how to run a research report.
"""
# Query
query = "What happened in the latest burning man floods?"
# Report Type
report_type = "research_report"
# Initialize the researcher
researcher = GPTResearcher(query=query, report_type=report_type, config_path=None)
# Conduct research on the given query
researcher.conduct_research()
# Write the report
report = await researcher.write_report()
return report
if __name__ == "__main__":
asyncio.run(main())