BaseMessage
class.
In this notebook, you’ll explore:
BaseMessage
class. The topics covered include:
BaseMessage
class.BaseMessage
instance.BaseMessage
class.BaseMessage
class.ChatAgent
ChatAgent
directlyChatAgent
ChatAgent
via BaseMessage
BaseMessage
BaseMessage
InstanceBaseMessage
instance, you need to provide the following arguments:
role_name
: The name of the user or assistant role.role_type
: The type of role, either RoleType.ASSISTANT
or RoleType.USER
.content
: The content of the message.meta_dict
: An metadata dictionary for the message.video_bytes
: Optional bytes of a video associated with the message.image_list
: Optional list of PIL Image objects associated with the message.image_detail
: Detail level of the images associated with the message. Default is “auto”.video_detail
: Detail level of the videos associated with the message. Default is “low”.BaseMessage
instance:
BaseMessage
ClassBaseMessage
class offers several methods:
OpenAIMessage
object:OpenAISystemMessage
object:OpenAIUserMessage
object:OpenAIAssistantMessage
object:BaseMessage
instance into different message types depending on your needs.
BaseMessage
to ChatAgent
BaseMessage
to different types of messages. These components play essential roles in the CAMEL chat system, facilitating the creation, management, and interpretation of messages with clarity.
Key tools utilized in this notebook include: