The Minds Go SDK is a Software Development Kit for the Minds (Unofficial). Built with the REST API Endpoints given by the Minds. With the help of this the Go Developers can able to easily interact with the Minds. Currently the Minds SDK allows the developer to Create, Update, Add Datasource, Delete , List and Get the Minds, and Datasource. As of now it uses the Http package from the go to communicate with the Endpoints of Minds.
- Mind Management: Create, Update, Delete and Fetch details of Minds from MindsDB and also has the feature to add Datasource to the existing Mind.
- Datasource Management: Create, Update, Delete and Fetch details of Datasources linked to MindsDB.
- Chat Completeion: Integreate with chat applications API for natural language processing, it can support both single chat and streaming of chats.
To install the SDK, run the following command in the terminal where your project is located.
go get github.com/Abiji-2020/minds-go-sdkThen you can use the modules in the project.
Below is a simple example of how to use the Client package to interact with the Minds API. More Examples on each feature
package main
import (
"fmt"
"github.com/Abiji-2020/minds-go-sdk/client"
"github.com/Abiji-2020/minds-go-sdk/datasource"
)
func main() {
// To initialize the client, you need to provide your API key and the base URL
Client := client.NewClient("YOUR API KEY", " BASE URL")
//Declare a datasource
ds1 := datasource.DatabaseConfig{
Name: "datasource1",
Engine: "mysql",
Description: "This is a test datasource",
ConnectionData: map[string]string{
"user": "root",
"password": "password",
"host": "localhost",
"port": "3306",
"database": "test",
},
Tables: []string{"table1", "table2"},
}
// Create a new mind
datas := []datasource.DatabaseConfig{ds1}
mindName := "Test Mind"
createdMind, err := Client.Minds.Create(mindName, datas)
if err != nil {
fmt.Println("Error creating mind: ", err)
} else {
fmt.Println("Mind created: ", createdMind)
}
}-
Minds Management
- Fetch all minds
- Get a specific mind by name
- Add datasource to mind
- Create, Update and delete minds
-
Datasource Management
- List all datasources
- Get a datasource by name
- Create, update and delete a datasource from minds.
-
Completions API
- Use natural language processing with chat completions.
This SDK is currently under active development. Contributions are welcome.
Note
For the future of the SDK , I have planned to add templates as a package of giving out all the Datasource templates in the Minds.
- If found any issues report them, or add them in
Issuestab - For any inquiries and feature requests, feel free to open a discussion or contact us.
This package is Licenced under the MIT LICENSE, see the LICENSE file for more details.