Thank you so much for your help. I’ve implemented your idea but I’m getting empty values.
- Here’s the prompt I gave the A.I. to analyse the image.
You are labelling all the items in a house. Analyse this photo of a household item.
Output a string in this format
label=kitchen|name=Bowl|Value=$15|Quantity=1
Where:
Label = Imagine you are labelling all the items in a house, give it a category label for this item
Name = Description of the item
Value = give it an estimated value in HKD
Quantity = how many identical items there are
- Here’s the output of the A.I. module.
[
{
"textResponse": " label=electronics|name=Ipad|Value=$500|Quantity=1",
"predictions": [
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": " label=electronics|name=Ipad|Value=$500|Quantity=1"
}
]
},
"safetyRatings": [
{
"category": "HARM_CATEGORY_HATE_SPEECH",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.078125,
"severity": "HARM_SEVERITY_LOW",
"severityScore": 0.20703125
},
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.28320313,
"severity": "HARM_SEVERITY_LOW",
"severityScore": 0.20703125
},
{
"category": "HARM_CATEGORY_HARASSMENT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.09667969,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.06542969
},
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.06933594,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.06738281
}
]
}
]
},
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": ""
}
]
},
"finishReason": "STOP"
}
],
"usageMetadata": {
"promptTokenCount": 356,
"candidatesTokenCount": 18,
"totalTokenCount": 374
}
}
]
}
]
- For the set variable module. This is the input and output
Input
[
{
"scope": "roundtrip",
"variables": [
{
"name": "label",
"value": null
},
{
"name": "name",
"value": null
},
{
"name": "value",
"value": null
},
{
"name": "quantity",
"value": null
}
]
}
]
Output
[
{
"label": null,
"name": null,
"value": null,
"quantity": null
}
]
Thank you so much for your help! The key is correct but just missing the value now.