Interface AiAssistant

  • All Implemented Interfaces:

    
    public interface AiAssistant
    
                        

    Interface defining the contract for an AI Assistant. This interface declares the methods that any AI Assistant implementation must provide.

    • Constructor Detail

    • Method Detail

      • ingestDocument

         abstract AiAssistantRemoteClient.AiAssistantResponse<IngestionResponse> ingestDocument(DataProvider dataProvider, String jwt)

        Ingests a document by uploading it to the server.

        Parameters:
        dataProvider - The data provider for the document.
        jwt - The JWT token for authentication.
        Returns:

        The result of the ingestion operation.

      • checkIfDocumentIsAlreadyIngested

         abstract AiAssistantRemoteClient.AiAssistantResponse<None> checkIfDocumentIsAlreadyIngested(String documentId, String fileHash)

        Checks if a document is already ingested by verifying its ID and file hash.

        Parameters:
        documentId - The ID of the document.
        fileHash - The hash of the file.
        Returns:

        The result of the check operation.

      • getSessionHistory

         abstract AiAssistantRemoteClient.AiAssistantResponse<List<CompletionResponse>> getSessionHistory()

        Retrieves the session history for a given session ID.

        Returns:

        The session history.

      • initializeSocketConnection

         abstract Unit initializeSocketConnection(Boolean includeSessionHistory)

        Initializes a socket connection with the given text.

        Parameters:
        includeSessionHistory - A flag to indicate if the session history should be included in the response.
      • initialize

         abstract Unit initialize(DataProvider dataProvider, DocumentIdentifiers documentIdentifiers, Boolean withSessionHistory)

        Initializes the assistant with the given data.

        Parameters:
        dataProvider - The data provider for the document.
        documentIdentifiers - The document identifiers.
        withSessionHistory - A flag to indicate if the session history should be included in the response.
      • update

         abstract Unit update(DocumentIdentifiers documentIdentifiers)

        Updates the assistant with the latest data.

        Parameters:
        documentIdentifiers - The document identifiers.
      • update

         abstract Unit update(AiAssistantConfiguration configuration)

        Updates the assistant with the latest data.

        Parameters:
        configuration - The configuration to update.
      • emitMessage

         abstract Unit emitMessage(String message, String documentId)

        Emits a message to the server.

        Parameters:
        message - The text to emit.
        documentId - The documentId to emit the message to.