Liking cljdoc? Tell your friends :D

llm.sdk.aws-eventstream

Decoder for the AWS vnd.amazon.eventstream binary frame format used by Bedrock /converse-stream and Kinesis. Spec: https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html

Each frame: [prelude (12 bytes)] [headers] [payload] [message-crc (4 bytes)] Prelude: [total-length (4 BE)] [headers-length (4 BE)] [prelude-crc (4 BE)] Each header: [name-len (1)] [name] [type (1)] [value-len (2 BE if variable)] [value]

We skip CRC validation (caller already trusts the AWS connection).

Decoder for the AWS vnd.amazon.eventstream binary frame format used by
Bedrock /converse-stream and Kinesis. Spec:
  https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html

Each frame:
  [prelude (12 bytes)] [headers] [payload] [message-crc (4 bytes)]
Prelude:
  [total-length (4 BE)] [headers-length (4 BE)] [prelude-crc (4 BE)]
Each header:
  [name-len (1)] [name] [type (1)] [value-len (2 BE if variable)] [value]

We skip CRC validation (caller already trusts the AWS connection).
raw docstring

frame->jsonclj

(frame->json {:keys [headers payload]})

Decode a frame's payload as JSON, returning a map with :event-type, :content-type, and :data (parsed JSON map).

Decode a frame's payload as JSON, returning a map with
:event-type, :content-type, and :data (parsed JSON map).
sourceraw docstring

frame-seqclj

(frame-seq is)

Lazy seq of decoded frames from an InputStream.

Lazy seq of decoded frames from an InputStream.
sourceraw docstring

read-frameclj

(read-frame in)

Read one frame from a DataInputStream. Returns {:headers {} :payload <bytes>} or nil at EOF.

Read one frame from a DataInputStream. Returns
{:headers {} :payload <bytes>} or nil at EOF.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close