Documentation
¶
Overview ¶
Package gemini integrates the Gemini Developer API text/function subset using official Google GenAI SDK content types and bounded streaming I/O.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrProtocol = errors.New("gemini: invalid protocol or history") ErrIncomplete = errors.New("gemini: incomplete model response") ErrRemote = errors.New("gemini: provider reported an error") ErrLimit = errors.New("gemini: protocol resource limit exceeded") ErrTransport = errors.New("gemini: transport failed") ErrUnsupported = errors.New("gemini: unsupported content or response mode") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
New uses no implicit environment credentials, default destinations, background execution, retries or remote conversation state.
func (*Client) Complete ¶
func (c *Client) Complete(ctx context.Context, req agent.ModelRequest, emit func(string) error) (agent.ModelResponse, error)
func (*Client) NativeHistoryFormat ¶
type Config ¶
type Config struct {
BaseURL string
Model string
APIKey string
MaxOutputTokens int32
NativeHistoryScope string
// AllowUnsignedToolCalls opts into older models that do not supply
// thought signatures. By default the first function part needs one.
AllowUnsignedToolCalls bool
HTTPClient *http.Client
}
Config is explicit. BaseURL includes the API version (e.g. /v1beta). NativeHistoryScope is a non-secret caller label for one trusted model, account and conversation. It is not an ACL or an integrity mechanism.