I have an gemini pro “Create A Chat Prompt” module outputting in JSON format.
When I feed the Response into the Parse JSON module it errors with “Source is not valid JSON” im guessing its because the response gives a ```json before the JSON as if I just paste the JSON including curly brackets it works.
What the best way to get around this?
Thanks in advance for your help.
[
{
"textResponse": "```json\n{\n \"Overview\": \"Heat Different proposes a comprehensive upgrade to the current heating system by implementing a cutting-edge hybrid heat pump system. This innovative solution combines the efficiency of an air source heat pump (ASHP) with the reliability of an oil boiler, providing optimal performance, reduced energy consumption, and minimized carbon emissions.\",\n \"Solution\": \"The proposed hybrid system utilizes a Viessmann Vitocal 200-A Pro air source heat pump as the primary heating source. This highly efficient ASHP extracts heat from the ambient air, providing a sustainable and cost-effective heating solution. The existing oil boiler will serve as a backup system, ensuring uninterrupted comfort during periods of peak demand or extremely cold weather. This bivalent approach ensures optimal performance and reliability, maximizing energy savings and minimizing environmental impact.\"\n}\n```",
"predictions": [
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "```json\n{"
}
]
},
"safetyRatings": [
{
"category": "HARM_CATEGORY_HATE_SPEECH",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.043284845,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.14104462
},
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.115960725,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.10818896
},
{
"category": "HARM_CATEGORY_HARASSMENT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.11221038,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.028598359
},
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.06500873,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.112015955
}
]
}
]
},
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "\n \"Overview\": \"Heat Different proposes a comprehensive upgrade to the current heating system by implementing a cutting-edge hybrid heat pump system. This innovative solution combines"
}
]
},
"safetyRatings": [
{
"category": "HARM_CATEGORY_HATE_SPEECH",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.042009056,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.034880884
},
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.07356305,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.03882902
},
{
"category": "HARM_CATEGORY_HARASSMENT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.068412915,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.044183318
},
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.09534945,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.041930523
}
]
}
]
},
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": " the efficiency of an air source heat pump (ASHP) with the reliability of an oil boiler, providing optimal performance, reduced energy consumption, and minimized carbon emissions"
}
]
},
"safetyRatings": [
{
"category": "HARM_CATEGORY_HATE_SPEECH",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.02479816,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.032405514
},
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.07821887,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.034553625
},
{
"category": "HARM_CATEGORY_HARASSMENT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.05261895,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.034749627
},
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.07043162,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.026912304
}
]
}
]
},
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": ".\",\n \"Solution\": \"The proposed hybrid system utilizes a Viessmann Vitocal 200-A Pro air source heat pump as the primary heating source. This highly efficient ASHP extracts heat from the ambient air, providing a sustainable and cost-effective heating solution. The existing oil boiler will serve as"
}
]
},
"safetyRatings": [
{
"category": "HARM_CATEGORY_HATE_SPEECH",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.040845715,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.03501263
},
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.09721884,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.05330468
},
{
"category": "HARM_CATEGORY_HARASSMENT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.06255973,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.034100424
},
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.07793769,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.026056303
}
]
}
]
},
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": " a backup system, ensuring uninterrupted comfort during periods of peak demand or extremely cold weather. This bivalent approach ensures optimal performance and reliability, maximizing energy savings and minimizing environmental impact.\"\n}\n```"
}
]
},
"safetyRatings": [
{
"category": "HARM_CATEGORY_HATE_SPEECH",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.028870905,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.03416482
},
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.07303239,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.061762705
},
{
"category": "HARM_CATEGORY_HARASSMENT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.05749328,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.028925717
},
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"probability": "NEGLIGIBLE",
"probabilityScore": 0.055310655,
"severity": "HARM_SEVERITY_NEGLIGIBLE",
"severityScore": 0.030100334
}
]
}
]
},
{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": ""
}
]
},
"finishReason": "STOP"
}
],
"usageMetadata": {
"promptTokenCount": 308,
"candidatesTokenCount": 171,
"totalTokenCount": 479
}
}
]
}
]