conditional import async_generator

This commit is contained in:
ishaan-jaff 2023-09-21 11:01:51 -07:00
parent b88145e0b1
commit 6bfde2496c

View file

@ -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(