Package com.axemble.vdoc.sdk.ai.agents
Interface IAssistant
- All Superinterfaces:
AutoCloseable,Closeable
Interface for an AI assistant
-
Method Summary
Modifier and TypeMethodDescriptionAsk a question to the assistantask(String message, IMultimodalContent... contents) Ask a question to the assistant with multimodal contentsbooleancheckChatMemory(String newMessage) Check if chat memory can accept a new messagevoidclose()Close the assistant and release resourcesGet additional parameters sent to the assistantGet additional chat response sources configured in the assistantGet language model connection used by the assistantgetUsage()Get the assistant usagevoidinsertContext(String context) Insert system context to the assistantbooleanCheck if additional context has been added to the assistant This is used to avoid adding the same context multiple timesvoidsetAdditionalContextAdded(boolean additionalContextAdded) Set to true if additional context has been added to the assistant This is used to avoid adding the same context multiple times
-
Method Details
-
getUsage
String getUsage()Get the assistant usage- Returns:
- the assistant usage
-
ask
Ask a question to the assistant- Parameters:
message- the message to ask- Returns:
- the assistant response
-
ask
Ask a question to the assistant with multimodal contents- Parameters:
message- the message to askcontents- the multimodal contents to provide to the assistant- Returns:
- the assistant response
-
insertContext
Insert system context to the assistant- Parameters:
context- the context to insert
-
isAdditionalContextAdded
boolean isAdditionalContextAdded()Check if additional context has been added to the assistant This is used to avoid adding the same context multiple times- Returns:
- true if additional context has been added
-
setAdditionalContextAdded
void setAdditionalContextAdded(boolean additionalContextAdded) Set to true if additional context has been added to the assistant This is used to avoid adding the same context multiple times- Parameters:
additionalContextAdded- true if additional context has been added
-
getLanguageModelConnection
ILanguageModelConnection getLanguageModelConnection()Get language model connection used by the assistant- Returns:
- the language model connection
-
getAdditionalSources
Collection<IChatResponseSource> getAdditionalSources()Get additional chat response sources configured in the assistant- Returns:
- the collection of additional chat response sources
-
checkChatMemory
Check if chat memory can accept a new message- Parameters:
newMessage- the new message to check- Returns:
- true if the chat memory can accept the new message
-
getAdditionalParameters
Get additional parameters sent to the assistant- Returns:
- the map of additional parameters
-
close
Close the assistant and release resources- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-