Table of Contents

Class Mind

Namespace
Minds.SDK
Assembly
Minds.SDK.dll

Represents a mind entity in the Minds SDK. Provides methods to update, add, or delete datasources linked to the mind, and manages mind configuration settings.

public class Mind
Inheritance
Mind
Inherited Members

Constructors

Mind(Client, string, string, string, Dictionary<string, object>, List<string>, DateTime?, DateTime?)

Initializes a new instance of the Mind class with the specified client and configuration options.

public Mind(Client client, string name, string modelName = null, string provider = null, Dictionary<string, object> parameters = null, List<string> datasources = null, DateTime? createdAt = null, DateTime? updatedAt = null)

Parameters

client Client

The client instance for making API requests.

name string

The name of the mind.

modelName string

The name of the model to use.

provider string

The provider of the model.

parameters Dictionary<string, object>

A dictionary of parameters for configuring the mind.

datasources List<string>

A list of datasources associated with the mind.

createdAt DateTime?

The creation date of the mind.

updatedAt DateTime?

The last update date of the mind.

Properties

CreatedAt

Gets the date and time when the mind was created.

public DateTime? CreatedAt { get; }

Property Value

DateTime?

Datasources

Gets the list of datasources linked to the mind.

public List<string> Datasources { get; }

Property Value

List<string>

ModelName

Gets the model name associated with the mind.

public string ModelName { get; }

Property Value

string

Name

Gets the name of the mind.

public string Name { get; }

Property Value

string

Parameters

Gets the parameters of the mind as a dictionary.

public Dictionary<string, object> Parameters { get; }

Property Value

Dictionary<string, object>

Provider

Gets the provider associated with the mind.

public string Provider { get; }

Property Value

string

UpdatedAt

Gets the date and time when the mind was last updated.

public DateTime? UpdatedAt { get; }

Property Value

DateTime?

Methods

AddDatasource(string)

Adds a datasource to the mind by name.

public Task AddDatasource(string datasource)

Parameters

datasource string

The name of the datasource to add.

Returns

Task

DelDatasource(object)

Deletes a datasource from the mind.

public Task DelDatasource(object datasource)

Parameters

datasource object

The datasource to remove, which can be a Datasource object or a string name.

Returns

Task

Exceptions

ArgumentException

Thrown if the provided datasource type is invalid.

ToString()

Returns a string that represents the current object, including its name, model, provider, creation, and update timestamps.

public override string ToString()

Returns

string

A string that represents the current mind object.

Update(string, string, string, string, List<string>, Dictionary<string, object>)

Updates the mind configuration by optionally changing its name, model, provider, prompt template, datasources, and parameters.

public Task Update(string name = null, string modelName = null, string provider = null, string promptTemplate = null, List<string> datasources = null, Dictionary<string, object> parameters = null)

Parameters

name string

The new name for the mind (optional).

modelName string

The new model name for the mind (optional).

provider string

The new provider for the mind (optional).

promptTemplate string

The new prompt template to use (optional).

datasources List<string>

A list of datasources to associate with the mind (optional).

parameters Dictionary<string, object>

A dictionary of parameters to update (optional).

Returns

Task