add tool_calls attribute to Message and Delta classes in order to improve type-safety

This commit is contained in:
alisalim17 2024-05-01 13:47:01 +04:00
parent fc5a845838
commit 20a796bacb

View file

@ -364,6 +364,8 @@ class ChatCompletionMessageToolCall(OpenAIObject):
class Message(OpenAIObject): class Message(OpenAIObject):
tool_calls: Optional[List[ChatCompletionMessageToolCall]]
def __init__( def __init__(
self, self,
content="default", content="default",
@ -408,6 +410,8 @@ class Message(OpenAIObject):
class Delta(OpenAIObject): class Delta(OpenAIObject):
tool_calls: Optional[List[ChatCompletionDeltaToolCall]]
def __init__( def __init__(
self, self,
content=None, content=None,