Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPTResearcher constructor, can't use "local" or "hybrid" report_source #1068

Closed
alesaccoia opened this issue Jan 7, 2025 · 2 comments
Closed

Comments

@alesaccoia
Copy link
Contributor

Describe the bug
Both using the websocket and the code as a library, passing "local" as report source is ignored

self.report_source = getattr(

To Reproduce
Instantiage GPTResearcher with report_source different from default or "web"

Expected behavior
It should use local files

Desktop

  • OS: Linux

Line

    self.report_source = getattr( self.cfg, 'report_source', None) or report_source

should be

self.report_source = report_source if report_source else getattr(self.cfg, 'report_source', 'web')

otherwise it will always use the default "web" even if one passes "local" or hybrid. This basically prevents any local or hybrid search no?

@alesaccoia alesaccoia changed the title The use of "local" or "hybrid" search isn't allowed by a bug in the GPTResearcher constructor GPTResearcher constructor, can't use "local" or "hybrid" report_source Jan 7, 2025
@lmontin
Copy link

lmontin commented Jan 8, 2025

i think this is the same as #1004

@alesaccoia
Copy link
Contributor Author

yep, can close this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants