Chilkat Online Tools

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

Back to Collection Items

#include <C_CkHttpW.h>
#include <C_CkJsonObjectW.h>
#include <C_CkHttpResponseW.h>
#include <C_CkStringBuilderW.h>

void ChilkatSample(void)
    {
    HCkHttpW http;
    BOOL success;
    HCkJsonObjectW json;
    HCkHttpResponseW resp;
    HCkStringBuilderW sbResponseBody;
    HCkJsonObjectW jResp;
    int respStatusCode;
    const wchar_t *responseId;
    const wchar_t *text;
    const wchar_t *parameters;
    const wchar_t *prompt;
    const wchar_t *promptTemplateDevName;
    const wchar_t *requestId;
    int i;
    int count_i;

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

    http = CkHttpW_Create();

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

    json = CkJsonObjectW_Create();
    CkJsonObjectW_UpdateString(json,L"isPreview",L"false");
    CkJsonObjectW_UpdateNewObject(json,L"inputParams.valueMap");
    CkJsonObjectW_UpdateInt(json,L"additionalConfig.numGenerations",1);
    CkJsonObjectW_UpdateInt(json,L"additionalConfig.temperature",0);
    CkJsonObjectW_UpdateNumber(json,L"additionalConfig.frequencyPenalty",L"0.0");
    CkJsonObjectW_UpdateNumber(json,L"additionalConfig.presencePenalty",L"0.0");
    CkJsonObjectW_UpdateNewObject(json,L"additionalConfig.additionalParameters");
    CkJsonObjectW_UpdateString(json,L"additionalConfig.applicationName",L"PromptBuilderPreview");

    // Adds the "Authorization: Bearer <access_token>" header.
    CkHttpW_putAuthToken(http,L"<access_token>");

    resp = CkHttpW_PostJson3(http,L"https://domain.com/services/data/v{{version}}/einstein/prompt-templates/:PROMPT_TEMPLATE_API_NAME/generations",L"application/json",json);
    if (CkHttpW_getLastMethodSuccess(http) == FALSE) {
        wprintf(L"%s\n",CkHttpW_lastErrorText(http));
        CkHttpW_Dispose(http);
        CkJsonObjectW_Dispose(json);
        return;
    }

    sbResponseBody = CkStringBuilderW_Create();
    CkHttpResponseW_GetBodySb(resp,sbResponseBody);

    jResp = CkJsonObjectW_Create();
    CkJsonObjectW_LoadSb(jResp,sbResponseBody);
    CkJsonObjectW_putEmitCompact(jResp,FALSE);

    wprintf(L"Response Body:\n");
    wprintf(L"%s\n",CkJsonObjectW_emit(jResp));

    respStatusCode = CkHttpResponseW_getStatusCode(resp);
    wprintf(L"Response Status Code = %d\n",respStatusCode);
    if (respStatusCode >= 400) {
        wprintf(L"Response Header:\n");
        wprintf(L"%s\n",CkHttpResponseW_header(resp));
        wprintf(L"Failed.\n");
        CkHttpResponseW_Dispose(resp);
        CkHttpW_Dispose(http);
        CkJsonObjectW_Dispose(json);
        CkStringBuilderW_Dispose(sbResponseBody);
        CkJsonObjectW_Dispose(jResp);
        return;
    }

    CkHttpResponseW_Dispose(resp);

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

    // Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.

    parameters = CkJsonObjectW_stringOf(jResp,L"parameters");
    prompt = CkJsonObjectW_stringOf(jResp,L"prompt");
    promptTemplateDevName = CkJsonObjectW_stringOf(jResp,L"promptTemplateDevName");
    requestId = CkJsonObjectW_stringOf(jResp,L"requestId");
    i = 0;
    count_i = CkJsonObjectW_SizeOfArray(jResp,L"generations");
    while (i < count_i) {
        CkJsonObjectW_putI(jResp,i);
        parameters = CkJsonObjectW_stringOf(jResp,L"generations[i].parameters");
        responseId = CkJsonObjectW_stringOf(jResp,L"generations[i].responseId");
        text = CkJsonObjectW_stringOf(jResp,L"generations[i].text");
        i = i + 1;
    }



    CkHttpW_Dispose(http);
    CkJsonObjectW_Dispose(json);
    CkStringBuilderW_Dispose(sbResponseBody);
    CkJsonObjectW_Dispose(jResp);

    }

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