Skip to main content

Documentation Index

Fetch the complete documentation index at: https://private-04b27de1.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

wrap_message

wrap_message(message_cls: type[BaseMessage]) -> type[BaseModel]
Wrap a message class with a type field to be used in a union type This is needed for proper serialization and deserialization of messages in a union type.
Parameters:
NameDescription
message_clsMessage class to wrap

Type: type[BaseMessage]