diff --git a/README.md b/README.md index 76f9e9b58e..4199f946b3 100644 --- a/README.md +++ b/README.md @@ -84,10 +84,10 @@ import openai openai.api_type = "azure" openai.api_key = "..." openai.api_base = "https://example-endpoint.openai.azure.com" -openai.api_version = "2022-12-01" +openai.api_version = "2023-03-15-preview" # create a completion -completion = openai.Completion.create(engine="deployment-name", prompt="Hello world") +completion = openai.Completion.create(deployment_id="deployment-name", prompt="Hello world") # print the completion print(completion.choices[0].text) @@ -116,7 +116,7 @@ token = default_credential.get_token("https://cognitiveservices.azure.com/.defau openai.api_type = "azure_ad" openai.api_key = token.token openai.api_base = "https://example-endpoint.openai.azure.com/" -openai.api_version = "2022-12-01" +openai.api_version = "2023-03-15-preview" # ... ``` diff --git a/openai/__init__.py b/openai/__init__.py index 2b184226df..f80085eada 100644 --- a/openai/__init__.py +++ b/openai/__init__.py @@ -37,7 +37,7 @@ api_base = os.environ.get("OPENAI_API_BASE", "https://api.openai.com/v1") api_type = os.environ.get("OPENAI_API_TYPE", "open_ai") api_version = ( - "2022-12-01" if api_type in ("azure", "azure_ad", "azuread") else None + "2023-03-15-preview" if api_type in ("azure", "azure_ad", "azuread") else None ) verify_ssl_certs = True # No effect. Certificates are always verified. proxy = None