forked from phoenix/litellm-mirror
(fix) print_verbose health check
This commit is contained in:
parent
f6546076b0
commit
4f02b3c161
1 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@ async def _perform_health_check(model_list: list):
|
||||||
try:
|
try:
|
||||||
await litellm.aembedding(**model_params)
|
await litellm.aembedding(**model_params)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print_verbose("\n\n Got Exception, ", e)
|
print_verbose(f"\n\n Got Exception, {e}")
|
||||||
print_verbose(f"Health check failed for model {model_params['model']}. Error: {e}")
|
print_verbose(f"Health check failed for model {model_params['model']}. Error: {e}")
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
@ -60,7 +60,7 @@ async def _perform_health_check(model_list: list):
|
||||||
try:
|
try:
|
||||||
await litellm.acompletion(**model_params)
|
await litellm.acompletion(**model_params)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print_verbose("\n\n Got Exception, ", e)
|
print_verbose(f"\n\n Got Exception, {e}")
|
||||||
error_str = (str(e))
|
error_str = (str(e))
|
||||||
if "This is not a chat model" in error_str or "The chatCompletion operation does not work with the specified model" in error_str:
|
if "This is not a chat model" in error_str or "The chatCompletion operation does not work with the specified model" in error_str:
|
||||||
return await _check_embedding_model(model_params)
|
return await _check_embedding_model(model_params)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue