agentscope.message.block

The content blocks of messages

class AudioBlock[source]

Bases: TypedDict

The audio block

type: Required[Literal['audio']]

The type of the block

url: str

The url of the audio

class FileBlock[source]

Bases: TypedDict

The file block

type: Required[Literal['file']]

The type of the block

url: str

The url of the file

class ImageBlock[source]

Bases: TypedDict

The image block

type: Required[Literal['image']]

The type of the block

url: str

The url of the image

class TextBlock[source]

Bases: TypedDict

The text block.

text: str

The text content

type: Required[Literal['text']]

The type of the block

class ToolResultBlock[source]

Bases: TypedDict

The tool result block.

id: Required[str]

The identity of the tool call result

name: str | None

The name of the tool function

output: Required[object]

The output of the tool function

type: Required[Literal['tool_result']]

The type of the block

class ToolUseBlock[source]

Bases: TypedDict

The tool use block.

id: Required[str]

The identity of the tool call

input: Required[dict[str, object]]

The input of the tool

name: Required[str]

The name of the tool

type: Required[Literal['tool_use']]

The type of the block, must be tool_use

class VideoBlock[source]

Bases: TypedDict

The video block

type: Required[Literal['video']]

The type of the block

url: str

The url of the video