API Reference — Converters¶
Payload converters transform payloads before injection or delivery.
converters
¶
Payload converters — transform payloads before injection or delivery.
Re-exports concrete PayloadConverter implementations.
DocxConverter
¶
Convert a text payload into a Word (.docx) document.
Thin wrapper around PyRIT's WordDocConverter. Accepts a
RAMPART Payload (text format) and returns a new Payload
with format=DOCX and the artifact path set.
PyRIT's import chain is heavy (~14s), so initialization is
deferred until the first convert_async call.
Initialize with deferred PyRIT converter.
Source code in rampart/converters/docx.py
convert_async
async
¶
Convert a text payload into a .docx payload.
Delegates document generation to PyRIT's WordDocConverter.
Preserves payload.id and payload.content for
traceability and reporting.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
payload
|
Payload
|
A text-format payload to convert. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Payload |
Payload
|
A new payload with |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the payload format is not a text format. |