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 boolean
equals(Object obj)
Compares this MotorSystemMessage to the specified object.String
getContent()
Retrieves the system prompt text held by this message.int
hashCode()
Computes the hash code for this MotorSystemMessage based on its message content.String
toString()
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:
getContent
in 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 istrue
if and only if the argument is notnull
and is aMotorSystemMessage
object 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.
-