From fa297b67ca55e43c018b2c2bc7ea9452276ac759 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 25 Mar 2024 19:11:39 -0700 Subject: [PATCH] fix(test_amazing_vertex_completion.py): fix test to check if content is none --- litellm/tests/test_amazing_vertex_completion.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/tests/test_amazing_vertex_completion.py b/litellm/tests/test_amazing_vertex_completion.py index 264bb7a70..89862a4c1 100644 --- a/litellm/tests/test_amazing_vertex_completion.py +++ b/litellm/tests/test_amazing_vertex_completion.py @@ -281,7 +281,8 @@ async def test_async_vertexai_streaming_response(): complete_response = "" async for chunk in response: print(f"chunk: {chunk}") - complete_response += chunk.choices[0].delta.content + if chunk.choices[0].delta.content is not None: + complete_response += chunk.choices[0].delta.content print(f"complete_response: {complete_response}") assert len(complete_response) > 0 except litellm.RateLimitError as e: