Coder Social home page Coder Social logo

Comments (2)

martiansideofthemoon avatar martiansideofthemoon commented on June 18, 2024 1

Not in the library currently, we are tracking it in #38

from factscore.

GeroVanMi avatar GeroVanMi commented on June 18, 2024

@shrusti-ghela A quick workaround would be to replace the davinci model with OpenAI's suggested gpt-3.5-turbo-instruct. (See OpenAI Deprecations)

# Look for this code snippet
def call_ChatGPT(message, model_name="text-davinci-003", max_len=1024, temp=0.7, verbose=False):
    # call GPT-3 API until result is provided and then return it
    response = None
    received = False
    num_rate_errors = 0
    while not received:
    # ...
 


# And replace it with this workaround:
def call_ChatGPT(message, model_name="gpt-3.5-turbo-instruct", max_len=1024, temp=0.7, verbose=False):
# ...

Assuming you're using a virutal environment you will find this piece of code in venv/lib/python3.9/site-packages/factscore/openai_lm.py. Note: Normally you shouldn't change the library code in your personal installation, because it will be overwritten when a new version is released, but just to get it working for the moment, this might be fine.

from factscore.

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.