forked from phoenix/litellm-mirror
test groq tool calling
This commit is contained in:
parent
ea575ef62d
commit
c8832489d6
1 changed files with 5 additions and 2 deletions
|
@ -219,17 +219,19 @@ def test_validate_environment_empty_model():
|
|||
@mock.patch.dict(os.environ, {"OLLAMA_API_BASE": "foo"}, clear=True)
|
||||
def test_validate_environment_ollama():
|
||||
for provider in ["ollama", "ollama_chat"]:
|
||||
kv = validate_environment(provider+"/mistral")
|
||||
kv = validate_environment(provider + "/mistral")
|
||||
assert kv["keys_in_environment"]
|
||||
assert kv["missing_keys"] == []
|
||||
|
||||
|
||||
@mock.patch.dict(os.environ, {}, clear=True)
|
||||
def test_validate_environment_ollama_failed():
|
||||
for provider in ["ollama", "ollama_chat"]:
|
||||
kv = validate_environment(provider+"/mistral")
|
||||
kv = validate_environment(provider + "/mistral")
|
||||
assert not kv["keys_in_environment"]
|
||||
assert kv["missing_keys"] == ["OLLAMA_API_BASE"]
|
||||
|
||||
|
||||
def test_function_to_dict():
|
||||
print("testing function to dict for get current weather")
|
||||
|
||||
|
@ -338,6 +340,7 @@ def test_supports_function_calling():
|
|||
assert (
|
||||
litellm.supports_function_calling(model="azure/gpt-4-1106-preview") == True
|
||||
)
|
||||
assert litellm.supports_function_calling(model="groq/gemma-7b-it") == True
|
||||
assert (
|
||||
litellm.supports_function_calling(model="anthropic.claude-instant-v1")
|
||||
== False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue