base_message
BaseMessage
Bases: ABC
, SerializableMixin
Source code in griptape/common/prompt_stack/messages/base_message.py
ASSISTANT_ROLE = 'assistant'
class-attribute
instance-attribute
SYSTEM_ROLE = 'system'
class-attribute
instance-attribute
USER_ROLE = 'user'
class-attribute
instance-attribute
content: list[Union[BaseMessageContent, BaseDeltaMessageContent]] = field(metadata={'serializable': True})
class-attribute
instance-attribute
role: str = field(kw_only=True, metadata={'serializable': True})
class-attribute
instance-attribute
usage: Usage = field(kw_only=True, default=Factory(lambda: BaseMessage.Usage()), metadata={'serializable': True})
class-attribute
instance-attribute
Usage
Bases: SerializableMixin