qdrant

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCollectionName = "tapes"
	PayloadIDKey          = "id"
	PayloadHashKey        = "hash"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Hostname of the Qdrant server. Defaults to "localhost".
	Host string
	// gRPC port of the Qdrant server. Defaults to 6334.
	Port int
	// API key to use for authentication. Defaults to "".
	APIKey string
	// Whether to use TLS for the connection. Defaults to false.
	UseTLS bool
	// Name of the collection to use.
	CollectionName string
	// Dimensions for the embedding vectors.
	Dimensions uint64
}

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

func NewDriver

func NewDriver(c Config, log *slog.Logger) (*Driver, error)

func (*Driver) Add

func (d *Driver) Add(ctx context.Context, docs []vector.Document) error

func (*Driver) Close

func (d *Driver) Close() error

func (*Driver) Delete

func (d *Driver) Delete(ctx context.Context, ids []string) error

func (*Driver) Get

func (d *Driver) Get(ctx context.Context, ids []string) ([]vector.Document, error)

func (*Driver) Query

func (d *Driver) Query(ctx context.Context, embedding []float32, topK int) ([]vector.QueryResult, error)

Jump to

Keyboard shortcuts

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