embeddings

package
v0.0.0-...-9a0c461 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenAI

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

func NewOpenAI

func NewOpenAI(opts ...Option) (*OpenAI, error)

func (*OpenAI) EmbedDocuments

func (o *OpenAI) EmbedDocuments(ctx context.Context, texts []string) ([][]float32, error)

func (*OpenAI) EmbedQuery

func (o *OpenAI) EmbedQuery(ctx context.Context, query string) ([]float32, error)

type Option

type Option func(*OpenAI)

func WithApiKey

func WithApiKey(apiKey string) Option

func WithBatchSize

func WithBatchSize(batchSize int) Option

func WithNewlines

func WithNewlines() Option

Jump to

Keyboard shortcuts

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