Skip to content

Commit

Permalink
Fixed vision function_calling error for Python package
Browse files Browse the repository at this point in the history
  • Loading branch information
KillianLucas committed Nov 16, 2023
1 parent 6a0bd0e commit f7a5b83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion interpreter/llm/setup_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from .setup_openai_coding_llm import setup_openai_coding_llm
from .setup_text_llm import setup_text_llm


def setup_llm(interpreter):
"""
Takes an Interpreter (which includes a ton of LLM settings),
Expand All @@ -15,7 +16,8 @@ def setup_llm(interpreter):
# Detect whether or not it's a function calling LLM
if interpreter.function_calling_llm == None:
if not interpreter.local and (
interpreter.model in litellm.open_ai_chat_completion_models
interpreter.model != "gpt-4-vision-preview"
and interpreter.model in litellm.open_ai_chat_completion_models
or interpreter.model.startswith("azure/")
):
interpreter.function_calling_llm = True
Expand Down

0 comments on commit f7a5b83

Please sign in to comment.