Documentation
¶
Overview ¶
Package google implements agent.ChatModel against the Google Gemini Generative Language API. The package uses only net/http and encoding/json.
Wire reference:
Index ¶
Constants ¶
View Source
const DefaultAPIVersion = "v1beta"
DefaultAPIVersion targets the v1beta surface, which is where function-calling and SSE streaming both live; the v1 surface lags.
View Source
const DefaultBaseURL = "https://generativelanguage.googleapis.com"
DefaultBaseURL is the production Generative Language API endpoint.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Provider)
Option configures a Provider during construction.
func WithAPIVersion ¶
WithAPIVersion overrides the API version (default v1beta).
func WithHTTPClient ¶
WithHTTPClient overrides the HTTP client.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements agent.ChatModel against the Gemini API.
func (*Provider) Generate ¶
func (p *Provider) Generate(ctx context.Context, req agent.ChatRequest) (agent.ChatResponse, error)
Generate dispatches a synchronous generateContent request.
Click to show internal directories.
Click to hide internal directories.