Interface AIService

All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService

@RemoteServiceRelativePath("ai") public interface AIService extends com.google.gwt.user.client.rpc.RemoteService
The client side stub for the Artificial Intelligence Service. This service gives all needed methods to handle AI models and samplers.
Since:
9.2
Author:
Marco Meschieri - LogicalDOC
  • Method Details

    • deleteSamplers

      void deleteSamplers(List<Long> samplerIds) throws ServerException
      Deletes some samplers
      Parameters:
      samplerIds - identifiers of the samplers
      Throws:
      ServerException - an error happened in the server application
    • saveSampler

      GUISampler saveSampler(GUISampler sampler) throws ServerException
      Creates or updates a sampler
      Parameters:
      sampler - the sampler to save
      Returns:
      the saved sampler
      Throws:
      ServerException - an error happened in the server application
    • getSampler

      GUISampler getSampler(long samplerId) throws ServerException
      Retrieves a sampler from the data layer
      Parameters:
      samplerId - identifier of the sampler
      Returns:
      the sampler
      Throws:
      ServerException - an error happened in the server application
    • deleteModels

      void deleteModels(List<Long> modelIds) throws ServerException
      Deletes a set of models
      Parameters:
      modelIds - identifiers of the models to delete
      Throws:
      ServerException - an error happened in the server application
    • saveModel

      GUIModel saveModel(GUIModel model) throws ServerException
      Creates or updates a model
      Parameters:
      model - the model to save
      Returns:
      the saved model
      Throws:
      ServerException - an error happened in the server application
    • getModel

      GUIModel getModel(long modelId) throws ServerException
      Retrieves a model from the data layer
      Parameters:
      modelId - identifier of the model
      Returns:
      the model
      Throws:
      ServerException - an error happened in the server application
    • getModels

      List<GUIModel> getModels() throws ServerException
      Retrieves all the models
      Returns:
      the list of models
      Throws:
      ServerException - an error happened in the server application
    • trainModel

      void trainModel(long modelId) throws ServerException
      Trains a model
      Parameters:
      modelId - identifier of the model to train
      Throws:
      ServerException - an error happened in the server application
    • stopTraining

      void stopTraining(long modelId) throws ServerException
      Stops the training of a model
      Parameters:
      modelId - identifier of the model to stop training
      Throws:
      ServerException - an error happened in the server application
    • evaluateModel

      void evaluateModel(long modelId) throws ServerException
      Evaluated a neural network model
      Parameters:
      modelId - identifier of the neural network model to evaluate
      Throws:
      ServerException - an error happened in the server application
    • query

      List<GUIQueryResult> query(long modelId, List<String> features) throws ServerException
      Runs a model and gets the prediction
      Parameters:
      modelId - identifier of the model
      features - ordered list of feature values
      Returns:
      the list of predictions ordered by descending score
      Throws:
      ServerException - an error happened in the server application
    • importModel

      GUIModel importModel(String modelName, boolean includeTrainingData) throws ServerException
      Imports a new model
      Parameters:
      modelName - Name to give to the new imported model
      includeTrainingData - Id training data must be imported as well
      Returns:
      The created model
      Throws:
      ServerException - an error happened in the server application
    • cloneModel

      GUIModel cloneModel(long modelId, String newName) throws ServerException
      Clones a model
      Parameters:
      modelId - Identifier of the model to clone
      newName - The name to give to the clone
      Returns:
      The clone
      Throws:
      ServerException - an error happened in the server application
    • getStats

      List<GUIParameter> getStats(Long modelId, Long tenantId) throws ServerException
      Loads the statistics from of the AI
      Parameters:
      modelId - Optional indentifier of the model
      tenantId - Optional indentifier of the tenant
      Returns:
      all the stats
      Throws:
      ServerException - an error happened in the server application
    • loadVectorStore

      List<GUIParameter> loadVectorStore() throws ServerException
      Loads all the settings related to the vector store
      Returns:
      List of settings
      Throws:
      ServerException - an error happened in the server application
    • saveVectorStore

      void saveVectorStore(List<GUIParameter> settings) throws ServerException
      Saves all the settings related to the vector store
      Parameters:
      settings - The vector store's settings
      Throws:
      ServerException - an error happened in the server application
    • testVectorStore

      boolean testVectorStore(List<GUIParameter> settings) throws ServerException
      Checks the connection to the vector store
      Parameters:
      settings - The vector store's settings, they are not persisted but just used to test the connection
      Throws:
      ServerException - an error happened in the server application
    • enableEmbeddingScheme

      void enableEmbeddingScheme(long schemeId, boolean enabled) throws ServerException
      Enables / Disables an embedding scheme
      Parameters:
      schemeId - Identifier of the scheme
      enabled - new status
      Throws:
      ServerException - an error happened in the server application
    • saveEmbeddingScheme

      GUIEmbeddingScheme saveEmbeddingScheme(GUIEmbeddingScheme scheme) throws ServerException
      Creates or updates a scheme
      Parameters:
      scheme - the scheme to save
      Returns:
      the saved scheme
      Throws:
      ServerException - an error happened in the server application
    • getEmbeddingScheme

      GUIEmbeddingScheme getEmbeddingScheme(long schemeId) throws ServerException
      Retrieves a scheme from the data layer
      Parameters:
      schemeId - identifier of the scheme
      Returns:
      the scheme
      Throws:
      ServerException - an error happened in the server application
    • getEmbeddingSchemes

      List<GUIEmbeddingScheme> getEmbeddingSchemes() throws ServerException
      Retrieves all the embedding schemes
      Returns:
      the list of schemes
      Throws:
      ServerException - an error happened in the server application
    • deleteEmbeddingSchemes

      void deleteEmbeddingSchemes(List<Long> schemeIds) throws ServerException
      Deletes a set of schemes
      Parameters:
      schemeIds - identifiers of the schemes to delete
      Throws:
      ServerException - an error happened in the server application
    • removeEmbeddings

      void removeEmbeddings(long schemeId, List<Long> docIds) throws ServerException
      Removes the embeddings generated for the given scheme
      Parameters:
      schemeId - Id of the scheme
      docIds - The list of doc Ids to delete or null if you want to delete all the embeddings
      Throws:
      ServerException - Error in the server application
    • markUnembeddable

      void markUnembeddable(List<Long> docIds) throws ServerException
      Marks a set of documents as unembeddable
      Parameters:
      docIds - identifiers of the documents
      Throws:
      ServerException - an error happened in the server application
    • markEmbeddable

      void markEmbeddable(List<Long> docIds) throws ServerException
      Marks a set of documents as embeddable
      Parameters:
      docIds - identifiers of the documents
      Throws:
      ServerException - an error happened in the server application