From 20a796bacb6ba4a3491538c2ff0351cceb2d2ee2 Mon Sep 17 00:00:00 2001 From: alisalim17 Date: Wed, 1 May 2024 13:47:01 +0400 Subject: [PATCH] add tool_calls attribute to Message and Delta classes in order to improve type-safety --- litellm/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/litellm/utils.py b/litellm/utils.py index 5c5324be1..28dee68b5 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -364,6 +364,8 @@ class ChatCompletionMessageToolCall(OpenAIObject): class Message(OpenAIObject): + tool_calls: Optional[List[ChatCompletionMessageToolCall]] + def __init__( self, content="default", @@ -408,6 +410,8 @@ class Message(OpenAIObject): class Delta(OpenAIObject): + tool_calls: Optional[List[ChatCompletionDeltaToolCall]] + def __init__( self, content=None,