Skip to main content
Guardrails AI home page
Guardrails AI
Guardrails
Search...
⌘K
Ask AI
Search...
Navigation
Python
Formatters
Docs
Concepts
Tutorials
Integrations
API Reference
Blog
Community
Book Demo
Python
Actions
Errors
Formatters
Generics And Base Classes
Guards
History and Logs
Helpers for LLM Interactions
Types
Validation
Guardrails CLI
Guardrails Server Rest API
On this page
BaseFormatter
JsonFormatter
Python
Formatters
BaseFormatter
Copy
Ask AI
class
BaseFormatter
(
ABC
)
A Formatter takes an LLM Callable and wraps the method into an abstract callable.
Used to perform manipulations of the input or the output, like JSON constrained- decoding.
JsonFormatter
Copy
Ask AI
class
JsonFormatter
(
BaseFormatter
)
A formatter that uses Jsonformer to ensure the shape of structured data for Hugging Face models.
Errors
Previous
Generics And Base Classes
Next
⌘I