Interface IChatMessage

All Known Implementing Classes:
OpenAIChatMessage

public interface IChatMessage
Represents a message exchanged in a chat interaction with an AI model. Implementations of this interface encapsulate the content of the message and its associated role (e.g., user, system, assistant).
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the content of the chat message.
    Retrieves the role associated with the message.
  • Method Details

    • getMessage

      String getMessage()
      Retrieves the content of the chat message.
      Returns:
      the message content as a String.
    • getRole

      Role getRole()
      Retrieves the role associated with the message. Roles define the context of the message within the chat, such as:
      Returns:
      the Role of the message.