geminigenerate

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package geminigenerate provides shared Gemini generateContent protocol execution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ModelCapabilities

func ModelCapabilities(model string) lipapi.BackendCaps

ModelCapabilities returns negotiated backend caps for a resolved Gemini model id.

func NewBackend

func NewBackend(cfg Config) execbackend.Backend

Types

type Config

type Config struct {
	BackendID      string
	BaseURL        string
	APIKey         string
	APIKeys        []string
	Credentials    []credpool.Credential
	HTTPClient     *http.Client
	ModelInventory modelinventory.Provider
}

type StreamParams

type StreamParams struct {
	Model    string
	Contents []*genai.Content
	Config   *genai.GenerateContentConfig
}

StreamParams holds inputs for genai.Models.GenerateContentStream.

func StreamParamsForCall

func StreamParamsForCall(call *lipapi.Call, cand routing.AttemptCandidate) (StreamParams, error)

StreamParamsForCall builds model, contents, and generate config from a canonical call. It runs lipapi.Call.Validate so numeric bounds (e.g. max_output_tokens for int32 fields) hold even when callers bypass the executor.

Jump to

Keyboard shortcuts

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