Skip to content

Commit

Permalink
Merge pull request #1099 from glass-city/main
Browse files Browse the repository at this point in the history
Support OpenAI's new models.
  • Loading branch information
KillianLucas committed Mar 24, 2024
2 parents dc29184 + 5578961 commit 3e95571
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions interpreter/terminal_interface/start_terminal_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,15 +357,15 @@ def start_terminal_interface(interpreter):

### Set some helpful settings we know are likely to be true

if interpreter.llm.model == "gpt-4-1106-preview":
if interpreter.llm.model.startswith("gpt-4") or interpreter.llm.model.startswith("openai/gpt-4"):
if interpreter.llm.context_window is None:
interpreter.llm.context_window = 128000
if interpreter.llm.max_tokens is None:
interpreter.llm.max_tokens = 4096
if interpreter.llm.supports_functions is None:
interpreter.llm.supports_functions = True
interpreter.llm.supports_functions = False if "vision" in interpreter.llm.model else True

if interpreter.llm.model == "gpt-3.5-turbo-1106":
if interpreter.llm.model.startswith("gpt-3.5-turbo") or interpreter.llm.model.startswith("openai/gpt-3.5-turbo"):
if interpreter.llm.context_window is None:
interpreter.llm.context_window = 16000
if interpreter.llm.max_tokens is None:
Expand Down

0 comments on commit 3e95571

Please sign in to comment.