Interface ChatSession

  • All Implemented Interfaces:

    
    public interface ChatSession
    
                        

    Simplest possible conversation session implementation Responsible for keeping its conversation up to date via Conversation.addMessage(), and for sending messages to the OutputChannel.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • onUserMessage

         abstract Unit onUserMessage(UserMessage userMessage)

        Update the conversation with a new message and respond to it. Any response messages will be sent to the messageListener, but also should be added to the conversation.

        Parameters:
        userMessage - message to send
      • saveAndSend

         Unit saveAndSend(AssistantMessage message)

        Convenience method to add a message to the conversation and send it to the output channel. Preserves all message properties including awaitable and assets.

      • getUser

         abstract User getUser()

        The Embabel User if known, null if not.