cohereembedder

package
v0.0.11-alpha1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Embedder

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

func New

func New() *Embedder

func (*Embedder) Embed

func (h *Embedder) Embed(ctx context.Context, texts []string) ([]embedder.Embedding, error)

Embed returns the embeddings for the given texts

func (*Embedder) WithAPIKey

func (e *Embedder) WithAPIKey(apiKey string) *Embedder

WithAPIKey sets the API key to use for the embedder

func (*Embedder) WithModel

func (e *Embedder) WithModel(model EmbedderModel) *Embedder

WithModel sets the model to use for the embedder

type EmbedderModel

type EmbedderModel = model.EmbedModel
const (
	EmbedderModelEnglishV20      EmbedderModel = model.EmbedModelEnglishV20
	EmbedderModelEnglishLightV20 EmbedderModel = model.EmbedModelEnglishLightV20
	EmbedderModelMultilingualV20 EmbedderModel = model.EmbedModelMultilingualV20
)

Jump to

Keyboard shortcuts

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