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: 9 Imported by: 0

Documentation

Overview

Package bedrock is a reference backend emulator for Amazon Bedrock Runtime Converse and ConverseStream. It is test-support only and must not be imported from lipcore or protocol plugins.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(cfg Config) http.Handler

NewHandler returns an http.Handler that emulates POST /model/{modelId}/converse and POST /model/{modelId}/converse-stream for the official AWS SDK v2 client.

Types

type Config

type Config struct {
	// AllowMissingAuthorization, if true, skips the presence check for the
	// Authorization header (SigV4 clients always send it).
	AllowMissingAuthorization bool
	// OnRequestBody is invoked with the full request body after a successful route
	// check and before the response is written.
	OnRequestBody func(body []byte)
	// ConverseJSON overrides the JSON body for Converse (non-stream). When empty, a
	// minimal completed Converse response is returned.
	ConverseJSON string
	// StreamEvents overrides the raw application/vnd.amazon.eventstream body for
	// ConverseStream. When empty, a minimal assistant text stream is returned.
	StreamEvents []byte
}

Config tunes the emulator handler.

Jump to

Keyboard shortcuts

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