Skip to content

๐Ÿ–ผ๏ธ Image support and mega refactor

Compare
Choose a tag to compare
@assafelovic assafelovic released this 20 Oct 11:00
· 196 commits to master since this release
27976a6

We've completely refactored almost the entire codebase (over 55 files), to improve overall modularity and simplification of structure to ensure less bugs, and more easy development. In addition, we've finally added image support (!!!). We've also improve the GPT Researcher PIP package which can now return source results, scraped images, research report sections and more! Lastly, thanks to the amazing community you can check out below much more improvements. Thank you to everyone!

Updated Demo with images

gptr-demo-final.mp4

New PIP functions

from gpt_researcher import GPTResearcher
import asyncio

async def get_report(query: str, report_type: str):
    researcher = GPTResearcher(query, report_type)
    research_result = await researcher.conduct_research()
    report = await researcher.write_report()
    
    # Get additional information
    research_context = researcher.get_research_context()
    research_costs = researcher.get_costs()
    research_images = researcher.get_research_images()
    research_sources = researcher.get_research_sources()
    
    return report, research_context, research_costs, research_images, research_sources

if __name__ == "__main__":
    query = "what team may win the NBA finals?"
    report_type = "research_report"

    report, context, costs, images, sources = asyncio.run(get_report(query, report_type))

What's Changed

New Contributors

Full Changelog: v.3.1.0...v3.1.1