kuldude
kuldude5mo ago

Basic Website Q&A Test Failed with 400

I ran a copy of the Website Q&A template through test. It failed with the following error message: "400 Thread messages or instructions must contain the word 'json' in some form to use 'response_format' of type 'json_object'." I created the assistant on openAI and used the correct assistantID and apiKey. Not sure what else I did wrong.
No description
Solution:
Hi @kuldude @Nikita, for the error where 'message[0].content' is missing, it arises when the user prompt is undefined. I'm guessing that the property that is being used in the user prompt input is not the same as what is being sent in by the request. The Jam shows that the property "prompt" of the Body is how the message is sent in. Can you check if that same property is used in the "User Prompt" input of the node...
Jump to solution
9 Replies
kuldude
kuldude5mo ago
I added the words "general response in JSON" in the instructions. And it seems to work. This is interesting. I've never seen this mentioned anywhere in BS. Would appreciate if someone can confirm if this is indeed needed. Thx.
kuldude
kuldude5mo ago
Now, I am facing another issue when calling this API/workflows from flutterflow. But I can see the error message here in BS. See my Jam. Can you explain why the 400 Missing required parameter: 'message[0].content'? Here's the Jam: https://jam.dev/c/cdbc2ad9-9606-4551-8195-2ae7b9f5ef25
Jam
Jam | Console logs, network requests, and more
Click this link to see the video on buildship.app, with console logs, network tab and device information.
Mike
Mike5mo ago
same issue
Solution
nithinrdy
nithinrdy5mo ago
Hi @kuldude @Nikita, for the error where 'message[0].content' is missing, it arises when the user prompt is undefined. I'm guessing that the property that is being used in the user prompt input is not the same as what is being sent in by the request. The Jam shows that the property "prompt" of the Body is how the message is sent in. Can you check if that same property is used in the "User Prompt" input of the node
nithinrdy
nithinrdy5mo ago
? I suspect that the property that the "User prompt" input is using, is actually Body.message, not Body.prompt
Mike
Mike5mo ago
yes, sir! i replaced message with prompt and all works now! Thank you!
kuldude
kuldude5mo ago
works now. thanks.
Mike
Mike5mo ago
did you tried to test it with flutterflow template? i have an issue with that. Responses are just not displayed in test app
kuldude
kuldude5mo ago
I did. It works in flutterflow. I might have change something. Will let you know tomorrow