bedrock

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const ProviderOptionCacheRetention = "cache_retention"

Variables

This section is empty.

Functions

func Factory

func Factory(cfg Config) (litellm.Provider, error)

func NewClient

func NewClient(cfg Config, opts ...litellm.ClientOption) (*litellm.Client, error)

NewClient builds the provider from cfg and wraps it in a ready *litellm.Client. It is a convenience for the common single-provider case. It calls New(cfg) and then litellm.New(provider, opts...).

func SigningTransport

func SigningTransport(credentials CredentialsProvider, region string, base http.RoundTripper) http.RoundTripper

Types

type Config

type Config struct {
	Region              string
	BaseURL             string
	ControlPlaneBaseURL string
	Credentials         CredentialsProvider
	HTTPClient          HTTPClient
	Transport           http.RoundTripper
	Retry               *retry.Policy
}

type Credentials

type Credentials struct {
	AccessKeyID     string
	SecretAccessKey string
	SessionToken    string
	Region          string
}

type CredentialsProvider

type CredentialsProvider interface {
	Credentials(context.Context) (Credentials, error)
}

func StaticCredentials

func StaticCredentials(accessKeyID, secretAccessKey, sessionToken string) CredentialsProvider

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type Provider

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

func New

func New(cfg Config) (*Provider, error)

func (*Provider) Capabilities added in v1.8.1

func (p *Provider) Capabilities(model string) litellm.Capabilities

func (*Provider) Chat

func (p *Provider) Chat(ctx context.Context, req *litellm.Request) (*litellm.Response, error)

func (*Provider) ListModels

func (p *Provider) ListModels(ctx context.Context) ([]litellm.ModelInfo, error)

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) Stream

func (p *Provider) Stream(ctx context.Context, req *litellm.Request) (litellm.Stream, error)

Jump to

Keyboard shortcuts

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