assafelovic / gpt-researcher

LLM based autonomous agent that does online comprehensive research on any given topic
https://gptr.dev
Apache License 2.0
14k stars 1.81k forks source link

gpt-researcher as python module - messy file structure when installed in environment? #766

Open danieldekay opened 4 weeks ago

danieldekay commented 4 weeks ago

I installed the package into my environment:

(gpt-researcher-3.12.4) ➜  gpt-researcher-3.12.4 pip show gpt-researcher
Name: gpt-researcher
Version: 0.8.7
Summary: GPT Researcher is an autonomous agent designed for comprehensive online research on a variety of tasks.
Home-page: https://github.com/assafelovic/gpt-researcher
Author: Assaf Elovic
Author-email: assaf.elovic@gmail.com
License: MIT
Location: /home/username/Envs/gpt-researcher-3.12.4/lib/python3.12/site-packages
Requires: aiofiles, arxiv, beautifulsoup4, colorama, htmldocx, json-repair, langchain, langchain-community, langchain-openai, lxml-html-clean, markdown, md2pdf, mistune, pydantic, PyMuPDF, python-docx, python-dotenv, python-multipart, pyyaml, requests, tiktoken, unstructured, websockets
Required-by:

on inspection, something seems off: (gpt-researcher-3.12.4) ➜ gpt_researcher-0.8.7.dist-info cat RECORD

yields lines like:

backend/websocket_manager.py,sha256=so4A_3bgQz_W6QfPxVO2xeXoyuyT6JTHW6izAdFbJfg,3790
gpt_researcher-0.8.7.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
gpt_researcher/config/__init__.py,sha256=2HBJ7lmGyZg8yjXwlK9TS1s5g_vSFtxpPNbXm9yRqmY,48
multi_agents/agents/__pycache__/publisher.cpython-312.pyc,,

To me that looks like package files are installed in site-packages instead of the site-packages\gpt-researcher subdirectory.

0x11c11e commented 3 weeks ago

The paths shown are correct for the RECORD file, which lists all the files installed by the package. The fact that the files are not fully qualified paths is normal; Python uses these relative paths within the package directory.

danieldekay commented 3 weeks ago

in my env these files are actually installed on the library root level, e.g. backend is next to gpt-researcher and not inside it.