(insertion) Unrecognized request argument supplied: suffix

I’m playing around with Codex insertion in the API. I can’t seem to get the suffix keyword to work as described in the docs.

        response = openai.Completion.create(
            engine="davinci-codex",
            prompt=prompt,
            suffix=suffix,
        )

This produces an error:

openai.error.InvalidRequestError: Unrecognized request argument supplied: suffix

Make sure you use the right model. The insert function is only supported by text-davinci-002 and code-davinci-002. Any other model will result in the error you received.

That fixed it - thanks so much!