Text Decorators
A2A Prompt Decorator Policy
Policy Name |
A2A Prompt Decorator |
Summary |
Decorates prompts with context information |
Category |
A2A |
First Flex Gateway version available |
v1.9.3 |
Returned Status Codes |
No return codes exist for this policy. |
Summary
The A2A Prompt Decorator policy injects additional content into provided prompts before they are sent to the upstream server. You can specify the content to inject either as a DataWeave string parameter or by referencing a file. Additionally, you can use a DataWeave expression to filter which requests should have prompts decorated.
Configuring Policy Parameters
Managed Flex Gateway and Flex Gateway Connected Mode
When you apply the policy to your API instance from the UI, the following parameters are displayed:
Element | Description |
---|---|
List of text decorations you want to add to the prompts. |
|
Prompt Text |
DataWeave Expression that generates the prompt text injected into the request. For example: |
Condition |
DataWeave Expression that filters which prompts to decorate. For example: |
File Decorators |
List of file decorations to add to the prompts. |
Condition |
DataWeave Expression that filters which prompts to decorate. For example: |
File Name |
DataWeave Expression with the File Name. For example: |
File Mime Type |
DataWeave Expression with the Mime Type of the file to inject. For example: |
File Source |
Select Base64 if the file Content is base64-encoded data, or Uri if the file Content is a URL to an external file. |
Content |
DataWeave Expression containing either base64-encoded file content or a URL to download the content file. For example: #['https://domain/file-location'] or #['QmFzZTY0IGVuY29kZWQgZmlsZSBjb250ZW50']. |