04_retrieval Notebook gives error

After trying on different laptops (even though running on webbrowser) it gives message about OpenAI model used is deprecated. Is there any way to get this part of the code working?

1 Like

Changing browsers will not fix this problem.
The problem is the course is trying to use an obsolete asset.
The course needs to be updated.

Hi - this is because ‘text-davinci-003’ is deprecated and the OpenAI() code library still uses that by default. To fix it, you can change it to using ‘gpt-3.5-turbo-instruct’ as the LLM instead.

To fix it, go a few boxes up to where you define the ‘llm’ variable (Just below the pretty_print_docs() function definition). Update the llm definition to such:

llm = OpenAI(model='gpt-3.5-turbo-instruct', temperature=0)

This fixed it for me and it should work for you.