google

package
v1.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var APIKeyMeta = provider.ProviderMeta{
	Provider:    provider.ProviderGoogle,
	AuthMethod:  provider.AuthAPIKey,
	EnvVars:     []string{"GOOGLE_API_KEY"},
	DisplayName: "Direct API",
}

APIKeyMeta is the metadata for Google via API Key

Functions

func NewAPIKeyClient

func NewAPIKeyClient(ctx context.Context) (provider.LLMProvider, error)

NewAPIKeyClient creates a new Google client using API Key authentication

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements the LLMProvider interface using the Google GenAI SDK

func NewClient

func NewClient(client *genai.Client, name string) *Client

NewClient creates a new Google client with the given SDK client

func (*Client) ListModels

func (c *Client) ListModels(ctx context.Context) ([]provider.ModelInfo, error)

ListModels returns the available models for Google using the API

func (*Client) Name

func (c *Client) Name() string

Name returns the provider name

func (*Client) Stream

func (c *Client) Stream(ctx context.Context, opts provider.CompletionOptions) <-chan provider.StreamChunk

Stream sends a completion request and returns a channel of streaming chunks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL