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.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MotorSystemMessage

      public MotorSystemMessage​(String message)
      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

      public String getContent()
      Retrieves the system prompt text held by this message.
      Specified by:
      getContent in interface MotorMessage
      Returns:
      The system prompt text.
    • hashCode

      public int hashCode()
      Computes the hash code for this MotorSystemMessage based on its message content.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this object.
    • equals

      public boolean equals​(Object obj)
      Compares this MotorSystemMessage to the specified object. The result is true if and only if the argument is not null and is a MotorSystemMessage object that represents the same sequence of characters as this object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to compare this MotorSystemMessage against
      Returns:
      true if the given object represents a MotorSystemMessage equivalent to this message, false otherwise
    • toString

      public String toString()
      Provides a string representation of this object. The output includes the class name along with key attribute values.
      Overrides:
      toString in class Object
      Returns:
      a string description of this object.