Interface TextWrapper<B>
- All Known Implementing Classes:
AnthropicTextWrapper, BedrockTextWrapper, OpenAITextWrapper
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Wraps a plain string into a provider's native text content block of type
B
(Anthropic ContentBlockParam, OpenAI ObjectNode, Bedrock ContentBlock).
The single provider-specific text primitive. BlockEncoders that render a block as text
hold a TextWrapper and call it; the per-block content string is the encoder's concern, the
string-to-native-block step is the wrapper's. One implementation per provider, reused by every text
encoder so the wrap is written exactly once.
- Since:
- 0.1 (2026-06-18)
- Author:
- Andrey Santrosyan
-
Method Summary
-
Method Details
-
wrap
-