Chilkat Online Tools

Swift / Salesforce Platform APIs / Generate Response Based on Prompt Template

Back to Collection Items

func chilkatTest() {
    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    let http = CkoHttp()
    var success: Bool

    // Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    // The following JSON is sent in the request body.

    // {
    //   "isPreview": "false",
    //   "inputParams": {
    //     "valueMap": {}
    //   },
    //   "additionalConfig": {
    //     "numGenerations": 1,
    //     "temperature": 0,
    //     "frequencyPenalty": 0.0,
    //     "presencePenalty": 0.0,
    //     "additionalParameters": {},
    //     "applicationName": "PromptBuilderPreview"
    //   }
    // }

    let json = CkoJsonObject()
    json.UpdateString("isPreview", value: "false")
    json.UpdateNewObject("inputParams.valueMap")
    json.UpdateInt("additionalConfig.numGenerations", value: 1)
    json.UpdateInt("additionalConfig.temperature", value: 0)
    json.UpdateNumber("additionalConfig.frequencyPenalty", numericStr: "0.0")
    json.UpdateNumber("additionalConfig.presencePenalty", numericStr: "0.0")
    json.UpdateNewObject("additionalConfig.additionalParameters")
    json.UpdateString("additionalConfig.applicationName", value: "PromptBuilderPreview")

    // Adds the "Authorization: Bearer <access_token>" header.
    http.AuthToken = "<access_token>"

    var resp: CkoHttpResponse? = http.PostJson3("https://domain.com/services/data/v{{version}}/einstein/prompt-templates/:PROMPT_TEMPLATE_API_NAME/generations", contentType: "application/json", json: json)
    if http.LastMethodSuccess == false {
        print("\(http.LastErrorText)")
        return
    }

    let sbResponseBody = CkoStringBuilder()
    resp!.GetBodySb(sbResponseBody)

    let jResp = CkoJsonObject()
    jResp.LoadSb(sbResponseBody)
    jResp.EmitCompact = false

    print("Response Body:")
    print("\(jResp.Emit())")

    var respStatusCode: Int = resp!.StatusCode.intValue
    print("Response Status Code = \(respStatusCode)")
    if respStatusCode >= 400 {
        print("Response Header:")
        print("\(resp!.Header)")
        print("Failed.")
        resp = nil
        return
    }

    resp = nil

    // Sample JSON response:
    // (Sample code for parsing the JSON response is shown below)

    // {
    //   "generations": [
    //     {
    //       "parameters": "{finish_reason=stop, index=0, logprobs=null}",
    //       "responseId": "893db990-7acb-4845-ad65-54d82606ca65",
    //       "text": "{\n "twitter": " Exciting new listing! Explore our luxurious property, [Provide:{PROPERTY NAME}], featuring [Provide:{BEDS}] beds, [Provide:{BATHS}] baths, and an asking price of [Provide:{ASKING PRICE}]. Click the link for a sneak peek! [Provide:{PICTURE}]",\n "linkedin": " Don't miss out on this incredible opportunity! Discover the stunning property, [Provide:{PROPERTY NAME}], offering [Provide:{BEDS}] beds, [Provide:{BATHS}] baths, and an asking price of [Provide:{ASKING PRICE}]. Click the link below to see more! [Provide:{PICTURE}]",\n "blockkit": {\n    "blocks": [\n        {\n            "type": "section",\n            "text": {\n                "type": "mrkdwn",\n                "text": "*Luxury Property Alert!* \n\n\n\nIntroducing [Provide:{PROPERTY NAME}], a magnificent home with [Provide:{BEDS}] beds and [Provide:{BATHS}] baths. Priced at [Provide:{ASKING PRICE}]."\n            },\n            "accessory": {\n                "type": "image",\n                "image_url": "[Provide:{PICTURE}]",\n                "alt_text": "Luxury Property"\n            }\n        },\n        {\n            "type": "divider"\n        },\n        {\n            "type": "actions",\n            "elements": [\n                {\n                    "type": "button",\n                    "text": {\n                        "type": "plain_text",\n                        "text": "View Property",\n                        "emoji": true\n                    },\n                    "url": "https://d1q000001ewauuaq-dev-ed.develop.lightning.force.com/[Provide:{RECORD ID}]"\n                }\n            ]\n        }\n    ]\n  }\n}"
    //     }
    //   ],
    //   "parameters": null,
    //   "prompt": "You're the community manager for Dreamhouse, a real estate agency that sells luxury properties. \nCreate social media posts for twitter, linkedin and slack (block kit format) describing the property.\n\nInstructions:\n"""\nUse clear, concise, and straightforward language using the active voice and strictly avoiding the use of filler words and phrases and redundant language.\nMake sure the response is valid JSON.\nWhen you generate the posts, include the name of the property, [Provide:{PROPERTY NAME}], and explain the characteristics of the house, such as [Provide:{BATHS}], [Provide:{BEDS}]and[Provide:{ASKING PRICE}]. Also include a link to the picture of the property, [Provide:{PICTURE}]. \n\nThe twitter post should include emojis.\nThe linkedin post should include several emojis and bullets, and also have a special output formatting: Text render environment only supports Unicode and emoji. Use symbols from Unicode’s Mathematical Alphanumeric Symbols block liberally to produce facsimiles of bold, italics, line separation, and other formatting. Examples for a sample sentence:\n\nitalics sans:         .\nbold sans:         .\nbold italic sans:         .\nitalics serif:         .\n\nThe block kit code should be valid block kit code.\nWhen you generate the block kit code: \n- Add several sections. \n- Include the name of the property, [Provide:{PROPERTY NAME}], and explain the characteristics of the house, such as [Provide:{BATHS}], [Provide:{BEDS}] and [Provide:{ASKING PRICE}]. \n- Include a the picture of the property, which image_url is [Provide:{PICTURE}]. \n- Include a button which url points to https://d1q000001ewauuaq-dev-ed.develop.lightning.force.com/[Provide:{RECORD ID}]\n- Include emoticons so the post is more visual.\n\nExample of block kit code:\n\n{\n    "blocks": [\n        {\n            "type": "section",\n            "text": {\n                "type": "mrkdwn",\n                "text": "Hello, Assistant to the Regional Manager Dwight! *Michael Scott* wants to know where you'd like to take the Paper Company investors to dinner tonight.\n\n *Please select a restaurant:*"\n            }\n        },\n        {\n            "type": "divider"\n        },\n        {\n            "type": "section",\n            "text": {\n                "type": "mrkdwn",\n                "text": "*Farmhouse Thai Cuisine*\n:star::star::star::star: 1528 reviews\n They do have some vegan options, like the roti and curry, plus they have a ton of salad stuff and noodles can be ordered without meat!! They have something for everyone here"\n            },\n            "accessory": {\n                "type": "image",\n                "image_url": "https://s3-media3.fl.yelpcdn.com/bphoto/c7ed05m9lC2EmA3Aruue7A/o.jpg",\n                "alt_text": "alt text for image"\n            }\n        },\n        {\n            "type": "section",\n            "text": {\n                "type": "mrkdwn",\n                "text": "*Kin Khao*\n:star::star::star::star: 1638 reviews\n The sticky rice also goes wonderfully with the caramelized pork belly, which is absolutely melt-in-your-mouth and so soft."\n            },\n            "accessory": {\n                "type": "image",\n                "image_url": "https://s3-media2.fl.yelpcdn.com/bphoto/korel-1YjNtFtJlMTaC26A/o.jpg",\n                "alt_text": "alt text for image"\n            }\n        },\n        {\n            "type": "section",\n            "text": {\n                "type": "mrkdwn",\n                "text": "*Ler Ros*\n:star::star::star::star: 2082 reviews\n I would really recommend the Yum Koh Moo Yang - Spicy lime dressing and roasted quick marinated pork shoulder, basil leaves, chili & rice powder."\n            },\n            "accessory": {\n                "type": "image",\n                "image_url": "https://s3-media2.fl.yelpcdn.com/bphoto/DawwNigKJ2ckPeDeDM7jAg/o.jpg",\n                "alt_text": "alt text for image"\n            }\n        },\n        {\n            "type": "divider"\n        },\n        {\n            "type": "actions",\n            "elements": [\n                {\n                    "type": "button",\n                    "text": {\n                        "type": "plain_text",\n                        "text": "Farmhouse",\n                        "emoji": true\n                    },\n                    "value": "click_me_123"\n                },\n                {\n                    "type": "button",\n                    "text": {\n                        "type": "plain_text",\n                        "text": "Kin Khao",\n                        "emoji": true\n                    },\n                    "value": "click_me_123",\n                    "url": "https://google.com"\n                },\n                {\n                    "type": "button",\n                    "text": {\n                        "type": "plain_text",\n                        "text": "Ler Ros",\n                        "emoji": true\n                    },\n                    "value": "click_me_123",\n                    "url": "https://google.com"\n                }\n            ]\n        }\n    ]\n}\n\nThe response should have the next format:\n{\n "twitter": [here goes the twitter post, that should have less than 280 characters],\n "linkedin": [here goes the linkedin post, that should have between 1500 and 2000 characters], \n "blockkit": [here goes the block kit post], \n}\n\n"""\n\nNow generate the posts.\n\n\n",
    //   "promptTemplateDevName": "Generate_Social_Media_Posts",
    //   "requestId": "chatcmpl-97KqPl1TEiOgMdnKKPQ9aVs7rPJGr"
    // }

    // Sample code for parsing the JSON response...
    // Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    var responseId: String?
    var text: String?

    var parameters: String? = jResp.StringOf("parameters")
    var prompt: String? = jResp.StringOf("prompt")
    var promptTemplateDevName: String? = jResp.StringOf("promptTemplateDevName")
    var requestId: String? = jResp.StringOf("requestId")
    var i: Int = 0
    var count_i: Int = jResp.SizeOfArray("generations").intValue
    while i < count_i {
        jResp.I = i
        parameters = jResp.StringOf("generations[i].parameters")
        responseId = jResp.StringOf("generations[i].responseId")
        text = jResp.StringOf("generations[i].text")
        i = i + 1
    }


}

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-d '{
  "isPreview": "false",
  "inputParams": {
    "valueMap": {
      <INPUT_PARAMS>
    }
  },
  "additionalConfig": {
      "numGenerations": 1,
      "temperature": 0,
      "frequencyPenalty": 0.0,
      "presencePenalty": 0.0,
      "additionalParameters": {},
      "applicationName": "PromptBuilderPreview"
  }
}'
https://domain.com/services/data/v{{version}}/einstein/prompt-templates/:PROMPT_TEMPLATE_API_NAME/generations

