v3.1.1
assafelovic/gpt-researcherv3.1.1Oct 20, 2024by assafelovic
AI Summary
A massive refactor of the codebase (55+ files) to improve modularity, and the highly anticipated first release of image support with new API methods.
Key Highlights
- Major codebase refactor for modularity
- First image support added
- New PIP functions to retrieve images and sources
New Features
- Image support (scraped images in reports)
- New API methods: get_research_images, get_research_sources
- Improved search queries using prior web search
Full Release Notes
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
https://github.com/user-attachments/assets/b4e6343d-d44d-4c10-b13a-2faa7f16b7b7
## New PIP functions
```python
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
* Hotfix: Update base.py by @kesamet in https://github.com/assafelovic/gpt-researcher/pull/902
* Update docstring to reflect default values for `temperature` and `max_tokens` in `create_chat_completion` by @lundha in https://github.com/assafelovic/gpt-researcher/pull/899
* updated relative paths by @assafelovic in https://github.com/assafelovic/gpt-researcher/pull/906
* refactor(Dockerfile): optimize Dockerfile structure and layers by @k1lgor in https://github.com/assafelovic/gpt-researcher/pull/898
* Doc: Typo Fix by @Chhagan011 in https://github.com/assafelovic/gpt-researcher/pull/914
* ✅: Nextjs upgrades by @ElishaKay in https://github.com/assafelovic/gpt-researcher/pull/913
* Feature/improved search queries using prior web search by @assafelovic in https://github.com/assafelovic/gpt-researcher/pull/919
* [Docs] : Fix typos in docs by @FarukhS52 in https://github.com/assafelovic/gpt-researcher/pull/920
* fixed some typos in CONTRIBUTING.md by @Smoothengineer in https://github.com/assafelovic/gpt-researcher/pull/917
* fixed issue with defaulting to tavily by @assafelovic in https://github.com/assafelovic/gpt-researcher/pull/924
* Update README.md by @AranavMahalpure in https://github.com/assafelovic/gpt-researcher/pull/926
* Feature/image support by @assafelovic in https://github.com/assafelovic/gpt-researcher/pull/925
* Fixed vector-store.py by @DhanushNehru in https://github.com/assafelovic/gpt-researcher/pull/927
* Update vector-store.py by @DhanushNehru in https://github.com/assafelovic/gpt-researcher/pull/928
* ✅ showing images in report by @ElishaKay in https://github.com/assafelovic/gpt-researcher/pull/930
* update langchain huggingface embedding by @hereiamravi in https://github.com/assafelovic/gpt-researcher/pull/931
## New Contributors
* @lundha made their first contribution in https://github.com/assafelovic/gpt-researcher/pull/899
* @k1lgor made their first contribution in https://github.com/assafelovic/gpt-researcher/pull/898
* @Chhagan011 made their first contribution in https://github.com/assafelovic/gpt-researcher/pull/914
* @FarukhS52 made their first contribution in https://github.com/assafelovic/gpt-researcher/pull/920
* @Smoothengineer made their first contribution in https://github.com/assafelovic/gpt-researcher/pull/917
* @AranavMahalpure made their first contribution in https://github.com/assafelovic/gpt-researcher/pull/926
* @DhanushNehru made their first contribution in https://github.com/assafelovic/gpt-researcher/pull/927
* @hereiamravi made their first contribution in https://github.com/assafelovic/gpt-researcher/pull/931
**Full Changelog**: https://github.com/assafelovic/gpt-researcher/compare/v.3.1.0...v3.1.1