Versions in this module Expand all Collapse all v0 v0.2.0 Aug 17, 2026 Changes in this version + const DefaultModel + var ErrBudgetExhausted = errors.New("model budget for this job is exhausted") + var ErrNoCredentials = errors.New(...) + func HasCredentials(explicit string) bool + type Client struct + func New(opts Options) (*Client, error) + func (c *Client) Ask(ctx context.Context, system string, blocks []ContentBlock) (*Result, error) + func (c *Client) Model() string + func (c *Client) Usage() Usage + type ContentBlock struct + B64 string + MediaType string + Text string + func ImageBlock(mediaType string, b64 string) ContentBlock + func TextBlock(s string) ContentBlock + func (b ContentBlock) IsImage() bool + type Options struct + APIKey string + BaseURL string + Budget int64 + Effort string + MaxTokens int64 + Model string + Timeout time.Duration + type Result struct + Latency time.Duration + RefusalCategory string + Refused bool + StopReason string + Text string + Usage Usage + type Usage struct + CacheReadTokens int64 + CacheWriteTokens int64 + Calls int + InputTokens int64 + OutputTokens int64 + func (u *Usage) Add(o Usage) + func (u Usage) Total() int64