Help with openai
Hello,
Im trying to work with the new chat API from Openai. here is the cURL request example from their documentation:
the “messages” param is an array that must be formatted like so…
I've set up written the code in my api call and I have confirmed on webhook.site that im sending the messages array in the right format. here is my output to webhook.site:
my question is how can I set this up in xano api. Im getting stuck at what input I should use and how to map this correctly. here is my api:
I used a json object as the input, and set the value of the “messages” path to my input which is the json ob
Best Answer
-
Looks to me like you just have messages correct from the outset, so I would remove both “push” calls from the “messages” set call.
Beyond that, I can't quite see enough to share more insight. If you have more issues, share a little more!
We work on OpenAI and generative AI questions more generally as part of our “hardest 5%” in our daily office hours at State Change. These APIs can be a bit tricky, and the interactive format lets us crack through the issues faster.
Answers
-
Thank you!
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback