The OpenAI Python SDK's 1.0 release in November introduced significant updates along with breaking changes. This necessitates an update of all function-calling notebooks within this repository to align with the new v1.x SDK version, moving away from the deprecated v0.x versions.
This PR updates the notebooks to use the newer v1.x SDK.
Does this introduce a breaking change?
[x] Yes
[ ] No
The notebooks are already broken since the openai package version is not fixed, and v1 of the package introduced breaking changes. This PR updates the code in the function calling notebooks to work with the new SDK, but other code in the repo would also need to be updated.
Purpose
The OpenAI Python SDK's 1.0 release in November introduced significant updates along with breaking changes. This necessitates an update of all function-calling notebooks within this repository to align with the new
v1.x
SDK version, moving away from the deprecatedv0.x
versions.This PR updates the notebooks to use the newer
v1.x
SDK.Does this introduce a breaking change?
The notebooks are already broken since the
openai
package version is not fixed, and v1 of the package introduced breaking changes. This PR updates the code in the function calling notebooks to work with the new SDK, but other code in the repo would also need to be updated.There is a migration guide here: https://github.com/openai/openai-python/discussions/742 as well as documentation specific to those using Azure OpenAI service.
I used the latter for this PR.
Pull Request Type
What kind of change does this Pull Request introduce?
Updating notebooks from the deprecated
v0.x
openai python library to the newerv1.x
SDK.How to Test
update
config.json
with a validAZURE_OPENAI_ENDPOINT
,MODEL_NAME
andOPENAI_API_VERSION
, then run the following:What to Check
Verify that the notebook works as expected.