Package com.chatmotorapi.api
Class MotorSystemMessage
java.lang.Object
com.chatmotorapi.api.MotorSystemMessage
- All Implemented Interfaces:
MotorMessage
public class MotorSystemMessage extends Object implements MotorMessage
Represents a system-level message within the ChatMotor system, specifically
used to hold system prompts. This class is designed to encapsulate messages
that are used by the system to guide or control interactions, typically
containing instructions or information that direct the flow of conversation
or operation.
This implements the MotorMessage interface to ensure it can be
managed consistently within the ChatMotor's messaging framework.
-
Constructor Summary
Constructors Constructor Description MotorSystemMessage(String message)Constructs a new MotorSystemMessage with a specified system prompt. -
Method Summary
Modifier and Type Method Description booleanequals(Object obj)Compares this MotorSystemMessage to the specified object.StringgetContent()Retrieves the system prompt text held by this message.inthashCode()Computes the hash code for this MotorSystemMessage based on its message content.StringtoString()Provides a string representation of this object.
-
Constructor Details
-
MotorSystemMessage
Constructs a new MotorSystemMessage with a specified system prompt.- Parameters:
message- The system prompt text, not null, which guides or controls system interactions.- Throws:
IllegalArgumentException- If the specified message is null.
-
-
Method Details
-
getContent
Retrieves the system prompt text held by this message.- Specified by:
getContentin interfaceMotorMessage- Returns:
- The system prompt text.
-
hashCode
public int hashCode()Computes the hash code for this MotorSystemMessage based on its message content. -
equals
Compares this MotorSystemMessage to the specified object. The result istrueif and only if the argument is notnulland is aMotorSystemMessageobject that represents the same sequence of characters as this object. -
toString
Provides a string representation of this object. The output includes the class name along with key attribute values.
-