Table of Contents

Class Minds

Namespace
Minds.SDK
Assembly
Minds.SDK.dll

The Minds class provides methods to manage and interact with MindsDB's mind entities. It allows users to list, create, retrieve, and delete minds and check or create datasources.

public class Minds
Inheritance
Minds
Inherited Members

Constructors

Minds(Client)

Initializes a new instance of the Minds class with the provided client.

public Minds(Client client)

Parameters

client Client

The client instance used to make API requests.

Methods

CheckDatasource(object)

Verifies and retrieves the name of a datasource.

public string CheckDatasource(object ds)

Parameters

ds object

The datasource object, which can be a Datasource, a DatabaseConfig, or a string.

Returns

string

The name of the datasource as a string.

Exceptions

ArgumentException

Thrown if the datasource type is unknown.

Create(string, string, string, string, List<string>, Dictionary<string, object>, bool)

Creates a new mind with the given configuration options. Optionally, it can replace an existing mind with the same name.

public Task<Mind> Create(string name, string modelName = null, string provider = null, string promptTemplate = null, List<string> datasources = null, Dictionary<string, object> parameters = null, bool replace = false)

Parameters

name string

The name of the mind to create.

modelName string

The name of the model to associate with the mind (optional).

provider string

The provider for the model (optional).

promptTemplate string

A prompt template for the mind (optional).

datasources List<string>

A list of datasources associated with the mind (optional).

parameters Dictionary<string, object>

A dictionary of parameters to configure the mind (optional).

replace bool

If set to true, will replace an existing mind with the same name (optional).

Returns

Task<Mind>

A Mind object representing the newly created mind.

Exceptions

ObjectNotFoundException

Thrown if the mind to replace doesn't exist.

Drop(string)

Deletes a mind by name from the project.

public Task Drop(string name)

Parameters

name string

The name of the mind to delete.

Returns

Task

Get(string)

Retrieves a specific mind by name.

public Task<Mind> Get(string name)

Parameters

name string

The name of the mind to retrieve.

Returns

Task<Mind>

A Mind object representing the retrieved mind.

List()

Retrieves a list of all minds in the current project.

public Task<List<Mind>> List()

Returns

Task<List<Mind>>

A list of Mind objects.