GithubHelp home page GithubHelp logo

Comments (5)

sander110419 avatar sander110419 commented on August 17, 2024

I've made a PR to enable the selection of the model.
We aware that GPT3.5 provides way worse code, you're better off using the Azure endpoint and using the gpt4-32k model.

from gpt-pilot.

CyKiller avatar CyKiller commented on August 17, 2024

Not sure how to fully map out handling prioritized model switching for gpt-pilot, but introducing a rate-limiting mechanism in llm_connection.py to manage API requests to both GPT-4 and GPT-3.5 models can be done. We can try implementing counters for Tokens Per Minute (TPM) and Requests Per Minute (RPM) / then add logic to switch between the two models. These counters would enable dynamic model switching, allowing the system to choose the most appropriate model based on current usage and rate limits. Additionally, we can incorporate an exponential mechanism strategy to handle "429: Too Many Requests" errors. This involves a while-loop that retries the API request, doubling the wait time with each subsequent retry, up to a maximum number of retries. The contributor's input is better on how to target this, it's good for emulating instant gratification but in no form is it a true model switching formula that could be a nice fit for gpt-pilot.

from gpt-pilot.

coolxeo avatar coolxeo commented on August 17, 2024

Just created a PR that could solve it in a simple way
#39

I recommend to use gpt-3.5-turbo-16k-0613 model as has high capacity

from gpt-pilot.

coolxeo avatar coolxeo commented on August 17, 2024

If you are having problems with rate limited you could try to downgrade to GPT-3 that doesn't have so many restrictions

To make the change, just setup your environment variable in your .env file to whatever model you want to use
OPENAI_MODEL=gpt-3.5-turbo-16k-0613

Reference of GPT-3 models
https://platform.openai.com/docs/models/gpt-3-5

Thanks @zvone187 for merging my PR 🤗

from gpt-pilot.

zvone187 avatar zvone187 commented on August 17, 2024

Happy to do so - thank you for the PR 🙏

from gpt-pilot.

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.