From 5ed957ebbe9e3e4fc5127f0d910cac533dd4d4ed Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Tue, 28 Nov 2023 09:43:42 -0800 Subject: [PATCH] fix(utils.py): bug fix return only non-null responses --- litellm/utils.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/litellm/utils.py b/litellm/utils.py index e45b345602..4b092fd636 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -140,16 +140,12 @@ class Message(OpenAIObject): self.role = role if function_call is not None: self.function_call = FunctionCall(**function_call) - else: - self.function_call = None if tool_calls is not None: self.tool_calls = [] for tool_call in tool_calls: self.tool_calls.append( ChatCompletionMessageToolCall(**tool_call) ) - else: - self.tool_calls = None if logprobs is not None: self._logprobs = logprobs