Class Mind
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
ClientThe client instance for making API requests.
name
stringThe name of the mind.
modelName
stringThe name of the model to use.
provider
stringThe 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
Datasources
Gets the list of datasources linked to the mind.
public List<string> Datasources { get; }
Property Value
ModelName
Gets the model name associated with the mind.
public string ModelName { get; }
Property Value
Name
Gets the name of the mind.
public string Name { get; }
Property Value
Parameters
Gets the parameters of the mind as a dictionary.
public Dictionary<string, object> Parameters { get; }
Property Value
Provider
Gets the provider associated with the mind.
public string Provider { get; }
Property Value
UpdatedAt
Gets the date and time when the mind was last updated.
public DateTime? UpdatedAt { get; }
Property Value
Methods
AddDatasource(string)
Adds a datasource to the mind by name.
public Task AddDatasource(string datasource)
Parameters
datasource
stringThe name of the datasource to add.
Returns
DelDatasource(object)
Deletes a datasource from the mind.
public Task DelDatasource(object datasource)
Parameters
datasource
objectThe datasource to remove, which can be a Datasource object or a string name.
Returns
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
stringThe new name for the mind (optional).
modelName
stringThe new model name for the mind (optional).
provider
stringThe new provider for the mind (optional).
promptTemplate
stringThe 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).