Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Enable ¶
func Enable(apiKey, modelName, actionName string) sdk.ClientOption
Enable returns a ClientOption that wires the Google provider. usage: client.New(..., google.Enable("key", "gemini-pro", "my_action"))
func Factory ¶
func Factory(opts map[string]any) (sdk.ClientOption, error)
Factory implements the sdk.ProviderFactory interface for Config-driven loading.
func Init ¶
func Init(ctx context.Context, globalG *genkit.Genkit, apiKey string, modelName string, logger core.Logger) (string, error)
Init sets up the Google provider using a Proxy Pattern. It isolates the Google plugin in a local instance and registers a proxy in the global registry. logger receives a warning whenever the proxied request's GenerationConfig is dropped (see the workaround below) so the loss of Temperature/MaxOutputTokens is observable rather than silent.
Types ¶
type GoogleEmbedder ¶
type GoogleEmbedder struct {
// contains filtered or unexported fields
}
func NewEmbedder ¶
NewEmbedder creates a new embedder using Google GenAI. Default model: "embedding-001" or "text-embedding-004"
func (*GoogleEmbedder) Dimension ¶
func (e *GoogleEmbedder) Dimension() int