Class ChatMessageContent<T>

  • Type Parameters:
    T - the type of the inner content within the messages

    public class ChatMessageContent<T>
    extends KernelContent<T>
    Represents the content of a chat message
    • Constructor Detail

      • ChatMessageContent

        public ChatMessageContent​(AuthorRole authorRole,
                                  String content)
        Creates a new instance of the ChatMessageContent class.
        Parameters:
        authorRole - the author role that generated the content
        content - the content
      • ChatMessageContent

        public ChatMessageContent​(AuthorRole authorRole,
                                  List<KernelContent<T>> items,
                                  String modelId,
                                  T innerContent,
                                  Charset encoding,
                                  FunctionResultMetadata metadata)
        Creates a new instance of the ChatMessageContent class.
        Parameters:
        authorRole - the author role that generated the content
        items - the items
        modelId - the model id
        innerContent - the inner content
        encoding - the encoding
        metadata - the metadata
    • Method Detail

      • getAuthorRole

        public AuthorRole getAuthorRole()
        Gets the author role that generated the content
        Returns:
        the author role that generated the content
      • getItems

        public List<KernelContent<T>> getItems()
        Gets the KernelContent items that comprise the content.
        Returns:
        the items, which may be null
      • getEncoding

        @Nullable
        public Charset getEncoding()
        Gets the encoding of the content
        Returns:
        the encoding, which may be null