google

package
v1.1.66 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultModels

func DefaultModels(providerName string) []*provider.Model

Types

type APIKind

type APIKind string
const (
	APIKindGemini APIKind = "gemini"
	APIKindVertex APIKind = "vertex"
)

type Provider

type Provider struct {
	provider.BaseProvider
	// contains filtered or unexported fields
}

func NewGeminiProvider

func NewGeminiProvider(apiKey, baseURL string) *Provider

func NewGeminiProviderWithModels

func NewGeminiProviderWithModels(apiKey, baseURL string, models []*provider.Model) *Provider

func NewGeminiProviderWithModelsAndOptions

func NewGeminiProviderWithModelsAndOptions(apiKey, baseURL string, models []*provider.Model, opts provider.HTTPClientOptions) (*Provider, error)

func NewGeminiProviderWithModelsAndProxy

func NewGeminiProviderWithModelsAndProxy(apiKey, baseURL, proxyURL string, models []*provider.Model) (*Provider, error)

func NewVertexProvider

func NewVertexProvider(apiKey, baseURL string) *Provider

func NewVertexProviderWithModels

func NewVertexProviderWithModels(apiKey, baseURL string, models []*provider.Model) *Provider

func NewVertexProviderWithModelsAndOptions

func NewVertexProviderWithModelsAndOptions(apiKey, baseURL string, models []*provider.Model, opts provider.HTTPClientOptions) (*Provider, error)

func NewVertexProviderWithModelsAndProxy

func NewVertexProviderWithModelsAndProxy(apiKey, baseURL, proxyURL string, models []*provider.Model) (*Provider, error)

func (*Provider) API

func (p *Provider) API() string

API returns the protocol/API type.

func (*Provider) Chat

func (p *Provider) Chat(ctx context.Context, params provider.ChatParams) <-chan provider.StreamEvent

func (*Provider) SetCachedContent

func (p *Provider) SetCachedContent(name string)

SetCachedContent sets an explicit Google cached content resource to reuse. The value should be a full cached content resource name, for example "cachedContents/abc123". Empty disables explicit cached content reuse.

func (*Provider) SetHeaders

func (p *Provider) SetHeaders(headers map[string]string)

SetHeaders sets custom HTTP headers applied to every provider request.

func (*Provider) SetRetryConfig

func (p *Provider) SetRetryConfig(cfg *provider.RetryConfig)

Jump to

Keyboard shortcuts

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