swarmauri.experimental.conversations.SemanticConversation module
- class swarmauri.experimental.conversations.SemanticConversation.SemanticConversation[source]
Bases:
IConversation
,ABC
A concrete implementation of the Conversation class that includes semantic routing. Semantic routing involves analyzing the content of messages to understand their intent or category and then routing them to appropriate handlers based on that analysis.
This class requires subclasses to implement the _analyze_message method for semantic analysis.
- abstract add_message(message)[source]
Adds a message to the conversation history and routes it to the appropriate handler based on its semantic category.
- Parameters:
message (Message) – The message to be added and processed.
- abstract clear_history()
Clears the conversation history.
- Return type:
None