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 ¶
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.
Click to show internal directories.
Click to hide internal directories.