qdrant

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidOptions = fmt.Errorf("invalid options")

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(o Options) (*Client, error)

func (*Client) ClearCollection

func (c *Client) ClearCollection(ctx context.Context) error

func (*Client) SearchPoints

func (s *Client) SearchPoints(ctx context.Context, vector []float32, numVectors int, scoreThreshold float32, filter any) ([]llm.Document, error)

SearchPoints queries the Qdrant collection for points based on the provided parameters.

func (*Client) UpsertPoints

func (s *Client) UpsertPoints(ctx context.Context, vectors [][]float32, payloads []map[string]interface{}) ([]string, error)

UpsertPoints updates or inserts points into the Qdrant collection.

type Options

type Options struct {
	Base                 *url.URL
	HTTP                 *http.Client
	APIKey               string
	ContentKey           string
	CollectionName       string
	CollectionVectorSize int
}

func DefaultOptions

func DefaultOptions() Options

Jump to

Keyboard shortcuts

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