factory

package
v1.1.66 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureHeaders

func ConfigureHeaders(p provider.Provider, settings *config.Settings, providerName string)

ConfigureHeaders sets custom provider headers if the provider supports it.

func ConfigureRetry

func ConfigureRetry(p provider.Provider, settings *config.Settings)

ConfigureRetry sets retry config on a provider if it supports it.

func ConvertModelConfigs

func ConvertModelConfigs(providerName string, models []config.ModelConfig) []*provider.Model

ConvertModelConfigs converts config.ModelConfig to provider.Model.

func Create

func Create(settings *config.Settings, providerName, modelID string) (provider.Provider, *provider.Model, error)

Create creates a provider and model from settings without changing the config schema.

func CreateWithOptions

func CreateWithOptions(settings *config.Settings, providerName, modelID string, opts Options) (provider.Provider, *provider.Model, error)

CreateWithOptions creates a provider and model from settings with runtime-only options.

Types

type Options

type Options struct {
	BuiltinAnthropicCacheControl *bool
}

Options controls compatibility behavior outside the settings schema.

Jump to

Keyboard shortcuts

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