Package com.mindsdb.services
Class MindsService
java.lang.Object
com.mindsdb.services.MindsService
Service class for managing Minds.
Provides methods to create, retrieve, list, and delete Mind objects using a REST client.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new Mind with the specified name.Creates a new Mind with the specified name and associated data sources.create
(String name, List<String> datasources, String modelName, com.google.gson.JsonObject parameters, String provider, String promptTemplate) Creates a new Mind with the specified parameters.void
Deletes a specific Mind by name.Retrieves a specific Mind by name.list()
Retrieves a list of all Minds.
-
Constructor Details
-
MindsService
-
-
Method Details
-
create
Creates a new Mind with the specified name.- Parameters:
name
- the name of the Mind to be created- Returns:
- the created Mind object
- Throws:
Exception
- if an error occurs during the creation process
-
create
Creates a new Mind with the specified name and associated data sources.- Parameters:
name
- the name of the Mind to be createddatasources
- a list of data sources to associate with the Mind- Returns:
- the created Mind object
- Throws:
Exception
- if an error occurs during the creation process
-
create
public Mind create(String name, List<String> datasources, String modelName, com.google.gson.JsonObject parameters, String provider, String promptTemplate) throws Exception Creates a new Mind with the specified parameters.- Parameters:
name
- the name of the Mind to be createddatasources
- a list of data sources to associate with the MindmodelName
- the name of the model to be usedparameters
- JSON object containing additional parameters for the Mindprovider
- the provider to be usedpromptTemplate
- the template for the prompt- Returns:
- the created Mind object
- Throws:
Exception
- if an error occurs during the creation process
-
list
Retrieves a list of all Minds.- Returns:
- an Optional containing a list of Mind objects, or an empty Optional if no Minds are found
- Throws:
Exception
- if an error occurs during the retrieval process
-
get
Retrieves a specific Mind by name.- Parameters:
mindName
- the name of the Mind to retrieve- Returns:
- an Optional containing the Mind object, or an empty Optional if not found
- Throws:
Exception
- if an error occurs during the retrieval process
-
drop
Deletes a specific Mind by name.- Parameters:
mindName
- the name of the Mind to delete- Throws:
Exception
- if an error occurs during the deletion process
-