bailian

package
v2.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEmbedder

func NewEmbedder(ctx context.Context, cfg *EmbeddingConfig) (embedding.Embedder, error)

Types

type Embedder

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

func (*Embedder) EmbedStrings

func (e *Embedder) EmbedStrings(ctx context.Context, texts []string, opts ...embedding.Option) ([][]float64, error)

func (*Embedder) EmbedStringsExt

func (e *Embedder) EmbedStringsExt(ctx context.Context, texts []string, opts ...embedding.Option) (*domain.EmbeddingsResponse, error)

type EmbeddingConfig

type EmbeddingConfig struct {
	APIKey         string
	Model          string
	BaseURL        string
	Dimension      *int
	TextType       *string
	OutputType     *string
	EncodingFormat *string
	Instruct       *string
}

Jump to

Keyboard shortcuts

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