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
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptioncloneModel(long modelId, String newName) Clones a modelvoiddeleteEmbeddingSchemes(List<Long> schemeIds) Deletes a set of schemesvoiddeleteModels(List<Long> modelIds) Deletes a set of modelsvoiddeleteSamplers(List<Long> samplerIds) Deletes some samplersvoidenableEmbeddingScheme(long schemeId, boolean enabled) Enables / Disables an embedding schemevoidevaluateModel(long modelId) Evaluated a neural network modelgetEmbeddingScheme(long schemeId) Retrieves a scheme from the data layerRetrieves all the embedding schemesgetModel(long modelId) Retrieves a model from the data layerRetrieves all the modelsgetSampler(long samplerId) Retrieves a sampler from the data layerLoads the statistics from of the AIimportModel(String modelName, boolean includeTrainingData) Imports a new modelLoads all the settings related to the vector storevoidmarkEmbeddable(List<Long> docIds) Marks a set of documents as embeddablevoidmarkUnembeddable(List<Long> docIds) Marks a set of documents as unembeddableRuns a model and gets the predictionvoidremoveEmbeddings(long schemeId, List<Long> docIds) Removes the embeddings generated for the given schemeCreates or updates a schemeCreates or updates a modelsaveSampler(GUISampler sampler) Creates or updates a samplervoidsaveVectorStore(List<GUIParameter> settings) Saves all the settings related to the vector storevoidstopTraining(long modelId) Stops the training of a modelbooleantestVectorStore(List<GUIParameter> settings) Checks the connection to the vector storevoidtrainModel(long modelId) Trains a model
-
Method Details
-
deleteSamplers
Deletes some samplers- Parameters:
samplerIds- identifiers of the samplers- Throws:
ServerException- an error happened in the server application
-
saveSampler
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
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
Deletes a set of models- Parameters:
modelIds- identifiers of the models to delete- Throws:
ServerException- an error happened in the server application
-
saveModel
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
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
Retrieves all the models- Returns:
- the list of models
- Throws:
ServerException- an error happened in the server application
-
trainModel
Trains a model- Parameters:
modelId- identifier of the model to train- Throws:
ServerException- an error happened in the server application
-
stopTraining
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
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
Runs a model and gets the prediction- Parameters:
modelId- identifier of the modelfeatures- ordered list of feature values- Returns:
- the list of predictions ordered by descending score
- Throws:
ServerException- an error happened in the server application
-
importModel
Imports a new model- Parameters:
modelName- Name to give to the new imported modelincludeTrainingData- Id training data must be imported as well- Returns:
- The created model
- Throws:
ServerException- an error happened in the server application
-
cloneModel
Clones a model- Parameters:
modelId- Identifier of the model to clonenewName- The name to give to the clone- Returns:
- The clone
- Throws:
ServerException- an error happened in the server application
-
getStats
Loads the statistics from of the AI- Parameters:
modelId- Optional indentifier of the modeltenantId- Optional indentifier of the tenant- Returns:
- all the stats
- Throws:
ServerException- an error happened in the server application
-
loadVectorStore
Loads all the settings related to the vector store- Returns:
- List of settings
- Throws:
ServerException- an error happened in the server application
-
saveVectorStore
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
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
Enables / Disables an embedding scheme- Parameters:
schemeId- Identifier of the schemeenabled- new status- Throws:
ServerException- an error happened in the server application
-
saveEmbeddingScheme
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
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
Retrieves all the embedding schemes- Returns:
- the list of schemes
- Throws:
ServerException- an error happened in the server application
-
deleteEmbeddingSchemes
Deletes a set of schemes- Parameters:
schemeIds- identifiers of the schemes to delete- Throws:
ServerException- an error happened in the server application
-
removeEmbeddings
Removes the embeddings generated for the given scheme- Parameters:
schemeId- Id of the schemedocIds- 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
Marks a set of documents as unembeddable- Parameters:
docIds- identifiers of the documents- Throws:
ServerException- an error happened in the server application
-
markEmbeddable
Marks a set of documents as embeddable- Parameters:
docIds- identifiers of the documents- Throws:
ServerException- an error happened in the server application
-