Documentation
¶
Overview ¶
Package google implements llm.Model using the official Google Gen AI Go SDK.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements llm.Model backed by the Google Generative AI API.
func (*Provider) GenerateContent ¶
func (p *Provider) GenerateContent(ctx context.Context, messages []llm.Message, tools []llm.ToolDef, maxTokens int) (*llm.Response, error)
GenerateContent sends messages to the Gemini API and returns a normalised llm.Response.
func (*Provider) GenerateStructuredContent ¶
func (p *Provider) GenerateStructuredContent(ctx context.Context, messages []llm.Message, schema map[string]any, config llm.StructuredConfig) (*llm.Response, error)
GenerateStructuredContent sends a request to the Gemini API with a JSON Schema to enforce structured output.
Click to show internal directories.
Click to hide internal directories.