iso8583sim.llm.explainer
MessageExplainer
Explains ISO 8583 messages in plain English using an LLM.
This class uses an LLM provider to generate human-readable explanations
of ISO 8583 messages, making them easier to understand for developers
and analysts.
Example
“This is a VISA authorization request for $100.00…”
Initialize the MessageExplainer.
Parameters
provider LLMProvider | str | None
default: "None"
LLM provider to use. Can be:
LLMProvider instance: Use directly
str: Provider name (‘anthropic’, ‘openai’, ‘google’, ‘ollama’)
None: Auto-detect available provider
provider
Return the LLM provider being used.
explain()
Explain an ISO 8583 message in plain English.
Parameters
message ISO8583Message | str
required
ISO8583Message object or raw message string to explain
If True, include more technical details
Human-readable explanation of the message
explain_field()
Explain a specific ISO 8583 field value.
Parameters
The field number (e.g., 2, 39, 55)
The field value to explain
Human-readable explanation of the field and its value
explain_error()
Explain a validation or parsing error in context.
Parameters
The error message to explain
message ISO8583Message | str
required
The message that caused the error
Human-readable explanation of the error and how to fix it
explain_response_code()
Explain an ISO 8583 response code.
Parameters
The response code (e.g., “00”, “51”, “05”)
Human-readable explanation of the response code