gemini

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package gemini implements the model.LLM interface for Google Gemini models.

This implementation is strictly aligned with ADK-Go's gemini provider:

  • Uses the official google.golang.org/genai SDK
  • Implements unified GenerateContent with streaming aggregator
  • Proper handling of partial/aggregated responses

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg Config) (model.LLM, error)

New creates a new Gemini model instance.

Types

type Config

type Config struct {
	// APIKey is the Google AI API key.
	APIKey string

	// Model is the model name (e.g., "gemini-2.0-flash", "gemini-1.5-pro").
	Model string

	// MaxTokens limits the response length.
	MaxTokens int

	// Temperature controls randomness (0-2).
	Temperature float64

	// TopP controls nucleus sampling.
	TopP float64

	// TopK controls top-k sampling.
	TopK int

	// MaxToolOutputLength limits the length of tool outputs.
	MaxToolOutputLength int
}

Config contains configuration for the Gemini model.

Jump to

Keyboard shortcuts

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