vectordatabase-sdk-go

module
v1.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2025 License: Apache-2.0, BSD-2-Clause, MIT

README

TencentCloud VectorDB Go SDK

Getting started

Prerequisites
  1. Go 1.17 or higher
Install TencentCloud VectorDB Go SDK
  1. Use go get to install the latest version of the TencentCloud VectorDB Go SDK and dependencies:
go get -u github.com/tencent/vectordatabase-sdk-go/tcvectordb
  1. Create New VectorDB Client To Start:
import "github.com/tencent/vectordatabase-sdk-go/tcvectordb"

cli, err := tcvectordb.NewRpcClient("vdb http url or ip and post", "root", "key get from web console", &tcvectordb.ClientOption{
		ReadConsistency: tcvectordb.EventualConsistency,
		MaxIdldConnPerHost: 10,
		IdleConnTimeout:    time.Second * 10,
	})
if err != nil {
    // handle err
}
defer cli.Close()

db, err := cli.CreateDatabase(context.Background(), "DATABASE NAME")
Examples

See example about how to use this package to communicate with TencentCloud VectorDB

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL