Chilkat Online Tools

Node.js / Salesforce Platform APIs / Generate Response Based on Prompt Template

Back to Collection Items

var os = require('os');
if (os.platform() == 'win32') {  
    if (os.arch() == 'ia32') {
        var chilkat = require('@chilkat/ck-node21-win-ia32');
    } else {
        var chilkat = require('@chilkat/ck-node21-win64'); 
    }
} else if (os.platform() == 'linux') {
    if (os.arch() == 'arm') {
        var chilkat = require('@chilkat/ck-node21-arm');
    } else if (os.arch() == 'x86') {
        var chilkat = require('@chilkat/ck-node21-linux32');
    } else {
        var chilkat = require('@chilkat/ck-node21-linux64');
    }
} else if (os.platform() == 'darwin') {
    if (os.arch() == 'arm64') {
        var chilkat = require('@chilkat/ck-node21-mac-m1');
    } else {
        var chilkat = require('@chilkat/ck-node21-macosx');
    }
}


function chilkatExample() {

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

    var http = new chilkat.Http();
    var success;

    // 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"
    //   }
    // }

    var json = new chilkat.JsonObject();
    json.UpdateString("isPreview","false");
    json.UpdateNewObject("inputParams.valueMap");
    json.UpdateInt("additionalConfig.numGenerations",1);
    json.UpdateInt("additionalConfig.temperature",0);
    json.UpdateNumber("additionalConfig.frequencyPenalty","0.0");
    json.UpdateNumber("additionalConfig.presencePenalty","0.0");
    json.UpdateNewObject("additionalConfig.additionalParameters");
    json.UpdateString("additionalConfig.applicationName","PromptBuilderPreview");

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

    // resp: HttpResponse
    var resp = http.PostJson3("https://domain.com/services/data/v{{version}}/einstein/prompt-templates/:PROMPT_TEMPLATE_API_NAME/generations","application/json",json);
    if (http.LastMethodSuccess == false) {
        console.log(http.LastErrorText);
        return;
    }

    var sbResponseBody = new chilkat.StringBuilder();
    resp.GetBodySb(sbResponseBody);

    var jResp = new chilkat.JsonObject();
    jResp.LoadSb(sbResponseBody);
    jResp.EmitCompact = false;

    console.log("Response Body:");
    console.log(jResp.Emit());

    var respStatusCode = resp.StatusCode;
    console.log("Response Status Code = " + respStatusCode);
    if (respStatusCode >= 400) {
        console.log("Response Header:");
        console.log(resp.Header);
        console.log("Failed.");

        return;
    }

    // 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;
    var text;

    var parameters = jResp.StringOf("parameters");
    var prompt = jResp.StringOf("prompt");
    var promptTemplateDevName = jResp.StringOf("promptTemplateDevName");
    var requestId = jResp.StringOf("requestId");
    var i = 0;
    var count_i = jResp.SizeOfArray("generations");
    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;
    }


}

chilkatExample();

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}"
    }
  ]
}