This is Milvus's unofficial Go client, designed to enable you to use Milvus's services easily from your own applications.
Milvus is a vector database that allows you to build high-performance vector search applications.
- ✅ list
- ✅ create
- ✅ describe
- ✅ update
- ✅ drop
- ✅ get
- ✅ insert
- ✅ delete
- ✅ query
- ✅ search
You can load milvus-go into your project by using:
go get github.com/henomis/milvus-go
You can run Milvus using Docker:
cd docker && docker-compose up -d
Please refer to the official documentation for more information about Milvus.
The only thing you need to start using Milvus's is username and password. Copy and paste it in the corresponding place in the code, select the API and the parameters you want to use, and that's it.
Please refer to the examples folder to see how to use the SDK.
Here below a simple usage example:
package main
import (
"context"
"fmt"
milvusgo "github.com/henomis/milvus-go"
"github.com/henomis/milvus-go/request"
"github.com/henomis/milvus-go/response"
)
func main() {
client := milvusgo.New("http://localhost:19530", "root", "Milvus")
resp := &response.VectorSearch{}
err := client.VectorSearch(
context.Background(),
&request.VectorSearch{
CollectionName: "test",
Vector: []float64{0.1, 0.2, 0.3, 0.4},
},
resp,
)
if err != nil {
panic(err)
}
fmt.Printf("resp: %#v\n", resp)
}
- LinGoose Go framework for building awesome LLM apps