Team Ai
Datasetpublic

Penbox/pen-script-instruct

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes3downloads
train.jsonl17 linesDownload Raw Back to root
1{"text": "<s>[INST] What is pen-script? [/INST] pen-script is a JSON based templating language that transforms: - a template (written in pen-script) and - a data layer (any JSON) into a valid JSON result </s>"}2{"text": "<s>[INST] in pen-script, conditions are written using the :if :then :else format inside a JSON object, using the following format:  { \":if\": expression, \":then\": trueValue, \":else\": falseValue }. for example: { \":if\": {trueVariable}, \":then\": \" I'm true \", \":else\": \" I'm false \" } [/INST] { \":if\": { \":cmp\": 4, \":eq\": 4, \":then\": \" I'm equal \", \":else\": \" I'm not equal \" } </s>"}3{"text": "<s>[INST] in pen-script, variables are written inside curly brackets. for example \"{my_variable}\" [/INST] {\"my_new_variable\": \"New variable based on {my__old_variable}\" </s>"}4{"text": "<s>[INST] in pen-script, you can concatenate variables and strings by placing them next to each other. For example, if you have variables var1 and var2, you can concatenate them like this: \"{ var1 }{ var2 }\". This allows you to combine the values of these variables into a single string. [/INST] { \"message\": \"Hello, {first_name} {last_name}!\" } </s>"}5{"text": "<s>[INST] in pen-script, you can use the `:eq` operator to compare values for equality. This operator checks if the input value is equal to the test value provided. The syntax for `:eq` is as follows: { \":cmp\": inputValue, \":eq\": testValue }[/INST] {\"user\":{\"name\":\"John\",\"age\":30},\"isAdult\":{\":cmp\":{\"user.age\":18},\":eq\":true}}</s>"}6{"text": "<s>[INST] What is a pen-flow ? [/INST] A pen-flow is a JSON based language that allows describing interactions. A pen-flow is a JSON array of JSON objects, each of which represents an element of an interaction. </s>"}7{"text": "<s>[INST] in a pen-flow, the main structure is composed of steps and invitations objects: {\"steps\": [],\"invitations\": {\"first_invite\": {}}} [/INST] {\"steps\": [],\"invitations\": {\"first_invite\": {}}} </s>"}8{"text": "<s>[INST] in a pen-flow, the invitations can contain first_invite as an object \"invitations\": {\"first_invite\": {}}  [/INST] {\"steps\": [],\"invitations\": {\"first_invite\": {}}} </s>"}9{"text": "<s>[INST] in a pen-flow,the first_invite object can contain sms and email JSON objects. for example: \"first_invite\": { \"sms\": { \"body\": \"Please fill in our form [link]({link})\", \"active\": true }, \"email\": { \"body\": \"Please use this [link]({link}) to fill our form.\", \"active\": true, \"subject\": \"Fill our form\" } } [/INST] \"first_invite\": { \"sms\": { \"body\": \"Please use this link: {link}\", \"active\": true }, \"email\": { \"body\": \"Please use this [link]({link}) to complete the First Notification of Loss form.\", \"active\": true, \"subject\": \"First Notification of Loss Form\" } } </s>"}10{"text": "<s>[INST] in a pen-flow, the steps is an array of JSON objects called step, each containing a label and elements. For example \"steps\": [{\"label\": \"Step Label\", \"elements\":[]}] [/INST] \"steps\": [{\"label\": \"Step number 1\", \"elements\":[]}]</s>"}11{"text": "<s>[INST] in a pen-flow, the elements array contains a list of JSON objects called element, each described by the \"type\" property. For example {\"elements\":[{\"type\":\"text\"}]} [/INST] {\"steps\":[{\"elements\":[{\"type\":\"text\"},{\"type\":\"number\"}]}]} </s>"}12{"text": "<s>[INST] in a pen-flow, the available types of elements are paragraph, text, checkbox, phone , date, checkboxes, file, bank-account, currency, radio, rating, signature, toggle, toggles, download. For example: {\"steps\":[{\"elements\":[{\"type\":\"text\"},{\"type\":\"number\"},{\"type\":\"file\"}]}]} [/INST] {\"steps\":[{\"elements\":[{\"type\":\"signature\"},{\"type\":\"date\"},{\"type\":\"download\"}]}]} </s>"}13{"text": "<s>[INST] in a pen-flow, all the elements, except the paragraph, have a \"key\" attribute. For example, {\"steps\":[{\"elements\":[{\"type\":\"text\",\"key\":\"data.first_name\"},{\"type\":\"number\",\"key\":\"data.my_number\"}]}]}[/INST] {\"steps\":[{\"elements\":[{\"type\":\"text\",\"key\":\"data.last_name\"},{\"type\":\"date\",\"key\":\"data.my_date\"}]}]}</s>"}14{"text": "<s>[INST] in a pen-flow, all the elements, except the paragraph, have a \"required\" attribute that is a boolean to explain if the element is required to be filled in. for example, {\"steps\":[{\"elements\":[{\"type\":\"text\",\"key\":\"data.last_name\",\"required\":true}]}]}[/INST] {\"steps\":[{\"elements\":[{\"type\":\"text\",\"key\":\"data.email\",\"required\":true},{\"type\":\"phone\",\"key\":\"data.mobile_phone\",\"required\":false}]}]} </s>"}15{"text": "<s>[INST] in a pen-flow, all the elements, except the paragraph, have a \"title\" attribute, that describes the field element. This should never be too long. For example, {\"steps\":[{\"elements\":[{\"type\":\"text\",\"title\":\"Your First Name\",\"key\":\"data.first_name\",\"required\":true},{\"type\":\"phone\",\"title\":\"Your Family Name\",\"key\":\"data.last_name\",\"required\":false}]}]} [/INST] {\"steps\":[{\"elements\":[{\"type\":\"text\",\"title\":\"Your Email address\",\"key\":\"data.email\",\"required\":true},{\"type\":\"phone\",\"title\":\"Your Mobile Phone Number\",\"key\":\"data.mobile_phone\",\"required\":false}]}]}</s>"}16{"text": "<s>[INST] in a pen-flow, the text element has the following attributes: key, type, required, title, format, placeholder. The format is non-mandatory, and is either null or \"email\". For example: {\"steps\":[{\"elements\":[{\"type\":\"text\",\"title\":\"Your Address\",\"key\":\"data.address\",\"required\":true},{\"type\":\"text\",\"title\":\"Your Email Address\",\"key\":\"data.email\",\"format\":\"email\",\"placeholder\":\"john.doe@example.com\",\"required\":false}]}]} [/INST] {\"steps\":[{\"elements\":[{\"type\":\"text\",\"title\":\"Your First Name\",\"key\":\"data.first_name\",\"placeholder\":\"John\",\"required\":true},{\"type\":\"text\",\"title\":\"Your Email Name\",\"key\":\"data.email\",\"format\":\"email\",\"placeholder\":\"john.doe@example.com\",\"required\":false}]}]}</s>"}17