gemini

package
v0.0.0-...-0f11aa8 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Provider)

func WithModel

func WithModel(model string) Option

WithModel sets the target chat completion model.

type Provider

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

func New

func New(apiKey string, opts ...Option) (*Provider, error)

New constructs a Gemini compatible provider.

func (*Provider) Capabilities

func (p *Provider) Capabilities() provider.Capabilities

func (*Provider) GenerateEmbeddings

func (p *Provider) GenerateEmbeddings(ctx context.Context, texts []string) ([][]float32, error)

GenerateEmbeddings implements the Embedder interface for Gemini.

func (*Provider) GenerateStream

func (p *Provider) GenerateStream(ctx context.Context, messages []llm.Message, opts ...provider.GenerateOption) (<-chan llm.Part, error)

func (*Provider) ListModels

func (p *Provider) ListModels(ctx context.Context) ([]string, error)

Jump to

Keyboard shortcuts

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