google

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	types.BaseConfig
	ProjectID string `json:"project_id,omitempty"`
	Location  string `json:"location,omitempty"`
}

Config holds Google AI-specific configuration

func (*Config) Validate

func (c *Config) Validate() error

Validate validates Google-specific configuration

type Provider

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

Provider implements the Google AI provider

func NewProvider

func NewProvider() *Provider

NewProvider creates a new Google AI provider

func (*Provider) Close

func (p *Provider) Close() error

Close cleans up resources

func (*Provider) Complete

Complete performs a completion request

func (*Provider) EstimateTokens

func (p *Provider) EstimateTokens(ctx context.Context, messages []*types.Message, model string) (int, error)

EstimateTokens estimates token count for messages

func (*Provider) GetModels

func (p *Provider) GetModels(ctx context.Context) ([]*types.Model, error)

GetModels returns available Google AI models

func (*Provider) GetName

func (p *Provider) GetName() string

GetName returns the provider name

func (*Provider) Initialize

func (p *Provider) Initialize(config types.Config) error

Initialize sets up the provider with configuration

func (*Provider) Stream

func (p *Provider) Stream(ctx context.Context, req *types.CompletionRequest, callback types.StreamCallback) error

Stream performs a streaming completion request

func (*Provider) ValidateModel

func (p *Provider) ValidateModel(model string) error

ValidateModel checks if a model is supported

Jump to

Keyboard shortcuts

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