Example OpenAI request?

Hello all,

Low-coder here - I am trying to setup an example app to pass requests to OpenAi- and then receive a response, and I'm trying to start super simple- but I am struggling.

I believe the resource is setup correctly, and my key is fine - as I tested it outside of retool (using Postman and some youtube tutorials).

Where I am struggling, is just knowing what parameters to place in my query and where.

Any tutorials I can find are not Retool specific and so I am not sure which parts of it Retool is already doing (I.e. it authenticates via the resource and of course not the query)... so putting my query together, I am not really getting anywhere, and I know I am missing elements.

I think all I need is to see a simple screenshot of a query which is referencing the OpenAi API, and I can take it from there....

Any help is greatly appreciated,
thanks.Neil

Hi @maillme ,

As your response is suggesting, you missed the messages prop that is required in chat/completions endpoint.

This is a quick example of what you need to add:

Hope this help

1 Like

thank you! got it working now.

1 Like