A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
transform.h File Reference

Bounded deterministic encodings for model-facing content. More...

#include <cstddef>
#include <string>
#include <string_view>
#include <absl/status/statusor.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  a11
 
namespace  a11::sdk
 
namespace  a11::sdk::llm_context
 

Functions

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.
 
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.
 
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.
 
size_t a11::sdk::llm_context::EstimateTokens (std::string_view text)
 Estimate tokens from UTF-8 bytes; this is not a provider tokenizer.
 

Detailed Description

Bounded deterministic encodings for model-facing content.