huggingfaceembedder

package
v0.0.9-beta1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const APIBaseURL = "https://api-inference.huggingface.co/pipeline/feature-extraction/"

Variables

This section is empty.

Functions

This section is empty.

Types

type HuggingFaceEmbedder added in v0.0.9

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

func New

func New() *HuggingFaceEmbedder

func (*HuggingFaceEmbedder) Embed added in v0.0.9

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

func (*HuggingFaceEmbedder) WithModel added in v0.0.9

func (h *HuggingFaceEmbedder) WithModel(model string) *HuggingFaceEmbedder

func (*HuggingFaceEmbedder) WithToken added in v0.0.9

func (h *HuggingFaceEmbedder) WithToken(token string) *HuggingFaceEmbedder

Jump to

Keyboard shortcuts

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