Class AIMessage

All Implemented Interfaces:
HasHandlers
Direct Known Subclasses:
AIMessageWithSource

public class AIMessage extends DataClass
An individual message in the list of AIRequest.messages of an AI request.
  • Constructor Details

    • AIMessage

      public AIMessage()
    • AIMessage

      public AIMessage(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static AIMessage getOrCreateRef(JavaScriptObject jsObj)
    • setContent

      public AIMessage setContent(Object content)
      The data for the message. If the type of this message is "jpegImage" or "pngImage", this will be the base64-encoded image data.
      Parameters:
      content - New content value. Default value is null
      Returns:
      AIMessage instance, for chaining setter calls
    • getContent

      public Object getContent()
      The data for the message. If the type of this message is "jpegImage" or "pngImage", this will be the base64-encoded image data.
      Returns:
      Current content value. Default value is null
    • setType

      public AIMessage setType(AIContentType type)
      The type of data.
      Parameters:
      type - New type value. Default value is "text"
      Returns:
      AIMessage instance, for chaining setter calls
    • getType

      public AIContentType getType()
      The type of data.
      Returns:
      Current type value. Default value is "text"