Class ChatHistory


  • public class ChatHistory
    extends Object
    Provides a history of messages between the User, Assistant and System
    • Constructor Detail

      • ChatHistory

        public ChatHistory()
    • Method Detail

      • getMessages

        public List<ChatHistory.Message> getMessages()
        Get the chat history
        Returns:
        List of messages in the chat
      • addMessage

        public void addMessage​(ChatHistory.AuthorRoles authorRole,
                               String content)
        Add a message to the chat history
        Parameters:
        authorRole - Role of the message author
        content - Message content