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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request Thread #1

Open
zachary62 opened this issue Dec 2, 2023 · 1 comment
Open

Feature Request Thread #1

zachary62 opened this issue Dec 2, 2023 · 1 comment

Comments

@zachary62
Copy link
Contributor

馃槉 Please submit and upvote features you want

zachary62 pushed a commit that referenced this issue Apr 17, 2024
fixes some imports in  __init__
@brsolo
Copy link
Contributor

brsolo commented Apr 18, 2024

Would be nice to have easier support for all OpenAI models (or mainly the latest gpt-4-turbo and gpt-3.5-turbo). Right now to use a different OpenAI model, I manually change the model parameter in init (below). I had tried to just make another elif statement, but openai.api_type is used in util.py within the openai library, so this raises an error.

One quick fix is to add the elif statement below, but it seems like bad form redefining an environ variable.

Maybe a better solution is to have two separate environ variables. One for openai.api_type and one for model.

Current code:

    elif openai.api_type == 'open_ai':
        
        response = openai.ChatCompletion.create(
            model="gpt-4-1106-preview",
            temperature=temperature,
            top_p=top_p,
            messages=messages
        )

Potential quick fix:

  elif openai.api_type == 'gpt-3.5-turbo-0125':

       os.environ['OPENAI_API_TYPE'] = 'open_ai'
       
       response = openai.ChatCompletion.create(
           model="gpt-4-1106-preview",
           temperature=temperature,
           top_p=top_p,
           messages=messages
       )

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