swarmauri.core.conversations.IConversation module

class swarmauri.core.conversations.IConversation.IConversation[source]

Bases: ABC

Interface for managing conversations, defining abstract methods for adding messages, retrieving the latest message, getting all messages, and clearing history.

abstract add_message(message)[source]

Adds a message to the conversation history.

abstract clear_history()[source]

Clears the conversation history.

Return type:

None

abstract get_last()[source]

Retrieves the latest message from the conversation history.

Return type:

Optional[IMessage]

property history: List[IMessage]

Provides read-only access to the conversation history.