Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
lil1
Contributor
Contributor

Why i get this message from Qlik when i reload; "We could not parse the JSON body of your request"

Hi,

i get this message :

"We could not parse the JSON body of your request" when i reload. also this message: 

"HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON"

 

I use Rest Connector to integrate my data to API.

here is my Rest  connection info:

{
"model": "text-davinci-003",
"prompt": "Say this is a test",
"max_tokens": 7,
"temperature": 0
}

 

My column's name are: 

BrickName,
MarketName,
BrandName,
YearMonth,
Sales,
MS%

json format of above columns are like this:

'*Sales*: [' & concat('{*BrickName*: *'& BrickName & '*,
*MarketName*: *' & MarketName & '*,*BrandName*: *' & BrandName & '*,*YearMonth*: *' & YearMonth & '*,
*Sales*: *' & Sales & '*, *MS%*: *' & MS% & '*}' , ',') & ']' as JSON

i don't know where is my problem? 

Thank u

Labels (3)
1 Reply
rzenere_avvale
Partner - Specialist II
Partner - Specialist II

Hey there @lil1 ,
I've not tried yet the OpenAI APIs, but I would say that the error message hints right at the JSON that you are trying to use.
Could you paste it here, or check that what you're trying to create is valid? Personally I use jsonformatter.org, but any website/tool is fine to check if the JSON is valid or not (just be careful with sensitive information)

I hope this helps,
Riccardo