gemini

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: Apache-2.0 Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gemini implements canonical-trajectory continuation through the Gemini GenerateContent streaming API.

Index

Constants

View Source
const (
	// DefaultModel is the stable Gemini model selected for the fast/slow study.
	DefaultModel = "gemini-3.5-flash"
	// ProviderStateType identifies a Gemini model Content object with preserved
	// thought signatures and function calls.
	ProviderStateType = "google.gemini.generate-content.model-content.v1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter streams Gemini output and preserves provider-authenticated thought signatures without requiring plaintext chain-of-thought retention.

func New

func New(config Config) (*Adapter, error)

New creates a Gemini continuation adapter.

func (*Adapter) Continue

func (adapter *Adapter) Continue(ctx context.Context, request continuation.Request, emit continuation.Emit) (continuation.Completion, error)

Continue implements continuation.Provider using SSE GenerateContent.

func (*Adapter) Descriptor

func (adapter *Adapter) Descriptor() continuation.Descriptor

Descriptor returns the immutable provider configuration.

type Config

type Config struct {
	APIKey        string
	Model         string
	Endpoint      string
	Phase         trajectory.Phase
	Effort        continuation.Effort
	ToolAuthority continuation.ToolAuthority
	// SpeechAuthority declares whether this provider's output may be voiced.
	// An unset value means voice; the fast/slow arrangement is what sets a
	// provider silent, and it does so explicitly.
	SpeechAuthority continuation.SpeechAuthority
	// AllowTools is a compatibility alias for ToolAuthorityExecute.
	AllowTools      bool
	IncludeThoughts bool
	// Temperature is omitted when nil. Zero gives the fast voice a stable
	// control decision without changing the slow reasoner's provider default.
	Temperature    *float64
	HTTPClient     *http.Client
	RequestTimeout time.Duration
}

Config configures one Gemini fast or slow continuation profile.

Jump to

Keyboard shortcuts

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