chore: add create_json_message api for tools (#5440)

This commit is contained in:
非法操作 2024-06-24 15:46:16 +08:00 • committed by GitHub
commit 1e28a8c033
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 48 additions and 160 deletions

View file

@ -95,6 +95,7 @@ class ToolInvokeMessage(BaseModel):
IMAGE = "image"
LINK = "link"
BLOB = "blob"
JSON = "json"
IMAGE_LINK = "image_link"
FILE_VAR = "file_var"
@ -102,7 +103,7 @@ class ToolInvokeMessage(BaseModel):
"""
plain text, image url or link url
"""
message: Union[str, bytes] = None
message: Union[str, bytes, dict] = None
meta: dict[str, Any] = None
save_as: str = ''