pinecone

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateIndexOptions

type CreateIndexOptions struct {
	Dimension int
	Replicas  int
	Metric    string
	PodType   string
}

type Index

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

func New

func New(options Options, embedder index.Embedder) *Index

func (*Index) Add added in v0.0.11

func (p *Index) Add(ctx context.Context, item *index.Data) error

func (*Index) IsEmpty

func (p *Index) IsEmpty(ctx context.Context) (bool, error)

func (*Index) LoadFromDocuments

func (p *Index) LoadFromDocuments(ctx context.Context, documents []document.Document) error

func (*Index) Query added in v0.0.11

func (p *Index) Query(ctx context.Context, query string, opts ...option.Option) (index.SearchResults, error)

func (*Index) Search added in v0.0.11

func (p *Index) Search(ctx context.Context, values []float64, opts ...option.Option) (index.SearchResults, error)

func (*Index) WithAPIKeyAndEnvironment

func (p *Index) WithAPIKeyAndEnvironment(apiKey, environment string) *Index

type Options

type Options struct {
	IndexName       string
	Namespace       string
	IncludeContent  bool
	IncludeValues   bool
	BatchUpsertSize *int
	CreateIndex     *CreateIndexOptions
}

Jump to

Keyboard shortcuts

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