Represents a chunk of a message, which can be concatenated with other
message chunks. It includes a method _merge_kwargs_dict() for merging
additional keyword arguments from another BaseMessageChunk into this
one. It also overrides the __add__() method to support concatenation
of BaseMessageChunk instances.
class BaseMessageChunkBaseMessage<TStructure, TRole>Array of content blocks that make up the message content
Content block identifier, which can be either
A path to the module that contains the class, eg. ["langchain", "llms"] Usually should be the same as the entrypoint the class is exported from.
The name of the tool being called
Metadata about the message
Type of the content block
Type guard to check if an object is an AIMessage. Preserves the MessageStructure type parameter when called with a typed BaseMessage. When called with a typed BaseMessage, preserves the TStructure type
The name of the serializable. Override to provide an alias or to preserve the serialized module name in minified environments.
Implemented as a static method to support loading logic.
Array of content blocks that make up the message content
Content block identifier, which can be either
A path to the module that contains the class, eg. ["langchain", "llms"]
The name of the tool being called
Metadata about the message
Type of the content block
Type guard to check if an object is an AIMessage.
The name of the serializable. Override to provide an alias or
A path to the module that contains the class, eg. ["langchain", "llms"]