|
A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
|
Functions | |
| absl::StatusOr< std::string > | CompactJson (std::string_view text, size_t max_bytes=8 *1024 *1024, size_t max_depth=128) |
| Return JSON with representation whitespace removed, preserving all tokens. | |
| absl::StatusOr< std::string > | Encode (std::string_view text, std::string_view format, size_t max_bytes=8 *1024 *1024) |
| Encode repeated lines or JSON key lexemes in a reversible JSON envelope. | |
| absl::StatusOr< std::string > | Expand (std::string_view encoded, size_t max_bytes=8 *1024 *1024) |
| Expand a context encoding, enforcing the expanded byte limit. | |
| size_t | EstimateTokens (std::string_view text) |
| Estimate tokens from UTF-8 bytes; this is not a provider tokenizer. | |
| absl::StatusOr< std::string > a11::sdk::llm_context::CompactJson | ( | std::string_view | text, |
| size_t | max_bytes = 8 *1024 *1024, |
||
| size_t | max_depth = 128 |
||
| ) |
Return JSON with representation whitespace removed, preserving all tokens.
| text | Complete UTF-8 JSON, including duplicate keys or large numbers. |
| max_bytes | Maximum admitted input size. |
| max_depth | Maximum nested object/array depth. |
| absl::StatusOr< std::string > a11::sdk::llm_context::Encode | ( | std::string_view | text, |
| std::string_view | format, | ||
| size_t | max_bytes = 8 *1024 *1024 |
||
| ) |
Encode repeated lines or JSON key lexemes in a reversible JSON envelope.
| text | Original UTF-8 content; JSON-key encoding requires valid JSON. |
| format | a11.lines/v1 or a11.json-keys/v1. |
| max_bytes | Maximum admitted input size. The output may be larger; callers selecting candidates count the full envelope overhead. |
| size_t a11::sdk::llm_context::EstimateTokens | ( | std::string_view | text | ) |
Estimate tokens from UTF-8 bytes; this is not a provider tokenizer.
| absl::StatusOr< std::string > a11::sdk::llm_context::Expand | ( | std::string_view | encoded, |
| size_t | max_bytes = 8 *1024 *1024 |
||
| ) |
Expand a context encoding, enforcing the expanded byte limit.
| encoded | Versioned encoding envelope produced by Encode. |
| max_bytes | Maximum encoded input and expanded output size. |