From 6bfde2496ca3cc79f5c7d0dd4526b2b6c86d29a3 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 21 Sep 2023 11:01:51 -0700 Subject: [PATCH] conditional import async_generator --- litellm/llms/ollama.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/litellm/llms/ollama.py b/litellm/llms/ollama.py index 4a92405941..b7ec698505 100644 --- a/litellm/llms/ollama.py +++ b/litellm/llms/ollama.py @@ -1,6 +1,10 @@ import requests import json -from async_generator import async_generator, yield_ + +try: + from async_generator import async_generator, yield_ # optional dependancy if you want to use acompletion + streaming +except: + pass # this should not throw an error, it will impact the 'import litellm' statement # ollama implementation def get_ollama_response_stream(