Class SpotPickAndPlaceLLMServiceProvider

All Implemented Interfaces:
NLGInterface

public class SpotPickAndPlaceLLMServiceProvider extends LLMServiceProvider
  • Constructor Details

    • SpotPickAndPlaceLLMServiceProvider

      public SpotPickAndPlaceLLMServiceProvider()
  • Method Details

    • parseNLUCompletionResponse

      public Utterance parseNLUCompletionResponse(Utterance incomingUtterance, Completion llmResponse)
      Description copied from class: LLMServiceProvider
      Postprocessing of LLM's chatCompletion return value for the NLU task.
      Specified by:
      parseNLUCompletionResponse in class LLMServiceProvider
      Returns:
      The fully populated Utterance to return from parseUtterance
    • parseNLGCompletionResponse

      public Utterance parseNLGCompletionResponse(Utterance outgoingUtterance, Completion llmResponse)
      Description copied from class: LLMServiceProvider
      Postprocessing of LLM's chatCompletion return value for the NLG task.
      Specified by:
      parseNLGCompletionResponse in class LLMServiceProvider
      Returns:
      The fully populated Utterance to return convertSemanticsToText.
    • generateNLGChat

      protected Chat generateNLGChat(Utterance utterance, List<Utterance> conversationHistory)
      Description copied from class: LLMServiceProvider
      Generate a Chat object to call LLM's chatCompletion service with for the generation task. Practically entails generating a system and user message for an NLG request of the supplied utterance.
      Specified by:
      generateNLGChat in class LLMServiceProvider
      Parameters:
      utterance - outgoing utterance to perform NLG for
      conversationHistory - Relevant dialogue history leading up to this outgoing utterance which may provide context.
      Returns:
      Fully updated Chat object to pass to an LLM's chatCompletion service for NLG
    • generateNLUChat

      protected Chat generateNLUChat(Utterance utterance, Chat currentChat, List<Utterance> conversationHistory)
      Description copied from class: LLMServiceProvider
      Generate a Chat object to call LLM's chatCompletion service with for the parsing task. Practically entails creating a new or updating an existing Chat object to contain the proper system, user, and assistant messages to come up with a proper parse of the supplied utterance.
      Specified by:
      generateNLUChat in class LLMServiceProvider
      Parameters:
      utterance - incoming utterance to be parsed
      currentChat - Chat object containing prior requests and responses between the LLM for this current parse attempt. Null if this is the first interaction.
      conversationHistory - Relevant dialogue history leading up to this incoming utterance which may provide context.
      Returns:
      Fully updated Chat object to pass to an LLM's chatCompletion service for parsing