Help us shape the future of Go! Take the 2026 Go Developer Survey

gemini

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package gemini implements the Google Gemini provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New creates a new Google Gemini provider.

Types

type ModelData

type ModelData struct {
	Name             string `json:"name"` // "models/gemini-1.5-pro"
	DisplayName      string `json:"displayName"`
	Description      string `json:"description"`
	InputTokenLimit  int    `json:"inputTokenLimit"`
	OutputTokenLimit int    `json:"outputTokenLimit"`
}

ModelData describes a single Gemini model.

type ModelsResponse

type ModelsResponse struct {
	Models []ModelData `json:"models"`
}

ModelsResponse is the response from GET /v1beta/models.

type Provider

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

func (*Provider) Capabilities

func (p *Provider) Capabilities() provider.ProviderCapabilities

func (*Provider) Chat

func (*Provider) Config

func (p *Provider) Config() provider.ProviderConfig

func (*Provider) CreateResponses

func (*Provider) ListModels

func (p *Provider) ListModels(ctx context.Context) ([]provider.ModelInfo, error)

ListModels fetches available Gemini models from GET /v1beta/models.

func (*Provider) StreamChat

Jump to

Keyboard shortcuts

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