Code Monkey home page Code Monkey logo

Comments (7)

jortegac avatar jortegac commented on July 26, 2024 1

The model is configured here

https://github.com/assafelovic/gpt-researcher/blob/master/config/config.py#L25

By accessing an enviroment variable
self.smart_llm_model = os.getenv("SMART_LLM_MODEL", "gpt-4")

If you are having issues with access to gpt-4, you can set an environment variable with a model name that you do have access to e.g. gpt-3.5-turbo

For example:
export SMART_LLM_MODEL="gpt-3.5-turbo"

from gpt-researcher.

madiha1ahmed avatar madiha1ahmed commented on July 26, 2024 1

Hi!

By making the following modifications, I was able to resolve the issue:

  1. In gpt-researcher/config/config.py, substitute in line 25 "gpt-4" with "gpt-3.5-turbo-16k"
  2. In gpt-researcher/config/config.py, substitute in line 27: 8000 with 4000

Screenshot (1008)

Upon executing this modified script, I encountered another error: "json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 58)". So, if you also get the same error, all you need to do is:

In gpt-researcher/agent/research_agent.py line 92, substitute "return json.loads(result)" with " return result". This avoids the double-parsing as result itself is a JSON Object.

Hope this helps!

from gpt-researcher.

thinkJD avatar thinkJD commented on July 26, 2024

I have the same problem.

from gpt-researcher.

wwzeng1 avatar wwzeng1 commented on July 26, 2024

Hi! I’m one of the founders of Sweep, a github app that solves issues(like small bugs) by writing pull requests.
This looks like a good issue for Sweep https://github.com/sweepai/sweep to try. It might need more details from the maintainers though.
We have onboarding instructions here, I’m also happy to help you onboard directly :)

from gpt-researcher.

bcgit2023 avatar bcgit2023 commented on July 26, 2024

I have the same error "openai.error.InvalidRequestError: The model: gpt-4 does not exist" just stopped.

from gpt-researcher.

bcgit2023 avatar bcgit2023 commented on July 26, 2024

@madiha1ahmed I did it your way and it worked. thanks!

from gpt-researcher.

OumYacout avatar OumYacout commented on July 26, 2024

It works for me now. Thanks

from gpt-researcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.