Documentation
¶
Index ¶
Constants ¶
View Source
const Domain = "generativelanguage.googleapis.com"
Variables ¶
This section is empty.
Functions ¶
func RetryAfterFromResponse ¶
RetryAfterFromResponse extracts the server-advised retry delay from a Gemini API error response body (a google.rpc.RetryInfo entry, e.g. "retryDelay": "43s"). It returns nil when the body carries no such hint. It satisfies retry_config.RetryAfterFunc, so callers can wire it into a retry configuration to honour the API's own rate-limit timing instead of relying on back-off alone.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(options ...gemini_config.Option) *Client
func (*Client) GenerateContent ¶
func (c *Client) GenerateContent( ctx context.Context, model string, request *generate_content_request.GenerateContentRequest, options ...fetch_config.Option, ) (*generate_content_response.GenerateContentResponse, error)
GenerateContent generates a model response for the given request. https://ai.google.dev/api/generate-content
Click to show internal directories.
Click to hide internal directories.