참고소스 수정본
This commit is contained in:
23
참고/guardrails-main/docs/api_reference/formatters.md
Normal file
23
참고/guardrails-main/docs/api_reference/formatters.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Formatters
|
||||
|
||||
## BaseFormatter
|
||||
|
||||
```python
|
||||
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
|
||||
|
||||
```python
|
||||
class JsonFormatter(BaseFormatter)
|
||||
```
|
||||
|
||||
A formatter that uses Jsonformer to ensure the shape of structured data
|
||||
for Hugging Face models.
|
||||
|
||||
Reference in New Issue
Block a user