L2 Construct: object_to_text
formatters object_to_textDescription
Converts an object to markdown and plain text.
L2 Data
- Provider: pontus
- Module: formatter
- Action: object_to_text
Example Step
{
"name": "insert-your-step-name",
"type": "l2",
"l2_data": {
"provider": "pontus",
"module": "formatter",
"action": "object_to_text",
"metadata": {}
}
}
Input
Example
{
"object": {
"age": 30,
"name": "John Doe"
}
}
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://pontus.bpa/pkgs/l2/pontus/formatters/object-to-text-input",
"$ref": "#/$defs/ObjectToTextInput",
"$defs": {
"ObjectToTextInput": {
"properties": {
"object": true,
"instructions": {
"type": "string"
},
"use_bullet_points": {
"type": "boolean"
},
"be_concise": {
"type": "boolean"
}
},
"additionalProperties": false,
"type": "object",
"required": ["object"]
}
}
}
Output
Example
{
"markdown": "**Name:** John Doe\n**Age:** 30",
"plain": "Name: John Doe\nAge: 30"
}
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://pontus.bpa/pkgs/l2/pontus/formatters/object-to-text-input-output",
"$ref": "#/$defs/ObjectToTextInputOutput",
"$defs": {
"ObjectToTextInputOutput": {
"properties": {
"markdown": {
"type": "string"
},
"plain": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": ["markdown", "plain"]
}
}
}