Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Action redesign: Updating the config for Appsmith AI plugin to use sections and zones format #36089

Merged
merged 6 commits into from
Sep 5, 2024
Original file line number Diff line number Diff line change
@@ -1,51 +1,69 @@
{
"controlType": "SECTION_V2",
"identifier": "IMAGE_CAPTION",
"controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.usecase.data === 'IMAGE_CAPTION'}}"
},
"children": [
{
"label": "Try out these examples",
"Description": "Try out these examples",
"subtitle": "",
"configProperty": "",
"controlType": "FORM_TEMPLATE",
"isRequired": false,
"options": [
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "IMAGE-CAPTION-Z1",
"children": [
{
"label": "Product description",
"value": {
"actionConfiguration.formData.imageCaption.input.data": "https://i.imgur.com/Eiq5s0F.png",
"actionConfiguration.formData.imageCaption.instructions.data": "Write a 200 word product description"
}
"label": "Try out these examples",
"Description": "Try out these examples",
"subtitle": "",
"configProperty": "",
"controlType": "FORM_TEMPLATE",
"isRequired": false,
"options": [
{
"label": "Product description",
"value": {
"actionConfiguration.formData.imageCaption.input.data": "https://i.imgur.com/Eiq5s0F.png",
"actionConfiguration.formData.imageCaption.instructions.data": "Write a 200 word product description"
}
}
]
}
]
},
{
"label": "Input",
"Description": "Provide an image URL or the base64 encoded image",
"subtitle": "Provide an image URL or the base64 encoded image",
"configProperty": "actionConfiguration.formData.imageCaption.input.data",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
"isRequired": true,
"customStyles": {
"width": "700px"
}
"controlType": "SINGLE_COLUMN_ZONE",
ankitakinger marked this conversation as resolved.
Show resolved Hide resolved
"identifier": "IMAGE-CAPTION-Z2",
"children": [
{
"label": "Input",
"Description": "Provide an image URL or the base64 encoded image",
"subtitle": "Provide an image URL or the base64 encoded image",
"configProperty": "actionConfiguration.formData.imageCaption.input.data",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
"isRequired": true,
"customStyles": {
"width": "700px"
ankitakinger marked this conversation as resolved.
Show resolved Hide resolved
}
}
]
},
{
"label": "Additional Instructions",
"Description": "Provide additional instructions to tweak the caption",
"subtitle": "Provide additional instructions to tweak the caption",
"configProperty": "actionConfiguration.formData.imageCaption.instructions.data",
"controlType": "QUERY_DYNAMIC_TEXT",
"placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
"isRequired": false,
"initialValue": "",
"customStyles": {
"width": "700px"
}
"controlType": "SINGLE_COLUMN_ZONE",
"identifier": "IMAGE-CAPTION-Z3",
"children": [
{
"label": "Additional Instructions",
"Description": "Provide additional instructions to tweak the caption",
"subtitle": "Provide additional instructions to tweak the caption",
"configProperty": "actionConfiguration.formData.imageCaption.instructions.data",
"controlType": "QUERY_DYNAMIC_TEXT",
"placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
"isRequired": false,
"initialValue": "",
"customStyles": {
"width": "700px"
}
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,72 +1,87 @@
{
"controlType": "SECTION_V2",
"identifier": "IMAGE_CLASSIFY",
"controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.usecase.data === 'IMAGE_CLASSIFY'}}"
},
"children": [
{
"label": "Try out these examples",
"Description": "Try out these examples",
"subtitle": "",
"configProperty": "",
"controlType": "FORM_TEMPLATE",
"isRequired": false,
"options": [
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "IMAGE-CLASSIFY-Z1",
"children": [
{
"label": "Product category",
"value": {
"actionConfiguration.formData.imageClassify.input.data": "https://i.imgur.com/Eiq5s0F.png",
"actionConfiguration.formData.imageClassify.instructions.data": "Identify the category of clothing. Apply only one category.",
"actionConfiguration.formData.imageClassify.labels.data": "Jacket, Shirt, Pant, T-Shirt, Shorts, Dress, Skirt"
}
},
{
"label": "IT Asset Tagging",
"value": {
"actionConfiguration.formData.imageClassify.input.data": "https://i.imgur.com/EqfqRQY.png",
"actionConfiguration.formData.imageClassify.instructions.data": "Tag the IT hardware.",
"actionConfiguration.formData.imageClassify.labels.data": "Laptop, Phone, Headphones, Mouse, Keyboard, Monitor"
}
"label": "Try out these examples",
"Description": "Try out these examples",
"subtitle": "",
"configProperty": "",
"controlType": "FORM_TEMPLATE",
"isRequired": false,
"options": [
{
"label": "Product category",
"value": {
"actionConfiguration.formData.imageClassify.input.data": "https://i.imgur.com/Eiq5s0F.png",
"actionConfiguration.formData.imageClassify.instructions.data": "Identify the category of clothing. Apply only one category.",
"actionConfiguration.formData.imageClassify.labels.data": "Jacket, Shirt, Pant, T-Shirt, Shorts, Dress, Skirt"
}
},
{
"label": "IT Asset Tagging",
"value": {
"actionConfiguration.formData.imageClassify.input.data": "https://i.imgur.com/EqfqRQY.png",
"actionConfiguration.formData.imageClassify.instructions.data": "Tag the IT hardware.",
"actionConfiguration.formData.imageClassify.labels.data": "Laptop, Phone, Headphones, Mouse, Keyboard, Monitor"
}
}
]
}
]
},
{
"label": "Input",
"Description": "Provide an image URL or the base64 encoded image for AI to extract entities from",
"subtitle": "Provide an image URL or the base64 encoded image for AI to extract entities from",
"configProperty": "actionConfiguration.formData.imageClassify.input.data",
"placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"isRequired": true,
"customStyles": {
"width": "700px"
}
"controlType": "SINGLE_COLUMN_ZONE",
ankitakinger marked this conversation as resolved.
Show resolved Hide resolved
"identifier": "IMAGE-CLASSIFY-Z2",
"children": [
{
"label": "Input",
"Description": "Provide an image URL or the base64 encoded image for AI to extract entities from",
"subtitle": "Provide an image URL or the base64 encoded image for AI to extract entities from",
"configProperty": "actionConfiguration.formData.imageClassify.input.data",
"placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"isRequired": true
}
]
},
{
"label": "Labels",
"Description": "Provide labels as comma-separated string input for classification",
"subtitle": "Provide a comma separated list of labels to classify the Input on",
"configProperty": "actionConfiguration.formData.imageClassify.labels.data",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"placeholderText": "Write a list of comma separated text values or use {{ }} to reference a dynamic value",
"isRequired": true,
"customStyles": {
"width": "700px"
}
"controlType": "SINGLE_COLUMN_ZONE",
"identifier": "IMAGE-CLASSIFY-Z3",
"children": [
{
"label": "Labels",
"Description": "Provide labels as comma-separated string input for classification",
"subtitle": "Provide a comma separated list of labels to classify the Input on",
"configProperty": "actionConfiguration.formData.imageClassify.labels.data",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"placeholderText": "Write a list of comma separated text values or use {{ }} to reference a dynamic value",
"isRequired": true
}
]
},
{
"label": "Additional Instructions",
"Description": "Provide additional instructions to tweak the classification",
"subtitle": "Provide additional instructions to tweak the classification",
"configProperty": "actionConfiguration.formData.imageClassify.instructions.data",
"controlType": "QUERY_DYNAMIC_TEXT",
"placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
"isRequired": false,
"initialValue": "",
"customStyles": {
"width": "700px"
}
"controlType": "SINGLE_COLUMN_ZONE",
"identifier": "IMAGE-CLASSIFY-Z4",
"children": [
{
"label": "Additional Instructions",
"Description": "Provide additional instructions to tweak the classification",
"subtitle": "Provide additional instructions to tweak the classification",
"configProperty": "actionConfiguration.formData.imageClassify.instructions.data",
"controlType": "QUERY_DYNAMIC_TEXT",
"placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
"isRequired": false,
"initialValue": ""
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,69 +1,93 @@
{
"controlType": "SECTION_V2",
"identifier": "IMAGE_ENTITY_EXTRACT",
"controlType": "SECTION",
"conditionals": {
"show": "{{actionConfiguration.formData.usecase.data === 'IMAGE_ENTITY_EXTRACT'}}"
},
"children": [
{
"label": "Try out these examples",
"Description": "Try out these examples",
"subtitle": "",
"configProperty": "",
"controlType": "FORM_TEMPLATE",
"isRequired": false,
"options": [
"controlType": "DOUBLE_COLUMN_ZONE",
"identifier": "IMAGE-ENTITY-EXTRACT-Z1",
"children": [
{
"label": "KYC document",
"value": {
"actionConfiguration.formData.imageEntity.input.data": "https://i.imgur.com/5h9SfGf.jpgg",
"actionConfiguration.formData.imageEntity.labels.data": "name, date of birth, gender, licence number, height",
"actionConfiguration.formData.imageEntity.instructions.data": ""
}
},
{
"label": "Expense report",
"value": {
"actionConfiguration.formData.imageEntity.input.data": "https://i.imgur.com/z2PlaKB.jpg",
"actionConfiguration.formData.imageEntity.labels.data": "food items, tax, total cost, date of purchase",
"actionConfiguration.formData.imageEntity.instructions.data": "The date should be in dd/mm/yyyy format"
}
"label": "Try out these examples",
"Description": "Try out these examples",
"subtitle": "",
"configProperty": "",
"controlType": "FORM_TEMPLATE",
"isRequired": false,
"options": [
{
"label": "KYC document",
"value": {
"actionConfiguration.formData.imageEntity.input.data": "https://i.imgur.com/5h9SfGf.jpgg",
"actionConfiguration.formData.imageEntity.labels.data": "name, date of birth, gender, licence number, height",
"actionConfiguration.formData.imageEntity.instructions.data": ""
}
},
{
"label": "Expense report",
"value": {
"actionConfiguration.formData.imageEntity.input.data": "https://i.imgur.com/z2PlaKB.jpg",
"actionConfiguration.formData.imageEntity.labels.data": "food items, tax, total cost, date of purchase",
"actionConfiguration.formData.imageEntity.instructions.data": "The date should be in dd/mm/yyyy format"
}
}
]
}
]
},
{
"label": "Input",
"Description": "Provide an image URL or the base64 encoded image",
"subtitle": "Provide an image URL or the base64 encoded image",
"configProperty": "actionConfiguration.formData.imageEntity.input.data",
"placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"isRequired": true,
"customStyles": {
"width": "700px"
}
"controlType": "SINGLE_COLUMN_ZONE",
"identifier": "IMAGE-ENTITY-EXTRACT-Z2",
"children": [
{
"label": "Input",
"Description": "Provide an image URL or the base64 encoded image",
"subtitle": "Provide an image URL or the base64 encoded image",
"configProperty": "actionConfiguration.formData.imageEntity.input.data",
"placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"isRequired": true,
"customStyles": {
"width": "700px"
}
}
]
},
{
"label": "Entities",
"Description": "Provide a comma separated list of entities to extract from the Input",
"subtitle": "Provide a comma separated list of entities to extract from the Input",
"configProperty": "actionConfiguration.formData.imageEntity.labels.data",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"placeholderText": "Write a list of comma separated text values or use {{ }} to reference a dynamic value",
"isRequired": true,
"customStyles": {
"width": "700px"
}
"controlType": "SINGLE_COLUMN_ZONE",
"identifier": "IMAGE-ENTITY-EXTRACT-Z3",
"children": [
{
"label": "Entities",
"Description": "Provide a comma separated list of entities to extract from the Input",
"subtitle": "Provide a comma separated list of entities to extract from the Input",
"configProperty": "actionConfiguration.formData.imageEntity.labels.data",
"controlType": "QUERY_DYNAMIC_INPUT_TEXT",
"placeholderText": "Write a list of comma separated text values or use {{ }} to reference a dynamic value",
"isRequired": true,
"customStyles": {
"width": "700px"
}
}
]
},
{
"label": "Additional Instructions",
"Description": "Provide additional instructions for the AI to tweak the entity extraction",
"subtitle": "Provide additional instructions for the AI to tweak the entity extraction",
"configProperty": "actionConfiguration.formData.imageEntity.instructions.data",
"controlType": "QUERY_DYNAMIC_TEXT",
"placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
"initialValue": "",
"isRequired": false
"controlType": "SINGLE_COLUMN_ZONE",
"identifier": "IMAGE-ENTITY-EXTRACT-Z4",
"children": [
{
"label": "Additional Instructions",
"Description": "Provide additional instructions for the AI to tweak the entity extraction",
"subtitle": "Provide additional instructions for the AI to tweak the entity extraction",
"configProperty": "actionConfiguration.formData.imageEntity.instructions.data",
"controlType": "QUERY_DYNAMIC_TEXT",
"placeholderText": "Write some text or use {{ }} to reference a dynamic text value",
"initialValue": "",
"isRequired": false
}
]
}
]
}
Loading
Loading