Skip to content

Commit

Permalink
Force server to use LiteLLM
Browse files Browse the repository at this point in the history
  • Loading branch information
KillianLucas committed Nov 12, 2024
1 parent 20bc10f commit 6a7ee0c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion interpreter_1/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ async def async_respond(self):

edit = ToolRenderer()

if self.provider == "anthropic":
if (
self.provider == "anthropic" and not self.serve
): # Server can't handle Anthropic yet
if self._client is None:
if self.api_key:
self._client = Anthropic(api_key=self.api_key)
Expand Down Expand Up @@ -466,6 +468,12 @@ async def async_respond(self):
},
}
)
if "editor" in self.tools:
# print("Editor is not supported for non-Anthropic models.")
pass
if "gui" in self.tools:
# print("GUI is not supported for non-Anthropic models.")
pass

if self.model.startswith("ollama/"):
# Fix ollama
Expand Down

0 comments on commit 6a7ee0c

Please sign in to comment.