gemini

package
v0.68.21 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

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

Provider implements live.LiveProvider using the Google GenAI Live API.

func New

func New() *Provider

New creates a Gemini Live provider.

func (*Provider) Close added in v0.64.3

func (g *Provider) Close() error

func (*Provider) Connect added in v0.64.3

func (g *Provider) Connect(ctx context.Context, cfg live.LiveConfig) error

func (*Provider) Name added in v0.64.3

func (g *Provider) Name() string

func (*Provider) Receive added in v0.64.3

func (g *Provider) Receive(ctx context.Context) (*live.LiveMessage, error)

func (*Provider) Reconnect added in v0.64.3

func (g *Provider) Reconnect(ctx context.Context) error

Reconnect re-establishes the session using the stored resumption handle. If the handle has expired (TTL) or been cleared, a fresh session is opened.

func (*Provider) SendAudio added in v0.64.3

func (g *Provider) SendAudio(chunk []byte) error

live.ShouldTryFallback reports whether a fallback model is worth attempting when the primary fails. The fallback must be non-empty and different from the primary; otherwise the second attempt would just re-trigger the same failure.

func (*Provider) SendAudioStreamEnd added in v0.64.3

func (g *Provider) SendAudioStreamEnd() error

func (*Provider) SendText added in v0.64.3

func (g *Provider) SendText(text string) error

func (*Provider) SendToolResponse added in v0.64.3

func (g *Provider) SendToolResponse(response live.ToolResponse) error

func (*Provider) SessionCapabilities added in v0.64.3

func (g *Provider) SessionCapabilities() live.SessionCapabilities

Jump to

Keyboard shortcuts

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