From 16abdf44c9f755c6fd6103317d0e5435b083be0d Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Mon, 13 Nov 2023 10:55:44 -0800 Subject: [PATCH] (fix) proxy_server convert chunk to dict() --- litellm/proxy/proxy_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index a90a987bc..0079e3f9c 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -410,7 +410,7 @@ def data_generator(response): print_verbose("inside generator") for chunk in response: print_verbose(f"returned chunk: {chunk}") - yield f"data: {json.dumps(chunk)}\n\n" + yield f"data: {json.dumps(chunk.dict())}\n\n" def litellm_completion(*args, **kwargs):