From 7301cced51f4cef5a1f90d7a9ce22f87a8822597 Mon Sep 17 00:00:00 2001 From: Priyadarshi Roy Date: Thu, 4 Apr 2024 12:29:28 +0530 Subject: [PATCH] Fixed sample report generation code according to the latest version. --- examples/sample_report.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/sample_report.py b/examples/sample_report.py index 6330abe..1477297 100644 --- a/examples/sample_report.py +++ b/examples/sample_report.py @@ -12,9 +12,13 @@ async def main(): # Report Type report_type = "research_report" - # Run Research + # Initialize the researcher researcher = GPTResearcher(query=query, report_type=report_type, config_path=None) - report = await researcher.run() + # Conduct research on the given query + researcher.conduct_research() + # Write the report + report = await researcher.write_report() + return report