m3e

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type M3E

type M3E struct {
	Model string
	Url   string
	SK    string
	// contains filtered or unexported fields
}

M3E is the embedder using the M3E.

func NewEmbedding

func NewEmbedding(opts ...Option) (*M3E, error)

func (*M3E) EmbedDocuments

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

func (*M3E) EmbedQuery

func (e *M3E) EmbedQuery(ctx context.Context, text string) ([]float32, error)

type Option

type Option func(p *M3E)

Option is a function type that can be used to modify the client.

func WithModel

func WithModel(model string) Option

WithModel is an option for providing the model name to use.

func WithSK

func WithSK(sk string) Option

WithSK is an option for providing the task to call the model with.

func WithUrl

func WithUrl(url string) Option

WithUrl is an option for providing the task to call the model with.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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