Documentation
¶
Overview ¶
Package gemini implements the Google Gemini LLM provider for Nexus.
Supports both the public Generative Language API (api-key auth) and Vertex AI (service-account JWT auth). Feature parity with the OpenAI and Anthropic providers (sync + streaming, tool use, structured output, retry, cancel, debug logs, fallback hooks) plus Gemini-specific features: thinking parts (2.5 models), multimodal inputs (inline + Files API), code execution, and prompt caching via the cachedContents API.
Index ¶
- func New() engine.Plugin
- type BackoffStrategy
- type Plugin
- func (p *Plugin) Capabilities() []engine.Capability
- func (p *Plugin) ConfigSchema() []byte
- func (p *Plugin) Dependencies() []string
- func (p *Plugin) Emissions() []string
- func (p *Plugin) ID() string
- func (p *Plugin) Init(ctx engine.PluginContext) error
- func (p *Plugin) LiveCalls() uint64
- func (p *Plugin) Name() string
- func (p *Plugin) Ready() error
- func (p *Plugin) Requires() []engine.Requirement
- func (p *Plugin) Shutdown(_ context.Context) error
- func (p *Plugin) Subscriptions() []engine.EventSubscription
- func (p *Plugin) Version() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BackoffStrategy ¶
type BackoffStrategy string
BackoffStrategy defines how delays increase between retries.
const ( BackoffConstant BackoffStrategy = "constant" BackoffLinear BackoffStrategy = "linear" BackoffExponential BackoffStrategy = "exponential" BackoffJitter BackoffStrategy = "exponential_jitter" )
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin implements the Gemini LLM provider.
func (*Plugin) Capabilities ¶
func (p *Plugin) Capabilities() []engine.Capability
func (*Plugin) ConfigSchema ¶
ConfigSchema implements engine.ConfigSchemaProvider.
func (*Plugin) Dependencies ¶
func (*Plugin) LiveCalls ¶
LiveCalls returns the number of llm.request handler invocations that passed the replay short-circuit.
func (*Plugin) Requires ¶
func (p *Plugin) Requires() []engine.Requirement
func (*Plugin) Subscriptions ¶
func (p *Plugin) Subscriptions() []engine.EventSubscription