ollama exception mapping + new cookbook

This commit is contained in:
ishaan-jaff 2023-09-21 12:00:04 -07:00
parent 0c895b76fe
commit 935d148423
2 changed files with 169 additions and 76 deletions

View file

@ -2421,6 +2421,9 @@ def exception_type(
llm_provider="vllm",
model=model
)
elif custom_llm_provider == "ollama":
if "no attribute 'async_get_ollama_response_stream" in error_str:
raise ImportError("Import error - trying to use async for ollama. import async_generator failed. Try 'pip install async_generator'")
raise original_exception
except Exception as e:
# LOGGING