pub enum ModelOutputProtocol {
Text,
HarmonyGptOss,
GemmaThought,
}Expand description
Typed wire protocol emitted by the model after prompt rendering.
This is carried per request because output-token policy and response parsing must agree on the exact model protocol. It must be selected from resolved model metadata rather than inferred from a user-facing model name.
Variants§
Text
Ordinary text output with no model-specific control-token protocol.
HarmonyGptOss
OpenAI Harmony output used by GPT-OSS checkpoints.
GemmaThought
Gemma’s native thought channel, including its ordinary-text header.
Implementations§
Source§impl ModelOutputProtocol
impl ModelOutputProtocol
Sourcepub const fn generated_control_token_texts(self) -> &'static [&'static str]
pub const fn generated_control_token_texts(self) -> &'static [&'static str]
Non-terminal control tokens that generation must be able to emit for
this protocol. Terminal <|call|> / <|return|> tokens remain owned
by the model’s typed EOS configuration.
Sourcepub const fn preserved_special_token_texts(self) -> &'static [&'static str]
pub const fn preserved_special_token_texts(self) -> &'static [&'static str]
Special-token text that skip-special decoding must preserve so the product parser can observe the complete protocol envelope.
Trait Implementations§
Source§impl Clone for ModelOutputProtocol
impl Clone for ModelOutputProtocol
Source§fn clone(&self) -> ModelOutputProtocol
fn clone(&self) -> ModelOutputProtocol
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more