|
Entropic 2.14.3
Local-first agentic inference engine
|
Which grammar source constrains a decode (gh#134). More...


Go to the source code of this file.
Namespaces | |
| namespace | entropic |
| Activate model on GPU (WARM → ACTIVE). | |
Enumerations | |
| enum class | entropic::GrammarSource { entropic::none , entropic::request , entropic::tier , entropic::tool_call , entropic::count } |
| Which source, if any, constrains the decode. More... | |
Functions | |
| constexpr int | entropic::grammar_source_count () |
| Number of declared grammar sources, sentinel excluded. | |
| GrammarSource | entropic::resolve_grammar_source (const std::string &request_grammar, const std::string &tool_grammar, bool request_from_tier=false) |
| Resolve which grammar wins. | |
| bool | entropic::is_request_grammar (GrammarSource source) |
| Whether a source is applied as a request-side grammar. | |
| bool | entropic::tier_grammar_unresolved (const GenerationParams ¶ms) |
| A TIER named a grammar and nothing resolved it (gh#154). | |
| const char * | entropic::grammar_source_name (GrammarSource source) |
| Stable wire name for a grammar source. | |
| bool | entropic::grammar_sources_collide (const std::string &request_grammar, const std::string &tool_grammar) |
| Whether both sources are active — a config error worth reporting. | |
| GrammarProvenance | entropic::describe_grammar (const GenerationParams ¶ms, const std::string &tool_grammar) |
| Describe what constrained one decode, for the result record (gh#154). | |
Which grammar source constrains a decode (gh#134).
Entropic has two grammar sources and they cannot compose — they constrain output to different languages:
GenerationParams::grammar, also fed by grammar_key and identity grammar:)common_chat_templates_applyKept as a pure function with no vendor types so the precedence rule — the only part carrying judgment — is unit-testable without a model. Before v2.10.4 the tool-call source was discarded at the render entirely, so a tools-staged tier decoded unconstrained; see llama_cpp_backend.cpp.
Definition in file grammar_source.h.