fix: 'validation error for ToolInvokeMessage' when blob_message meta is None (#11212)
This commit is contained in:
parent
0554898b5d
commit
d96a28487a
1 changed files with 6 additions and 1 deletions
|
|
@ -324,7 +324,12 @@ class Tool(BaseModel, ABC):
|
||||||
:param blob: the blob
|
:param blob: the blob
|
||||||
:return: the blob message
|
:return: the blob message
|
||||||
"""
|
"""
|
||||||
return ToolInvokeMessage(type=ToolInvokeMessage.MessageType.BLOB, message=blob, meta=meta, save_as=save_as)
|
return ToolInvokeMessage(
|
||||||
|
type=ToolInvokeMessage.MessageType.BLOB,
|
||||||
|
message=blob,
|
||||||
|
meta=meta or {},
|
||||||
|
save_as=save_as,
|
||||||
|
)
|
||||||
|
|
||||||
def create_json_message(self, object: dict) -> ToolInvokeMessage:
|
def create_json_message(self, object: dict) -> ToolInvokeMessage:
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue