Skip to content

Conversation

Steve235lab
Copy link
Contributor

@Steve235lab Steve235lab commented Mar 19, 2024

Describe the changes you have made:

Add default context window and max tokens configs for OpenAI's new models: gpt-4-turbo-preview, gpt-4-0125-preview, and gpt-4-1106-vision-preview.

Reference any relevant issues (e.g. "Fixes #000"):

If we can keep these configs updated with as more models as possible, maybe can avoid issues like #915

Pre-Submission Checklist (optional but appreciated):

  • I have included relevant documentation updates (stored in /docs)
  • I have read docs/CONTRIBUTING.md
  • I have read docs/ROADMAP.md

OS Tests (optional but appreciated):

  • Tested on Windows
  • Tested on MacOS
  • Tested on Linux

@Steve235lab
Copy link
Contributor Author

Here's the reference Models - OpenAI API.

@Steve235lab
Copy link
Contributor Author

I don't use other LLMs much, so my commit only focus on OpenAI GPTs. If anyone familiar with other models and their proper context window and max tokens configs, please add configs like this commit to make OI support more models by default.

@Steve235lab
Copy link
Contributor Author

My bad, haven't seen there's already one #1069

@Notnaton
Copy link
Collaborator

There is probably a better way to do this. I'll take a look later today.

@CyanideByte
Copy link
Contributor

Just a note, for the vision models, function calling has to be False or they break.

@Steve235lab
Copy link
Contributor Author

There is probably a better way to do this. I'll take a look later today.

Maybe we can simply use str.startwith to match the prefix of models like gpt-4 and openai/gpt-4?

@Steve235lab
Copy link
Contributor Author

Strongly recommend to try gpt-4-turbo-preview model, it's cheaper and faster.

@CyanideByte
Copy link
Contributor

CyanideByte commented Mar 21, 2024

Strongly recommend to try gpt-4-turbo-preview model, it's cheaper and faster.

Exactly this. In OpenAI's January blog post, they stated that 70% of their customers had transitioned to gpt-4-turbo from gpt-4.
Its probably higher by now, gpt-4 is a 9 month old legacy model at this point. Its not going to be updated again.

@Steve235lab
Copy link
Contributor Author

@KillianLucas If you are going to merge this, just squeeze my commits. Nobody wants 3 lines changed in 4 commits. >_<

@KillianLucas KillianLucas merged commit 3e95571 into openinterpreter:main Mar 24, 2024
@KillianLucas
Copy link
Collaborator

Nice @Steve235lab, makes the most of these models without needing to set specific settings.

Will do another test run soon (and set up some more robust testing) — last time I tested with the demos from the launch video, gpt-4 was unfortunately much more intelligent/robust than gpt-4-turbo. If that's changed, we should immediately switch.

Merged! Unfortunately I'm not very good at git, not sure how to squeeze commits, but let me know if it's important to do and I'll figure it out! Thank you so much for this PR.

@KillianLucas KillianLucas mentioned this pull request Mar 28, 2024
6 tasks
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

Successfully merging this pull request may close these issues.

4 participants