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

same issue Have you found any solution??

Abhiram-003 avatar May 29 '23 05:05 Abhiram-003

same

JusttCallMeMike avatar Jun 21 '23 10:06 JusttCallMeMike

As of last month, there's an updated version: https://github.com/openai/openai-cookbook/blob/main/examples/Unit_test_writing_using_a_multi-step_prompt.ipynb

You can also change the model from code-davinci-002 to text-davinci-002.

ted-at-openai avatar Jun 21 '23 16:06 ted-at-openai

Is text-davinci-002 however optimized for code-completion tasks as code-davinci ?

Varagos avatar Jul 05 '23 11:07 Varagos

Not the same, but should be similar. It's the same base model: https://platform.openai.com/docs/model-index-for-researchers

ted-at-openai avatar Jul 10 '23 19:07 ted-at-openai

Hi, I also meet this problem :The model code-davinci-002 does not exist or you do not have access to it.

But I notice there is a page mentioned that code-davinci-002 will shut down at 2024. So, we can not use it now?

Feng-Jay avatar Jul 27 '23 23:07 Feng-Jay

code-davinci-002 is no longer available to the general public. It's available to researchers only. It will be shut off in 2024. Use the new version of the notebook.

ted-at-openai avatar Jul 27 '23 23:07 ted-at-openai