mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
fix exception mapping error
This commit is contained in:
parent
da87721a20
commit
a89a491c10
6 changed files with 4 additions and 4 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -43,7 +43,7 @@ def test_context_window(model):
|
||||||
|
|
||||||
with pytest.raises(ContextWindowExceededError):
|
with pytest.raises(ContextWindowExceededError):
|
||||||
completion(model=model, messages=messages)
|
completion(model=model, messages=messages)
|
||||||
|
test_context_window(models[0])
|
||||||
|
|
||||||
# Test 2: InvalidAuth Errors
|
# Test 2: InvalidAuth Errors
|
||||||
@pytest.mark.parametrize("model", models)
|
@pytest.mark.parametrize("model", models)
|
||||||
|
|
|
@ -1579,7 +1579,7 @@ def exception_type(model, original_exception, custom_llm_provider):
|
||||||
model=model,
|
model=model,
|
||||||
llm_provider=original_exception.llm_provider
|
llm_provider=original_exception.llm_provider
|
||||||
)
|
)
|
||||||
raise ValueError(original_exception)
|
raise original_exception
|
||||||
elif model:
|
elif model:
|
||||||
error_str = str(original_exception)
|
error_str = str(original_exception)
|
||||||
if isinstance(original_exception, BaseException):
|
if isinstance(original_exception, BaseException):
|
||||||
|
@ -1931,7 +1931,7 @@ def exception_type(model, original_exception, custom_llm_provider):
|
||||||
):
|
):
|
||||||
threading.Thread(target=get_all_keys, args=(e.llm_provider,)).start()
|
threading.Thread(target=get_all_keys, args=(e.llm_provider,)).start()
|
||||||
# don't let an error with mapping interrupt the user from receiving an error from the llm api calls
|
# don't let an error with mapping interrupt the user from receiving an error from the llm api calls
|
||||||
raise ValueError(original_exception)
|
raise original_exception
|
||||||
|
|
||||||
|
|
||||||
####### CRASH REPORTING ################
|
####### CRASH REPORTING ################
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "litellm"
|
name = "litellm"
|
||||||
version = "0.1.565"
|
version = "0.1.566"
|
||||||
description = "Library to easily interface with LLM API providers"
|
description = "Library to easily interface with LLM API providers"
|
||||||
authors = ["BerriAI"]
|
authors = ["BerriAI"]
|
||||||
license = "MIT License"
|
license = "MIT License"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue