java.lang.Object
edu.tufts.hrilab.llm.serviceproviders.tr.social.ChatContext

public class ChatContext extends Object
  • Field Details

    • history

      protected Chat history
      General State Variables
    • chatType

      protected ChatType chatType
    • chatState

      protected ChatState chatState
    • utteranceUpForValidation

      protected Utterance utteranceUpForValidation
    • toolCallIdUpForValidation

      protected String toolCallIdUpForValidation
    • lastToolCallName

      protected String lastToolCallName
    • contextID

      protected String contextID
    • containsLLMParse

      protected boolean containsLLMParse
    • lastResponseString

      protected String lastResponseString
    • lastResponseToolCallId

      protected String lastResponseToolCallId
    • lastResponseStreamed

      protected boolean lastResponseStreamed
    • lastTemplateName

      protected String lastTemplateName
    • lastTemplateValue

      protected Object lastTemplateValue
    • onQuestionAskedHistorySize

      protected int onQuestionAskedHistorySize
  • Constructor Details

    • ChatContext

      public ChatContext(Chat chat)
    • ChatContext

      public ChatContext(Chat chat, long cid)
    • ChatContext

      public ChatContext(ChatContext other)
  • Method Details

    • signalCompletion

      public void signalCompletion()
      "Focused" context only - signal that the focused context is completed.
    • waitForCompletion

      public Predicate waitForCompletion()
      "Focused" context only - wait for the focused context to terminate with a validated instruction (or interrupted)
      Returns:
      The semantics of the validated, populated focused template semantics. Null if interrupted or aborted.
    • getUid

      public long getUid()
    • releaseLocks

      protected void releaseLocks()
      Release all locks for the collection and active context. Only use this method in the case of error recovery.
    • getNumParseErrors

      public int getNumParseErrors()
    • incrementNumParseErrors

      public void incrementNumParseErrors()
    • resetNumParseErrors

      public void resetNumParseErrors()
    • getHistory

      public Chat getHistory()