Class BedrockFileBlockEncoder

java.lang.Object
ai.redouble.nucleo.harness.llm.encode.BlockEncoder<software.amazon.awssdk.services.bedrockruntime.model.ContentBlock>
ai.redouble.nucleo.harness.llm.encode.FileBlockEncoder<software.amazon.awssdk.services.bedrockruntime.model.ContentBlock>
ai.redouble.nucleo.providers.bedrock.BedrockFileBlockEncoder

public class BedrockFileBlockEncoder extends FileBlockEncoder<software.amazon.awssdk.services.bedrockruntime.model.ContentBlock>
Bedrock Converse native file: a document type Converse reads (PDF, Word, Excel, CSV, HTML, text, Markdown) becomes a ContentBlock.document carrying the decoded bytes, an image file becomes a ContentBlock.image (the image encoder's format mapping); any other type has no Converse representation and produces nothing.

Converse requires every document to carry a name of letters, digits, single spaces, hyphens, parentheses and square brackets, so the file name is reduced to those characters (the rest become spaces) and a file without a usable name is named document.

Since:
0.1 (2026-09-27)
Author:
Andrey Santrosyan
  • Constructor Details

    • BedrockFileBlockEncoder

      public BedrockFileBlockEncoder()
  • Method Details