Parser for Granite 3.2 model output. Parser which receives Granite 3.2 model output and returns the constituents of the output. The input to the parser is assumed to be as follows:Documentation Index
Fetch the complete documentation index at: https://docs.mellea.ai/llms.txt
Use this file to discover all available pages before exploring further.
- “citations”: List of citations
- “docs”: List of document references
- “hallucinations”: List of hallucinations
- “response”: Model response text without the above constituents
AssistantMessage.
Classes
CLASS Granite32OutputProcessor
Output processor for version 3.2 of the main Granite models, all sizes.
Methods:
FUNC transform
model_output: Raw text output from the Granite 3.2 model.chat_completion: The original chat completion request that producedmodel_output. Used to determine which output features (thinking, tools, citations, hallucinations) to parse. Defaults toNone.
- A :class:
Granite3AssistantMessagecontaining the parsed response text, optional tool calls, chain-of-thought reasoning, citations, documents, and hallucination annotations.
ValueError: If parsing citations, documents, or hallucinations from the model output fails.