Skip to content

Commit 12c291e

Browse files
Merge pull request #262285 from mrbullwinkle/mrb_01_03_2024_update_completions
[Azure OpenAI] Completions code fix
2 parents 4fb8e10 + 1754dee commit 12c291e

File tree

1 file changed

+3
-3
lines changed
  • articles/ai-services/openai/includes

1 file changed

+3
-3
lines changed

articles/ai-services/openai/includes/python.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Walkthrough on how to get started with Azure OpenAI and make your f
66
manager: nitinme
77
ms.service: azure-ai-openai
88
ms.topic: include
9-
ms.date: 02/02/2023
9+
ms.date: 01/03/2024
1010
keywords:
1111
---
1212

@@ -107,12 +107,12 @@ client = AzureOpenAI(
107107
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
108108
)
109109

110-
deployment_name='REPLACE_WITH_YOUR_DEPLOYMENT_NAME' #This will correspond to the custom name you chose for your deployment when you deployed a model.
110+
deployment_name='REPLACE_WITH_YOUR_DEPLOYMENT_NAME' #This will correspond to the custom name you chose for your deployment when you deployed a model. Use a gpt-35-turbo-instruct deployment.
111111

112112
# Send a completion call to generate an answer
113113
print('Sending a test completion job')
114114
start_phrase = 'Write a tagline for an ice cream shop. '
115-
response = client.chat.completions.create(model=deployment_name, prompt=start_phrase, max_tokens=10)
115+
response = client.completions.create(model=deployment_name, prompt=start_phrase, max_tokens=10)
116116
print(response.choices[0].text)
117117
```
118118

0 commit comments

Comments
 (0)