Errata

Developing Apps with GPT-4 and ChatGPT

Errata for Developing Apps with GPT-4 and ChatGPT

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
PDF Page p. 35
“Hello World” Example

The code does not run and gives an error. You can solve it like this:
pip install openai==0.28


Because of this:
You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0 - see the README at github: openai-python for the API.
You can run `openai migrate` to automatically upgrade your codebase to use the 1.0.0 interface.
Alternatively, you can pin your installation to the old version, e.g. `pip install openai==0.28`
A detailed migration guide is available here: github: openai/openai-python/discussions/742

Daryoush  Nov 26, 2023 
PDF Page p. 35
“Hello World” Example

You may need to run these commands:

pip install python-dotenv

pip install requests

Daryoush  Nov 26, 2023