gem

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultModel    = "gemini-2.5-pro-preview-03-25"
	GeminiAPIKeyEnv = "GEMINI_API_KEY"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	HTTPC   *http.Client // defaults to http.DefaultClient if nil
	URL     string       // Gemini API URL, uses the gemini package default if empty
	APIKey  string       // must be non-empty
	Model   string       // defaults to DefaultModel if empty
	DumpLLM bool         // whether to dump request/response text to files for debugging; defaults to false
}

Service provides Gemini completions. Fields should not be altered concurrently with calling any method on Service.

func (*Service) Do

func (s *Service) Do(ctx context.Context, ir *llm.Request) (*llm.Response, error)

Do sends a request to Gemini.

func (*Service) TokenContextWindow

func (s *Service) TokenContextWindow() int

TokenContextWindow returns the maximum token context window size for this service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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