genkit

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package genkit provides Genkit-backed implementations of provider.Provider.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Instance

func Instance(ctx context.Context) *gk.Genkit

Instance returns the shared Genkit instance, initializing it lazily on first call. This instance has no plugins and is used for mock/test model definitions. Production providers use per-factory Genkit instances initialized with their specific plugin.

func NewAnthropicFoundryProvider

func NewAnthropicFoundryProvider(ctx context.Context, resource, model, apiKey, entraToken string, maxTokens int) (provider.Provider, error)

NewAnthropicFoundryProvider creates a provider for Anthropic on Azure AI Foundry.

func NewAnthropicProvider

func NewAnthropicProvider(ctx context.Context, apiKey, model, baseURL string, maxTokens int) (provider.Provider, error)

NewAnthropicProvider creates a provider backed by Genkit's Anthropic plugin.

func NewAzureOpenAIProvider

func NewAzureOpenAIProvider(ctx context.Context, resource, deploymentName, apiVersion, apiKey, entraToken string, maxTokens int) (provider.Provider, error)

NewAzureOpenAIProvider creates a provider for Azure OpenAI Service.

func NewBedrockProvider

func NewBedrockProvider(ctx context.Context, region, model, accessKeyID, secretAccessKey, sessionToken, baseURL string, maxTokens int) (provider.Provider, error)

NewBedrockProvider creates a provider for AWS Bedrock using an OpenAI-compatible endpoint. Wraps existing Bedrock implementation as a provider.Provider until a native Genkit plugin is available.

func NewGoogleAIProvider

func NewGoogleAIProvider(ctx context.Context, apiKey, model string, maxTokens int) (provider.Provider, error)

NewGoogleAIProvider creates a provider backed by Genkit's Google AI plugin (Gemini API).

func NewOllamaProvider

func NewOllamaProvider(ctx context.Context, model, serverAddress string, maxTokens int) (provider.Provider, error)

NewOllamaProvider creates a provider backed by Genkit's Ollama plugin.

func NewOpenAICompatibleProvider

func NewOpenAICompatibleProvider(ctx context.Context, providerName, apiKey, model, baseURL string, maxTokens int) (provider.Provider, error)

NewOpenAICompatibleProvider creates a provider for OpenAI-compatible endpoints. Used for OpenRouter, Copilot, Cohere, HuggingFace, llama.cpp, etc.

func NewOpenAIProvider

func NewOpenAIProvider(ctx context.Context, apiKey, model, baseURL string, maxTokens int) (provider.Provider, error)

NewOpenAIProvider creates a provider backed by Genkit's OpenAI plugin.

func NewVertexAIProvider

func NewVertexAIProvider(ctx context.Context, projectID, region, model, credentialsJSON string, maxTokens int) (provider.Provider, error)

NewVertexAIProvider creates a provider backed by Genkit's Vertex AI plugin.

Types

This section is empty.

Jump to

Keyboard shortcuts

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