open-interpreter
open-interpreter copied to clipboard
Support OpenAI's new models.
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):
- [x] I have included relevant documentation updates (stored in /docs)
- [x] I have read
docs/CONTRIBUTING.md - [x] I have read
docs/ROADMAP.md
OS Tests (optional but appreciated):
- [x] Tested on Windows
- [x] Tested on MacOS
- [x] Tested on Linux
Here's the reference Models - OpenAI API.
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.
My bad, haven't seen there's already one https://github.com/KillianLucas/open-interpreter/pull/1069
There is probably a better way to do this. I'll take a look later today.
Just a note, for the vision models, function calling has to be False or they break.
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?
Strongly recommend to try gpt-4-turbo-preview model, it's cheaper and faster.
Strongly recommend to try
gpt-4-turbo-previewmodel, 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.
@KillianLucas If you are going to merge this, just squeeze my commits. Nobody wants 3 lines changed in 4 commits. >_<
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.