BuildShipBBuildShip
Powered by
HocusPocusH
BuildShip•2y ago•
5 replies
HocusPocus

JSON object in OpenAI Request

Hi all, I want to make an OpenAI API request by giving the message as an array, denoted as: "messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Who won the world series in 2020?" }
]
Since I want to give the chat history this seems the way OPENAI accepts the messages. However the messages key is not passed in my request. How can I solve this?
image.png
image.png
image.png
image.png
Solution
I was too quick to post it 🙂 I solved it by putting the messages array in the Body.
Jump to solution
BuildShip banner
BuildShipJoin
Join founders, builders, devs using Low-code / No-code to create backend, APIs, scheduled Jobs, automation, AI workflows
7,971Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

OpenAI + Twilio - Request Timeout
lucho_maiaLlucho_maia / ❓・buildship-help
2y ago
Extracting JSON value from OpenAI node output into Notion
AhmadAAhmad / ❓・buildship-help
3y ago
Facing Issue in OpenAI Assitant
urperfectdudeUurperfectdude / ❓・buildship-help
7mo ago
openAI assistant
KobiKKobi / ❓・buildship-help
7mo ago