forked from phoenix/litellm-mirror
fix(utils.py): bug fix return only non-null responses
This commit is contained in:
parent
150b91d476
commit
5ed957ebbe
1 changed files with 0 additions and 4 deletions
|
@ -140,16 +140,12 @@ class Message(OpenAIObject):
|
||||||
self.role = role
|
self.role = role
|
||||||
if function_call is not None:
|
if function_call is not None:
|
||||||
self.function_call = FunctionCall(**function_call)
|
self.function_call = FunctionCall(**function_call)
|
||||||
else:
|
|
||||||
self.function_call = None
|
|
||||||
if tool_calls is not None:
|
if tool_calls is not None:
|
||||||
self.tool_calls = []
|
self.tool_calls = []
|
||||||
for tool_call in tool_calls:
|
for tool_call in tool_calls:
|
||||||
self.tool_calls.append(
|
self.tool_calls.append(
|
||||||
ChatCompletionMessageToolCall(**tool_call)
|
ChatCompletionMessageToolCall(**tool_call)
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
self.tool_calls = None
|
|
||||||
if logprobs is not None:
|
if logprobs is not None:
|
||||||
self._logprobs = logprobs
|
self._logprobs = logprobs
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue