mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
(fix) proxy cli maintain back comp with openai < 1.00
This commit is contained in:
parent
d1d30978eb
commit
8ae511b178
1 changed files with 4 additions and 1 deletions
|
@ -410,7 +410,10 @@ def data_generator(response):
|
||||||
print_verbose("inside generator")
|
print_verbose("inside generator")
|
||||||
for chunk in response:
|
for chunk in response:
|
||||||
print_verbose(f"returned chunk: {chunk}")
|
print_verbose(f"returned chunk: {chunk}")
|
||||||
yield f"data: {json.dumps(chunk.dict())}\n\n"
|
try:
|
||||||
|
yield f"data: {json.dumps(chunk.dict())}\n\n"
|
||||||
|
except:
|
||||||
|
yield f"data: {json.dumps(chunk)}\n\n"
|
||||||
|
|
||||||
|
|
||||||
def litellm_completion(*args, **kwargs):
|
def litellm_completion(*args, **kwargs):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue