fix(utils.py): fix get_llm_provider to handle the ':' in anthropic/bedrock calls

This commit is contained in:
Krrish Dholakia 2023-12-07 14:19:11 -08:00
parent 2b04dc310a
commit 3846ec6124
2 changed files with 22 additions and 9 deletions

View file

@ -0,0 +1,19 @@
import sys, os
import traceback
from dotenv import load_dotenv
load_dotenv()
import os, io
sys.path.insert(
0, os.path.abspath("../..")
) # Adds the parent directory to the system path
import pytest
import litellm
def test_get_llm_provider():
_, response, _, _ = litellm.get_llm_provider(model="anthropic.claude-v2:1")
assert response == "bedrock"
test_get_llm_provider()