gemini

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const EmbeddingModelType string = "gemini"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name      string `yaml:"name" validate:"required"`
	Type      string `yaml:"type" validate:"required"`
	Model     string `yaml:"model" validate:"required"`
	ApiKey    string `yaml:"apiKey"`
	Dimension int32  `yaml:"dimension"`
}

func (Config) EmbeddingModelConfigType added in v0.27.0

func (cfg Config) EmbeddingModelConfigType() string

Returns the embedding model type

func (Config) Initialize

func (cfg Config) Initialize(ctx context.Context) (embeddingmodels.EmbeddingModel, error)

Initialize a Gemini embedding model

type EmbeddingModel

type EmbeddingModel struct {
	Client *genai.Client
	Config
}

func (EmbeddingModel) EmbedParameters

func (m EmbeddingModel) EmbedParameters(ctx context.Context, parameters []string) ([][]float32, error)

func (EmbeddingModel) EmbeddingModelType added in v0.27.0

func (m EmbeddingModel) EmbeddingModelType() string

Returns the embedding model type

func (EmbeddingModel) ToConfig

Jump to

Keyboard shortcuts

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