Class SocialAvaLLMServiceProvider
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.llm.LLMServiceProvider
edu.tufts.hrilab.llm.serviceproviders.tr.social.SocialTRLLMServiceProvider
edu.tufts.hrilab.llm.serviceproviders.tr.social.SocialAvaLLMServiceProvider
-
Field Summary
Fields inherited from class edu.tufts.hrilab.llm.serviceproviders.tr.social.SocialTRLLMServiceProvider
chatContextHistories, currentChatCollections, promptVarsFields inherited from class edu.tufts.hrilab.llm.LLMServiceProvider
agentHierarchy, conversationMappings, counter, currentConversations, language, learnedActions, trackDialogueHistory, trackLearnedActionsFields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, log, shouldRunExecutionLoop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcorrectCommonNLUMistakes(Utterance utterance) protected PredicatecorrectCommonNLUMistakesHelper(Predicate semantics, Symbol actor, Symbol instructor, StringBuilder errorStringBuilder) generateInstructTools(boolean xml) Generate the base INSTRUCT UtteranceType toolset available for this domainGenerate the base QUESTION UtteranceType toolset available for this domain.Generate all possible REPLY UtteranceType tools available for this domain.protected Stringprotected StringgetCondensedGoalSummary(Symbol agent) List of types handled by consultants in the system - when encountering symbols with these types during NLG preprocessing/NLU postprocessing, replaces references with descriptors/typed descriptors with variables.voidinit()Perform any component initialization.Initialize Prompt variables whose values are static during runtime or updated by event-based listenersvoidnewConsultantCallback(ai.thinkingrobots.trade.TRADEServiceInfo tsi) voidvoidAny component that needs particular shutdown logic needs to override this method andupdateDomainPromptVars(Utterance utterance, boolean parsing) visionCompletionTest(String prompt) Methods inherited from class edu.tufts.hrilab.llm.serviceproviders.tr.social.SocialTRLLMServiceProvider
addToolResponse, addVisionResponse, callChatCompletion, callChatCompletionForTextResponse, callChatCompletionStreaming, cancelLLMChatContext, convertSemanticsToTextLLMService, convertSemanticsToTextLLMService, endChatContext, executionLoop, focusDialogueChat, getBaseResponseConstraints, getBaseResponseStyle, getChatCollection, getChatHistory, getChatHistoryAsJSON, getChatHistoryAsString, getChatHistoryAsString, getChatHistoryAsString, getContextDependentTools, getContextTransferFillerPhrase, getContextTransferResponseUtterance, getCurrentGoals, getCurrentGoalsSummary, getCurrentQuestionsString, getExtendedConversationHistories, getExtendedConversationHistoryString, getFocusedFinalInstruction, getFocusedResponseConstraints, getFocusedResponsePolicy, getFocusedResponseStyle, getFullGoalsSummary, getGoalTranslationPrompt, getInstructableActions, getLastResponseStreamed, getLastResponseString, getLearnedActionPredicates, getLLMConversationLength, getNlgSystemPrompt, getNluSystemPrompt, getPendingGoals, getQuestionAnswerSystemPrompt, getScheduledGoals, getValidationNLGSystemPrompt, getValidationNLUSystemPrompt, handleDatabaseAddition, handleDatabaseRemoval, handleTextResponse, handleToolResponse, handleValidationResponse, inExtendedParseLoop, initLearnedActions, initPromptVars, interruptWaitOnFocusedChat, parseUtteranceLLMService, parseUtteranceLLMService, parseUtteranceLLMService, processArbitraryToolArgument, processMapArgument, processSymbolArgument, questionAskingCallback, reattemptParse, reduceChatContextHistory, resumeLLMChatContext, streamingChunkHandler, suspendLLMChatContext, toolToDescString, updateFocusedContextPromptVars, updateLLMConversationHistory, updatePromptVars, usedLLMParse, waitOnFocusedChatMethods inherited from class edu.tufts.hrilab.llm.LLMServiceProvider
callChatEndpoint, clearConversationHistory, endLLMConversation, endLLMConversation, endLLMConversation, endLLMConversation, getConversationHistory, getConversationHistory, getDescendants, getUntypedSymbol, registerForNotifications, setLanguage, startLLMConversation, startLLMConversation, startLLMConversationMethods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
additionalUsageInfo, attachShutdownHook, createInstance, createInstance, createInstance, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, main, parseArgs, postRegistrationInit, shutdown
-
Constructor Details
-
SocialAvaLLMServiceProvider
public SocialAvaLLMServiceProvider()
-
-
Method Details
-
init
public void init()Description copied from class:DiarcComponentPerform any component initialization. This should not be used for setting local fields to default values as was the case in DIARC. This method is called after the constructor, and after parseArgs. Setting default values should be done in field declaration or in the constructor.- Overrides:
initin classSocialTRLLMServiceProvider
-
shutdownComponent
public void shutdownComponent()Description copied from class:DiarcComponentAny component that needs particular shutdown logic needs to override this method and- Overrides:
shutdownComponentin classLLMServiceProvider
-
generateFocusedContextChatTemplates
- Specified by:
generateFocusedContextChatTemplatesin classSocialTRLLMServiceProvider
-
initDomainPromptVars
Initialize Prompt variables whose values are static during runtime or updated by event-based listeners- Specified by:
initDomainPromptVarsin classSocialTRLLMServiceProvider
-
updateDomainPromptVars
- Specified by:
updateDomainPromptVarsin classSocialTRLLMServiceProvider
-
getBaseRoleDescription
- Overrides:
getBaseRoleDescriptionin classSocialTRLLMServiceProvider
-
getBaseContextualInformation
- Overrides:
getBaseContextualInformationin classSocialTRLLMServiceProvider
-
getCondensedGoalSummary
-
newConsultantCallback
public void newConsultantCallback(ai.thinkingrobots.trade.TRADEServiceInfo tsi) -
newConsultantPropertyCallback
public void newConsultantPropertyCallback() -
getRefTypes
Description copied from class:SocialTRLLMServiceProviderList of types handled by consultants in the system - when encountering symbols with these types during NLG preprocessing/NLU postprocessing, replaces references with descriptors/typed descriptors with variables.- Specified by:
getRefTypesin classSocialTRLLMServiceProvider
-
correctCommonNLUMistakes
- Specified by:
correctCommonNLUMistakesin classSocialTRLLMServiceProvider
-
correctCommonNLUMistakesHelper
protected Predicate correctCommonNLUMistakesHelper(Predicate semantics, Symbol actor, Symbol instructor, StringBuilder errorStringBuilder) -
generateInstructTools
Generate the base INSTRUCT UtteranceType toolset available for this domain- Specified by:
generateInstructToolsin classSocialTRLLMServiceProvider
-
generateITKTools
Generate the base QUESTION UtteranceType toolset available for this domain. TODO: Currently a stand-in to define DIARC-LLM ITK tools, not user-DIARC ITK. Need to update how we're defining this once the ITK pipeline is safe to use- Specified by:
generateITKToolsin classSocialTRLLMServiceProvider
-
generateReplyTools
Generate all possible REPLY UtteranceType tools available for this domain. Will be included in any LLM Completion request dynamically based on matching expected response forms for current system questions.- Specified by:
generateReplyToolsin classSocialTRLLMServiceProvider
-
visionCompletionTest
-
getMockImageData
-