Escape the prompt field in order to insert previous result in to to body of an OpenAI Completion?
Hi, hoping someone can provide a quick pointer. I'm trying to send a bit of JSON to a Completions model to get a text summary, but I can't seem to escape the field. Any hints?
6 Replies
in Test this step, you're putting the raw value, results.b doesn't exist in that context
what you likely want to do is to say "Test up to <X>"
Hey Ruben, thanks for the reply, I am sorry but I'm not following. What is <X> here?
Oh - I see what you meant now. Thanks for the pointer.
@rubenf sorry for the tag. I'm unsure how I need to properly format the "prompt" input. It either doesn't interpolate the value or the OpenAI API gives me this JSON error.
To make things simpler, {results.f} is just plain-text for now.
you need the whole object to be an expr
and then it's just plain javascript
no need to guess our interpolation
e.g:
({"foo": results.x})
or Ah ok, so something like this?
yup