(fix) print_verbose health check

This commit is contained in:
ishaan-jaff 2023-12-06 10:58:00 -08:00
parent f6546076b0
commit 4f02b3c161

View file

@ -50,7 +50,7 @@ async def _perform_health_check(model_list: list):
try:
await litellm.aembedding(**model_params)
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}")
return False
return True
@ -60,7 +60,7 @@ async def _perform_health_check(model_list: list):
try:
await litellm.acompletion(**model_params)
except Exception as e:
print_verbose("\n\n Got Exception, ", e)
print_verbose(f"\n\n Got Exception, {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:
return await _check_embedding_model(model_params)