GoFlowGoFlow
GuideLLMs

Google Gemini

Using Google Gemini models with GoFlow

Supported Models

ModelContextBest For
gemini-1.5-pro2MMost capable, massive context window
gemini-1.5-flash1MFast, efficient, large context
gemini-1.5-flash-8b1MHigh throughput, lowest cost
gemini-1.0-pro32KLegacy usage

Usage

Initialization

import "github.com/nuulab/goflow/pkg/llm/gemini"
 
// Default: gemini-1.5-flash
llm := gemini.New("")
 
// Specify model
llm := gemini.New("", gemini.WithModel("gemini-1.5-pro"))
 
// With custom options
llm := gemini.New("AIza-your-key",
    gemini.WithModel("gemini-1.5-pro"),
    gemini.WithTimeout(120*time.Second),
)

On this page