openai-cookbook icon indicating copy to clipboard operation
openai-cookbook copied to clipboard

InvalidRequestError: The model: `code-davinci-002` does not exist

Open spilehchiha opened this issue 1 year ago • 1 comments

Example Jupyter notebook titled Unit test writing using a multi-step prompt utilizes now-deprecated code-davinci-002 model and running the notebook produces the error.

InvalidRequestError: The model: `code-davinci-002` does not exist

code-davinci-002 is mentioned at two locations in the notebook:

First, in the first cell, discussing the multi-step prompt,

- Different models for different steps (e.g., `text-davinci-002` for the text planning steps and `code-davinci-002` for the code writing step)

and second, as the value for the code_model parameter of function unit_test_from_function

code_model: str = "code-davinci-002",  # if you don't have access to code models, you can use text models here instead

A model replacement is suggested.

spilehchiha avatar Apr 15 '23 17:04 spilehchiha