forked from phoenix/litellm-mirror
(fix) proxy cli maintain back comp with openai < 1.00
This commit is contained in:
parent
a1634f42f5
commit
1207910522
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