Skip to content

Commit da82878

Browse files
authored
Updating code and readme to reference the Azure's newest 2023-05-15 API version. (#452)
1 parent 2b21516 commit da82878

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ import openai
8484
openai.api_type = "azure"
8585
openai.api_key = "..."
8686
openai.api_base = "https://example-endpoint.openai.azure.com"
87-
openai.api_version = "2023-03-15-preview"
87+
openai.api_version = "2023-05-15"
8888

8989
# create a chat completion
9090
chat_completion = openai.ChatCompletion.create(deployment_id="deployment-name", model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hello world"}])
@@ -116,7 +116,7 @@ token = default_credential.get_token("https://cognitiveservices.azure.com/.defau
116116
openai.api_type = "azure_ad"
117117
openai.api_key = token.token
118118
openai.api_base = "https://example-endpoint.openai.azure.com/"
119-
openai.api_version = "2023-03-15-preview"
119+
openai.api_version = "2023-05-15"
120120

121121
# ...
122122
```

openai/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
api_type = os.environ.get("OPENAI_API_TYPE", "open_ai")
5151
api_version = os.environ.get(
5252
"OPENAI_API_VERSION",
53-
("2023-03-15-preview" if api_type in ("azure", "azure_ad", "azuread") else None),
53+
("2023-05-15" if api_type in ("azure", "azure_ad", "azuread") else None),
5454
)
5555
verify_ssl_certs = True # No effect. Certificates are always verified.
5656
proxy = None

0 commit comments

Comments
 (0)