Skip to content
How to overcome the...
 
Notifications
Clear all

How to overcome the "A valid JSON must be provided" error

17 Posts
4 Users
0 Reactions
9 Views
JabmoBabo
(@jabmobabo)
Posts: 10
Active Member
Topic starter
 

The output from the OpenAI node for today's final node (Signal) is as follows:


[
{
"id":
"chatcmpl-7QTTcrpw0z546jjR5EgGg6iPzD43m",
"object":
"chat.completion",
"created":
1686544203,
"model":
"gpt-3.5-turbo-0301",
"usage":
{
"prompt_tokens":
146,
"completion_tokens":
198,
"total_tokens":
344
},
"choices":
[
{
"message":
{
"role":
"assistant",
"content":
"Dzień dobry wszystkim! No i mamy już 6:30 rano, cześć cześć! Słuchajcie, rowerzyści, jeśli macie ochotę przejechać się dzisiaj, to lepiej się cieplej ubierzcie. Mamy tu duże zachmurzenie, temperatura to tylko 17.17 stopni Celsjusza, a wiatr mało - tylko 2.06 km/h. Więc chłodno i wystarczy jedna warstwa ubrań, nie ma co przesadzać. Ale zawsze mogą Państwo założyć hełm na nadmiar włosów, to zawsze będzie ciepło! 😀 Na razie to tyle, do zobaczenia jutro o tej samej porze! 😉"
},
"finish_reason":
"stop",
"index":
0
}
]
}
]

Signal node JSON (static base64 number and group ID have been removed):

{"base64_attachments":["data:image/jpeg;base64,xxxxx"],"message": "[Pogodynka] {{ $node.OpenAI1.json.choices[0].message.content }}" , "number": "+31xxxxxxxxx", "recipients": ["group.Mdf4MHFzU234dsfFVC342VZ43dW1tdGdLM0hYM14fdsFh43f0="]}

Error encountered:

NodeOperationError: JSON parameter need to be an valid JSON
    at Object.execute (/usr/local/lib/node_modules/callin.io/node_modules/callin.io-nodes-base/dist/nodes/HttpRequest/V3/HttpRequestV3.node.js:1070:35)
    at Workflow.runNode (/usr/local/lib/node_modules/callin.io/node_modules/callin.io-workflow/dist/Workflow.js:652:51)
    at /usr/local/lib/node_modules/callin.io/node_modules/callin.io-core/dist/WorkflowExecute.js:596:68
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
 
Posted : 12/06/2023 8:22 pm
system
(@system)
Posts: 332
Reputable Member
 

This discussion was automatically closed 90 days following the last response. New responses are no longer permitted.

 
Posted : 10/09/2023 8:23 pm
Page 2 / 2
Share: