factory

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderOpenAI           = providers.ProviderOpenAI
	ProviderOpenAICompatible = providers.ProviderOpenAICompatible
	ProviderGoogle           = providers.ProviderGoogle
	ProviderVertex           = providers.ProviderVertex
	ProviderAnthropic        = providers.ProviderAnthropic
	ProviderBedrock          = providers.ProviderBedrock
	ProviderAzure            = providers.ProviderAzure
	ProviderMistral          = providers.ProviderMistral
	ProviderGroq             = providers.ProviderGroq
	ProviderDeepSeek         = providers.ProviderDeepSeek
	ProviderXAI              = providers.ProviderXAI
	ProviderCerebras         = providers.ProviderCerebras
	ProviderOpenRouter       = providers.ProviderOpenRouter
	ProviderCohere           = providers.ProviderCohere
)

Provider name constants — aliased from the providers package so callers that import factory.ProviderX continue to compile.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProviderLocator

type ProviderLocator interface {
	Get(provider string) (providers.Client, error)
	GetTester(provider string) (providers.ConnectionTester, error)
}

func NewProviderLocator

func NewProviderLocator() ProviderLocator

NewProviderLocator builds one client per provider up front and reuses it for the lifetime of the locator. Provider clients are stateless wrappers over an HTTP connection pool, so constructing a fresh one per request (as before) threw away connection reuse and defeated per-client caches (e.g. the Bedrock SDK client pool). The map is read-only after construction, so Get is safe for concurrent use.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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