Skip to content

Commit

Permalink
Fixed vision function_calling error for Python package
Browse files Browse the repository at this point in the history
Former-commit-id: a60f7de
Former-commit-id: 52971352e3d55e3108703b14114f3c1c7138bd34
Former-commit-id: 7c0390693517944e9f91d120950ef0f0f24b2751 [formerly 06c3c774930dfc0d6d7b27342073c5530571f02c]
Former-commit-id: 6b7398639353a3b7f320c0e9f9b08f619d5dfcd8
  • Loading branch information
KillianLucas committed Nov 16, 2023
1 parent a1c3d7b commit 7ea3874
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 7ea3874

Please sign in to comment.