pinecone

package
v0.0.0-...-2e32b89 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 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 Pinecone

type Pinecone struct {
	Endpoint string
	ApiKey   string
}

func New

func New(endpoint string, apiKey string) (*Pinecone, error)

func (*Pinecone) Retrieve

func (p *Pinecone) Retrieve(questionEmbedding []float32, topK int, uuid string) ([]vectordb.QueryMatch, error)

func (*Pinecone) UpsertEmbeddings

func (p *Pinecone) UpsertEmbeddings(embeddings [][]float32, chunks []chunk.Chunk, uuid string) error

type PineconeQueryItem

type PineconeQueryItem struct {
	Values []float32 `json:"values"`
}

type PineconeQueryRequest

type PineconeQueryRequest struct {
	TopK            int                 `json:"topK"`
	IncludeMetadata bool                `json:"includeMetadata"`
	Namespace       string              `json:"namespace"`
	Queries         []PineconeQueryItem `json:"queries"`
}

type PineconeQueryResponse

type PineconeQueryResponse struct {
	Results []PineconeQueryResponseResult `json:"results"`
}

type PineconeQueryResponseResult

type PineconeQueryResponseResult struct {
	Matches []vectordb.QueryMatch `json:"matches"`
}

type PineconeVector

type PineconeVector struct {
	ID       string            `json:"id"`
	Values   []float32         `json:"values"`
	Metadata map[string]string `json:"metadata,omitempty"`
}

Jump to

Keyboard shortcuts

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