mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
(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")
|
||||
for chunk in response:
|
||||
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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue