bedrock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultLoadConfigTimeout = 30 * time.Second

DefaultLoadConfigTimeout bounds AWS SDK default configuration loading during backend construction. Composition roots calling NewWithContext should wrap their context with context.WithTimeout using this duration (or shorter) unless it already carries a deadline.

View Source
const ID = "bedrock"

ID is the reserved plugin identifier for the Bedrock backend.

Variables

This section is empty.

Functions

func ConverseStreamInputForCall

func ConverseStreamInputForCall(call *lipapi.Call, cand routing.AttemptCandidate) (*bedrockruntime.ConverseStreamInput, error)

ConverseStreamInputForCall maps a canonical call to Bedrock ConverseStream input. It runs lipapi.Call.Validate so numeric bounds (e.g. max_output_tokens for int32 fields) hold even when callers bypass the executor.

func ModelCapabilities

func ModelCapabilities(modelID string) lipapi.BackendCaps

ModelCapabilities returns negotiated backend caps for a Bedrock foundation model id / ARN.

func NewWithContext

func NewWithContext(ctx context.Context, cfg Config) execbackend.Backend

NewWithContext returns a runtime backend, using ctx for awsconfig.LoadDefaultConfig. A deadline is always applied for the load step: either ctx's own deadline, or DefaultLoadConfigTimeout when ctx is nil or uncancelled without a deadline.

Types

type Config

type Config struct {
	Region          string
	AccessKeyID     string
	SecretAccessKey string
	SessionToken    string
	// BaseEndpoint is optional (e.g. httptest server URL for integration tests).
	BaseEndpoint string
	// DisableHTTPS must be true when BaseEndpoint is http:// (emulator).
	DisableHTTPS bool
	HTTPClient   *http.Client
}

Config configures the Bedrock Runtime ConverseStream connector (AWS SDK v2).

Jump to

Keyboard shortcuts

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