Hello, I have a problem with using HTTP Request JSON parameter.
This is my JSON:
{
“messages”: [
{
“role”: “user”,
“content”: {{ $fromAI(“rag-question”) }}
}
],
“stream”: false,
“model”: “gpt-4o”
}
Returns me a green light and the correct content, but still shows me “JSON parameter needs to be valid JSON” when I tried to execute it.
Hi @Zdravko_Dimitrov , you need to wrap the value you’re inserting in double quotes so that the result becomes a valid JSON.
The line should look like this “content”: "{{ $fromAI(“rag-question”) }}"
For more complex values like arrays or nested json it’s also conveninet to use “content”: {{ JSON.stringify($myValue) }} which is going to automatically wrap the value in quotes and escape any characters inside if needed.