Postman Collection Item JSON

{
  "name": "Generate Response Based on Prompt Template",
  "request": {
    "method": "POST",
    "header": [
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"isPreview\": \"false\",\n  \"inputParams\": {\n    \"valueMap\": {\n      <INPUT_PARAMS>\n    }\n  },\n  \"additionalConfig\": {\n      \"numGenerations\": 1,\n      \"temperature\": 0,\n      \"frequencyPenalty\": 0.0,\n      \"presencePenalty\": 0.0,\n      \"additionalParameters\": {},\n      \"applicationName\": \"PromptBuilderPreview\"\n  }\n}",
      "options": {
        "raw": {
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{_endpoint}}/services/data/v{{version}}/einstein/prompt-templates/:PROMPT_TEMPLATE_API_NAME/generations",
      "host": [
        "{{_endpoint}}"
      ],
      "path": [
        "services",
        "data",
        "v{{version}}",
        "einstein",
        "prompt-templates",
        ":PROMPT_TEMPLATE_API_NAME",
        "generations"
      ],
      "variable": [
        {
          "key": "PROMPT_TEMPLATE_API_NAME",
          "value": "",
          "description": "API name of the prompt template to invoke"
        }
      ]
    }
  },
  "response": [
    {
      "name": "Generate Response Based on Prompt Template",
      "originalRequest": {
        "method": "POST",
        "header": [
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"isPreview\": \"false\",\n  \"inputParams\": {\n    \"valueMap\": {\n      \"Input:Property\": {\n        \"value\": {\n          \"id\": \"a011Q00001EQYXOQA5\"\n        }\n      }\n    }\n  },\n  \"additionalConfig\": {\n      \"numGenerations\": 1,\n      \"temperature\": 0,\n      \"frequencyPenalty\": 0.0,\n      \"presencePenalty\": 0.0,\n      \"additionalParameters\": {},\n      \"applicationName\": \"PromptBuilderPreview\"\n  }\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{_endpoint}}/services/data/v{{version}}/einstein/prompt-templates/Generate_Social_Media_Posts/generations",
          "host": [
            "{{_endpoint}}"
          ],
          "path": [
            "services",
            "data",
            "v{{version}}",
            "einstein",
            "prompt-templates",
            "Generate_Social_Media_Posts",
            "generations"
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Date",
          "value": "Wed, 27 Mar 2024 10:30:55 GMT"
        },
        {
          "key": "Content-Type",
          "value": "application/json;charset=UTF-8"
        },
        {
          "key": "Transfer-Encoding",
          "value": "chunked"
        },
        {
          "key": "Connection",
          "value": "keep-alive"
        },
        {
          "key": "Set-Cookie",
          "value": "CookieConsentPolicy=0:1; path=/; expires=Thu, 27-Mar-2025 10:30:46 GMT; Max-Age=31536000; secure"
        },
        {
          "key": "Set-Cookie",
          "value": "LSKey-c$CookieConsentPolicy=0:1; path=/; expires=Thu, 27-Mar-2025 10:30:46 GMT; Max-Age=31536000; secure"
        },
        {
          "key": "Set-Cookie",
          "value": "BrowserId=EmiKg-wlEe6gDIWbBKrQ-g; domain=.salesforce.com; path=/; expires=Thu, 27-Mar-2025 10:30:46 GMT; Max-Age=31536000"
        },
        {
          "key": "Strict-Transport-Security",
          "value": "max-age=63072000; includeSubDomains"
        },
        {
          "key": "X-Content-Type-Options",
          "value": "nosniff"
        },
        {
          "key": "X-Robots-Tag",
          "value": "none"
        },
        {
          "key": "Cache-Control",
          "value": "no-cache,must-revalidate,max-age=0,no-store,private"
        },
        {
          "key": "Origin-Trial",
          "value": "AqlAE64ET63tVSana3qdVkfkPAgyUhY8GwcehUlpqv067CevOpumeNUlx9YouLkBxJ0CT+EwIb8/SiNbF2NGvwYAAABfeyJvcmlnaW4iOiJodHRwczovL3NhbGVzZm9yY2UuY29tOjQ0MyIsImZlYXR1cmUiOiJUcGNkIiwiZXhwaXJ5IjoxNzM1MzQzOTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZX0="
        },
        {
          "key": "Vary",
          "value": "Accept-Encoding"
        },
        {
          "key": "Content-Encoding",
          "value": "gzip"
        },
        {
          "key": "Server",
          "value": "sfdcedge"
        },
        {
          "key": "X-SFDC-Request-Id",
          "value": "7070edfcd5d02a0d047af20b8dccf83e"
        }
      ],
      "cookie": [
      ],
      "body": "{\n    \"generations\": [\n        {\n            \"parameters\": \"{finish_reason=stop, index=0, logprobs=null}\",\n            \"responseId\": \"893db990-7acb-4845-ad65-54d82606ca65\",\n            \"text\": \"{\\n &quot;twitter&quot;: &quot;🌟 Exciting new listing! Explore our luxurious property, [Provide:{PROPERTY NAME}], featuring [Provide:{BEDS}] beds, [Provide:{BATHS}] baths, and an asking price of [Provide:{ASKING PRICE}]. Click the link for a sneak peek! [Provide:{PICTURE}]&quot;,\\n &quot;linkedin&quot;: &quot;🌟🌟 Don&#39;t miss out on this incredible opportunity! Discover the stunning property, [Provide:{PROPERTY NAME}], offering [Provide:{BEDS}] beds, [Provide:{BATHS}] baths, and an asking price of [Provide:{ASKING PRICE}]. Click the link below to see more! [Provide:{PICTURE}]&quot;,\\n &quot;blockkit&quot;: {\\n    &quot;blocks&quot;: [\\n        {\\n            &quot;type&quot;: &quot;section&quot;,\\n            &quot;text&quot;: {\\n                &quot;type&quot;: &quot;mrkdwn&quot;,\\n                &quot;text&quot;: &quot;*Luxury Property Alert!* &#92;n&#92;n🌟🌟🌟&#92;n&#92;nIntroducing [Provide:{PROPERTY NAME}], a magnificent home with [Provide:{BEDS}] beds and [Provide:{BATHS}] baths. Priced at [Provide:{ASKING PRICE}].&quot;\\n            },\\n            &quot;accessory&quot;: {\\n                &quot;type&quot;: &quot;image&quot;,\\n                &quot;image_url&quot;: &quot;[Provide:{PICTURE}]&quot;,\\n                &quot;alt_text&quot;: &quot;Luxury Property&quot;\\n            }\\n        },\\n        {\\n            &quot;type&quot;: &quot;divider&quot;\\n        },\\n        {\\n            &quot;type&quot;: &quot;actions&quot;,\\n            &quot;elements&quot;: [\\n                {\\n                    &quot;type&quot;: &quot;button&quot;,\\n                    &quot;text&quot;: {\\n                        &quot;type&quot;: &quot;plain_text&quot;,\\n                        &quot;text&quot;: &quot;View Property&quot;,\\n                        &quot;emoji&quot;: true\\n                    },\\n                    &quot;url&quot;: &quot;https://d1q000001ewauuaq-dev-ed.develop.lightning.force.com/[Provide:{RECORD ID}]&quot;\\n                }\\n            ]\\n        }\\n    ]\\n  }\\n}\"\n        }\n    ],\n    \"parameters\": null,\n    \"prompt\": \"You&#39;re the community manager for Dreamhouse, a real estate agency that sells luxury properties. \\nCreate social media posts for twitter, linkedin and slack (block kit format) describing the property.\\n\\nInstructions:\\n&quot;&quot;&quot;\\nUse clear, concise, and straightforward language using the active voice and strictly avoiding the use of filler words and phrases and redundant language.\\nMake sure the response is valid JSON.\\nWhen you generate the posts, include the name of the property, [Provide:{PROPERTY NAME}], and explain the characteristics of the house, such as [Provide:{BATHS}], [Provide:{BEDS}]and[Provide:{ASKING PRICE}]. Also include a link to the picture of the property, [Provide:{PICTURE}]. \\n\\nThe twitter post should include emojis.\\nThe linkedin post should include several emojis and bullets, and also have a special output formatting: Text render environment only supports Unicode and emoji. Use symbols from Unicode’s Mathematical Alphanumeric Symbols block liberally to produce facsimiles of bold, italics, line separation, and other formatting. Examples for a sample sentence:\\n\\nitalics sans: 𝘛𝘩𝘦 𝘘𝘶𝘪𝘤𝘬 𝘉𝘳𝘰𝘸𝘯 𝘍𝘰𝘹 𝘑𝘶𝘮𝘱𝘦𝘥 𝘖𝘷𝘦𝘳 𝘵𝘩𝘦 𝘭𝘢𝘻𝘺 𝘥𝘰𝘨.\\nbold sans: 𝗧𝗵𝗲 𝗤𝘂𝗶𝗰𝗸 𝗕𝗿𝗼𝘄𝗻 𝗙𝗼𝘅 𝗝𝘂𝗺𝗽𝗲𝗱 𝗢𝘃𝗲𝗿 𝘁𝗵𝗲 𝗹𝗮𝘇𝘆 𝗱𝗼𝗴.\\nbold italic sans: 𝙏𝙝𝙚 𝙌𝙪𝙞𝙘𝙠 𝘽𝙧𝙤𝙬𝙣 𝙁𝙤𝙭 𝙅𝙪𝙢𝙥𝙚𝙙 𝙊𝙫𝙚𝙧 𝙩𝙝𝙚 𝙡𝙖𝙯𝙮 𝙙𝙤𝙜.\\nitalics serif: 𝑇ℎ𝑒 𝑄𝑢𝑖𝑐𝑘 𝐵𝑟𝑜𝑤𝑛 𝐹𝑜𝑥 𝐽𝑢𝑚𝑝𝑒𝑑 𝑂𝑣𝑒𝑟 𝑡ℎ𝑒 𝑙𝑎𝑧𝑦 𝑑𝑜𝑔.\\n\\nThe block kit code should be valid block kit code.\\nWhen you generate the block kit code: \\n- Add several sections. \\n- Include the name of the property, [Provide:{PROPERTY NAME}], and explain the characteristics of the house, such as [Provide:{BATHS}], [Provide:{BEDS}] and [Provide:{ASKING PRICE}]. \\n- Include a the picture of the property, which image_url is [Provide:{PICTURE}]. \\n- Include a button which url points to https://d1q000001ewauuaq-dev-ed.develop.lightning.force.com/[Provide:{RECORD ID}]\\n- Include emoticons so the post is more visual.\\n\\nExample of block kit code:\\n\\n{\\n    &quot;blocks&quot;: [\\n        {\\n            &quot;type&quot;: &quot;section&quot;,\\n            &quot;text&quot;: {\\n                &quot;type&quot;: &quot;mrkdwn&quot;,\\n                &quot;text&quot;: &quot;Hello, Assistant to the Regional Manager Dwight! *Michael Scott* wants to know where you&#39;d like to take the Paper Company investors to dinner tonight.&#92;n&#92;n *Please select a restaurant:*&quot;\\n            }\\n        },\\n        {\\n            &quot;type&quot;: &quot;divider&quot;\\n        },\\n        {\\n            &quot;type&quot;: &quot;section&quot;,\\n            &quot;text&quot;: {\\n                &quot;type&quot;: &quot;mrkdwn&quot;,\\n                &quot;text&quot;: &quot;*Farmhouse Thai Cuisine*&#92;n:star::star::star::star: 1528 reviews&#92;n They do have some vegan options, like the roti and curry, plus they have a ton of salad stuff and noodles can be ordered without meat!! They have something for everyone here&quot;\\n            },\\n            &quot;accessory&quot;: {\\n                &quot;type&quot;: &quot;image&quot;,\\n                &quot;image_url&quot;: &quot;https://s3-media3.fl.yelpcdn.com/bphoto/c7ed05m9lC2EmA3Aruue7A/o.jpg&quot;,\\n                &quot;alt_text&quot;: &quot;alt text for image&quot;\\n            }\\n        },\\n        {\\n            &quot;type&quot;: &quot;section&quot;,\\n            &quot;text&quot;: {\\n                &quot;type&quot;: &quot;mrkdwn&quot;,\\n                &quot;text&quot;: &quot;*Kin Khao*&#92;n:star::star::star::star: 1638 reviews&#92;n The sticky rice also goes wonderfully with the caramelized pork belly, which is absolutely melt-in-your-mouth and so soft.&quot;\\n            },\\n            &quot;accessory&quot;: {\\n                &quot;type&quot;: &quot;image&quot;,\\n                &quot;image_url&quot;: &quot;https://s3-media2.fl.yelpcdn.com/bphoto/korel-1YjNtFtJlMTaC26A/o.jpg&quot;,\\n                &quot;alt_text&quot;: &quot;alt text for image&quot;\\n            }\\n        },\\n        {\\n            &quot;type&quot;: &quot;section&quot;,\\n            &quot;text&quot;: {\\n                &quot;type&quot;: &quot;mrkdwn&quot;,\\n                &quot;text&quot;: &quot;*Ler Ros*&#92;n:star::star::star::star: 2082 reviews&#92;n I would really recommend the Yum Koh Moo Yang - Spicy lime dressing and roasted quick marinated pork shoulder, basil leaves, chili &amp; rice powder.&quot;\\n            },\\n            &quot;accessory&quot;: {\\n                &quot;type&quot;: &quot;image&quot;,\\n                &quot;image_url&quot;: &quot;https://s3-media2.fl.yelpcdn.com/bphoto/DawwNigKJ2ckPeDeDM7jAg/o.jpg&quot;,\\n                &quot;alt_text&quot;: &quot;alt text for image&quot;\\n            }\\n        },\\n        {\\n            &quot;type&quot;: &quot;divider&quot;\\n        },\\n        {\\n            &quot;type&quot;: &quot;actions&quot;,\\n            &quot;elements&quot;: [\\n                {\\n                    &quot;type&quot;: &quot;button&quot;,\\n                    &quot;text&quot;: {\\n                        &quot;type&quot;: &quot;plain_text&quot;,\\n                        &quot;text&quot;: &quot;Farmhouse&quot;,\\n                        &quot;emoji&quot;: true\\n                    },\\n                    &quot;value&quot;: &quot;click_me_123&quot;\\n                },\\n                {\\n                    &quot;type&quot;: &quot;button&quot;,\\n                    &quot;text&quot;: {\\n                        &quot;type&quot;: &quot;plain_text&quot;,\\n                        &quot;text&quot;: &quot;Kin Khao&quot;,\\n                        &quot;emoji&quot;: true\\n                    },\\n                    &quot;value&quot;: &quot;click_me_123&quot;,\\n                    &quot;url&quot;: &quot;https://google.com&quot;\\n                },\\n                {\\n                    &quot;type&quot;: &quot;button&quot;,\\n                    &quot;text&quot;: {\\n                        &quot;type&quot;: &quot;plain_text&quot;,\\n                        &quot;text&quot;: &quot;Ler Ros&quot;,\\n                        &quot;emoji&quot;: true\\n                    },\\n                    &quot;value&quot;: &quot;click_me_123&quot;,\\n                    &quot;url&quot;: &quot;https://google.com&quot;\\n                }\\n            ]\\n        }\\n    ]\\n}\\n\\nThe response should have the next format:\\n{\\n &quot;twitter&quot;: [here goes the twitter post, that should have less than 280 characters],\\n &quot;linkedin&quot;: [here goes the linkedin post, that should have between 1500 and 2000 characters], \\n &quot;blockkit&quot;: [here goes the block kit post], \\n}\\n\\n&quot;&quot;&quot;\\n\\nNow generate the posts.\\n\\n\\n\",\n    \"promptTemplateDevName\": \"Generate_Social_Media_Posts\",\n    \"requestId\": \"chatcmpl-97KqPl1TEiOgMdnKKPQ9aVs7rPJGr\"\n}"
    }
  ]
}