Versions in this module Expand all Collapse all v0 v0.2.0 Feb 8, 2026 Changes in this version + type GenOptionImage struct + Background Background + func (o *GenOptionImage) Validate() error + type GenOptionText struct + ReasoningEffort ReasoningEffort + ServiceTier ServiceTier + func (o *GenOptionText) Validate() error type ReasoningEffort + const ReasoningEffortMinimal + const ReasoningEffortNone + const ReasoningEffortXHigh + func (r ReasoningEffort) Validate() error type ServiceTier + func (s ServiceTier) Validate() error v0.1.0 Feb 5, 2026 Changes in this version + func ProcessStream(chunks iter.Seq[ChatStreamChunkResponse]) (iter.Seq[genai.Reply], func() (genai.Usage, [][]genai.Logprob, error)) + func Scoreboard() scoreboard.Score + type Annotation struct + Type string + URLCitation struct{ ... } + type Background string + const BackgroundAuto + const BackgroundOpaque + const BackgroundTransparent + type Batch struct + CancelledAt base.Time + CancellingAt base.Time + CompletedAt base.Time + CompletionWindow string + CreatedAt base.Time + Endpoint string + ErrorFileID string + Errors struct{ ... } + ExpiredAt base.Time + ExpiresAt base.Time + FailedAt base.Time + FinalizingAt base.Time + ID string + InProgressAt base.Time + InputFileID string + Metadata map[string]string + Model string + Object string + OutputFileID string + RequestCounts struct{ ... } + Status string + Usage BatchUsage + type BatchRequest struct + CompletionWindow string + Endpoint string + InputFileID string + Metadata map[string]string + type BatchRequestInput struct + Body ChatRequest + CustomID string + Method string + URL string + type BatchRequestOutput struct + CustomID string + Error struct{ ... } + ID string + Response struct{ ... } + type BatchUsage struct + InputTokens int64 + InputTokensDetails struct{ ... } + OutputTokens int64 + OutputTokensDetails struct{ ... } + TotalTokens int64 + type ChatRequest struct + Audio struct{ ... } + FrequencyPenalty float64 + LogitBias map[string]float64 + Logprobs bool + MaxChatTokens int64 + MaxTokens int64 + Messages []Message + Metadata map[string]string + Modalities []string + Model string + N int64 + ParallelToolCalls bool + Prediction struct{ ... } + PresencePenalty float64 + ReasoningEffort ReasoningEffort + ResponseFormat struct{ ... } + Seed int64 + ServiceTier ServiceTier + Stop []string + Store bool + Stream bool + StreamOptions struct{ ... } + Temperature float64 + ToolChoice string + Tools []Tool + TopLogprobs int64 + TopP float64 + User string + WebSearchOptions *WebSearchOptions + func (c *ChatRequest) Init(msgs genai.Messages, model string, opts ...genai.GenOptions) error + func (c *ChatRequest) SetStream(stream bool) + type ChatResponse struct + Choices []struct{ ... } + Created base.Time + ID string + Model string + Object string + ServiceTier string + SystemFingerprint string + Usage Usage + func (c *ChatResponse) ToResult() (genai.Result, error) + type ChatStreamChunkResponse struct + Choices []struct{ ... } + Created base.Time + ID string + Model string + Obfuscation string + Object string + ServiceTier string + SystemFingerprint string + Usage Usage + type Client struct + func New(ctx context.Context, opts ...genai.ProviderOption) (*Client, error) + func (c *Client) CacheAddRequest(ctx context.Context, msgs genai.Messages, name, displayName string, ...) (string, error) + func (c *Client) CacheDelete(ctx context.Context, name string) error + func (c *Client) CacheList(ctx context.Context) ([]genai.CacheEntry, error) + func (c *Client) Cancel(ctx context.Context, id genai.Job) error + func (c *Client) CancelRaw(ctx context.Context, id genai.Job) (Batch, error) + func (c *Client) Capabilities() genai.ProviderCapabilities + func (c *Client) FileAdd(ctx context.Context, filename string, r io.ReadSeeker) (string, error) + func (c *Client) FileDel(ctx context.Context, id string) error + func (c *Client) FileGet(ctx context.Context, id string) (io.ReadCloser, error) + func (c *Client) FilesListRaw(ctx context.Context) ([]File, error) + func (c *Client) GenAsync(ctx context.Context, msgs genai.Messages, opts ...genai.GenOptions) (genai.Job, error) + func (c *Client) GenAsyncRaw(ctx context.Context, b BatchRequest) (Batch, error) + func (c *Client) GenStream(ctx context.Context, msgs genai.Messages, opts ...genai.GenOptions) (iter.Seq[genai.Reply], func() (genai.Result, error)) + func (c *Client) GenStreamRaw(ctx context.Context, in *ChatRequest) (iter.Seq[ChatStreamChunkResponse], func() error) + func (c *Client) GenSync(ctx context.Context, msgs genai.Messages, opts ...genai.GenOptions) (genai.Result, error) + func (c *Client) GenSyncRaw(ctx context.Context, in *ChatRequest, out *ChatResponse) error + func (c *Client) HTTPClient() *http.Client + func (c *Client) ListModels(ctx context.Context) ([]genai.Model, error) + func (c *Client) ModelID() string + func (c *Client) Name() string + func (c *Client) OutputModalities() genai.Modalities + func (c *Client) PokeResult(ctx context.Context, id genai.Job) (genai.Result, error) + func (c *Client) PokeResultRaw(ctx context.Context, id genai.Job) (Batch, error) + func (c *Client) Scoreboard() scoreboard.Score + type Content struct + File struct{ ... } + ImageURL struct{ ... } + InputAudio struct{ ... } + Text string + Type ContentType + func (c *Content) FromReply(in *genai.Reply) error + func (c *Content) FromRequest(in *genai.Request) error + func (c *Content) To(out *genai.Reply) error + type ContentType string + const ContentAudio + const ContentFile + const ContentImageURL + const ContentInputAudio + const ContentRefusal + const ContentText + type Contents []Content + func (c *Contents) UnmarshalJSON(b []byte) error + type ErrorResponse struct + ErrorVal ErrorResponseError + func (er *ErrorResponse) Error() string + func (er *ErrorResponse) IsAPIError() bool + type ErrorResponseError struct + Code string + Message string + Param string + Status string + Type string + type File struct + Bytes int64 + CreatedAt base.Time + ExpiresAt base.Time + Filename string + ID string + Object string + Purpose string + Status string + StatusDetails string + func (f *File) GetDisplayName() string + func (f *File) GetExpiry() time.Time + func (f *File) GetID() string + type FileDeleteResponse struct + Deleted bool + ID string + Object string + type FileListResponse struct + Data []File + Object string + type FinishReason string + const FinishContentFilter + const FinishLength + const FinishStop + const FinishToolCalls + func (f FinishReason) ToFinishReason() genai.FinishReason + type GenOptionsImage struct + Background Background + func (o *GenOptionsImage) Validate() error + type GenOptionsText struct + ReasoningEffort ReasoningEffort + ServiceTier ServiceTier + func (o *GenOptionsText) Validate() error + type ImageChoiceData struct + B64JSON []byte + RevisedPrompt string + URL string + type ImageRequest struct + Background Background + Model string + Moderation string + N int64 + OutputCompression float64 + OutputFormat string + Prompt string + Quality string + ResponseFormat string + Size string + Style string + User string + func (i *ImageRequest) Init(msg genai.Message, model string, opts ...genai.GenOptions) error + type ImageResponse struct + Background string + Created base.Time + Data []ImageChoiceData + OutputFormat string + Quality string + Size string + Usage struct{ ... } + type Logprobs struct + Content []struct{ ... } + Refusal string + func (l *Logprobs) To() [][]genai.Logprob + type Message struct + Annotations []Annotation + Audio struct{ ... } + Content Contents + Name string + Refusal string + Role string + ToolCallID string + ToolCalls []ToolCall + func (m *Message) From(in *genai.Message) error + func (m *Message) To(out *genai.Message) error + type Model struct + Created base.Time + ID string + Object string + OwnedBy string + func (m *Model) Context() int64 + func (m *Model) GetID() string + func (m *Model) String() string + type ModelsResponse struct + Data []Model + Object string + func (r *ModelsResponse) ToModels() []genai.Model + type ReasoningEffort string + const ReasoningEffortHigh + const ReasoningEffortLow + const ReasoningEffortMedium + type ServiceTier string + const ServiceTierAuto + const ServiceTierDefault + const ServiceTierFlex + type Tool struct + Function struct{ ... } + Type string + type ToolCall struct + Function struct{ ... } + ID string + Index int64 + Type string + func (t *ToolCall) From(in *genai.ToolCall) error + func (t *ToolCall) To(out *genai.ToolCall) + type Usage struct + CompletionTokens int64 + CompletionTokensDetails struct{ ... } + PromptTokens int64 + PromptTokensDetails struct{ ... } + TotalTokens int64 + type WebSearchOptions struct + SearchContextSize string + UserLocation struct{ ... }