Versions in this module Expand all Collapse all v0 v0.11.43 Oct 19, 2026 v0.11.42 Oct 19, 2026 v0.11.41 Oct 18, 2026 Changes in this version + var ErrInvalidRequest = errors.New("invalid batch request") + var ErrMissing = errors.New("batch result missing") + var ErrRefused = errors.New("batch request refused") + var ErrTruncated = errors.New("batch response truncated at max tokens") + func IsRetryable(err error) bool + type ClaudeRequest struct + Key string + Params anthropic.MessageNewParams + type Client struct + func NewClient(gc *genai.Client, bucket *storage.BucketHandle, prefix string, opts ...Option) (*Client, error) + func (c *Client) Cancel(ctx context.Context, job Job) error + func (c *Client) Find(ctx context.Context, id string) (Job, bool, error) + func (c *Client) Results(ctx context.Context, job Job) iter.Seq2[Result, error] + func (c *Client) Status(ctx context.Context, job Job) (Status, error) + func (c *Client) SubmitClaude(ctx context.Context, id, model string, reqs []ClaudeRequest, ...) (Job, error) + func (c *Client) SubmitGemini(ctx context.Context, id, model string, reqs []GeminiRequest, ...) (Job, error) + type GeminiRequest struct + Config *genai.GenerateContentConfig + Contents []*genai.Content + Key string + type Job struct + ID string + InputURI string + Keys int + Model string + Name string + OutputPrefix string + Provider string + type Option func(*Client) error + func WithMetrics(genai *metrics.GenAI) Option + func WithResourceLabels(labels map[string]string) Option + func WithRetryConfig(cfg retry.RetryConfig) Option + type Refusal struct + Category string + Detail string + type Result struct + Err error + Key string + Refusal *Refusal + Stop string + Text string + Usage Usage + type Status struct + Failed int + Incomplete int + State genai.JobState + Succeeded int + Terminal bool + type SubmitOption func(*submitConfig) error + type Usage struct + CacheRead int64 + CacheWrite int64 + In int64 + Out int64