from talk_box.conversation import Conversation
convo = Conversation()
msg = convo.add_message("Hello!", "user")
msg.role'user'
Append a message with the given role to the conversation.
Usage
Creates a new Message object, assigns a unique ID and timestamp, and appends it to the internal message list. This is the low-level method underlying the role-specific convenience methods (add_user_message, add_assistant_message, add_system_message).
content: strThe text content of the message.
role: strThe role of the sender (e.g., "user", "assistant", "system").
metadata: Optional[dict[str, Any]] = None Message