Skip to content

Commit b6532b9

Browse files
Merge pull request #279470 from mrbullwinkle/mrb_06_27_2024_deployment_name
[Azure OpenAI] Update code comments
2 parents 9759699 + 6c93b44 commit b6532b9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/ai-services/openai/how-to/migration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ client = AzureOpenAI(
7474
)
7575

7676
response = client.chat.completions.create(
77-
model="gpt-35-turbo", # model = "deployment_name".
77+
model="gpt-35-turbo", # model = "deployment_name"
7878
messages=[
7979
{"role": "system", "content": "You are a helpful assistant."},
8080
{"role": "user", "content": "Does Azure OpenAI support customer managed keys?"},
@@ -135,7 +135,7 @@ deployment_name='REPLACE_WITH_YOUR_DEPLOYMENT_NAME' #This will correspond to the
135135
# Send a completion call to generate an answer
136136
print('Sending a test completion job')
137137
start_phrase = 'Write a tagline for an ice cream shop. '
138-
response = client.completions.create(model=deployment_name, prompt=start_phrase, max_tokens=10)
138+
response = client.completions.create(model=deployment_name, prompt=start_phrase, max_tokens=10) # model = "deployment_name"
139139
print(response.choices[0].text)
140140
```
141141

@@ -221,7 +221,7 @@ async def main():
221221
api_version = "2024-02-01",
222222
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT")
223223
)
224-
response = await client.chat.completions.create(model="gpt-35-turbo", messages=[{"role": "user", "content": "Hello world"}])
224+
response = await client.chat.completions.create(model="gpt-35-turbo", messages=[{"role": "user", "content": "Hello world"}]) # model = model deployment name
225225

226226
print(response.model_dump_json(indent=2))
227227

@@ -246,7 +246,7 @@ client = AzureOpenAI(
246246
)
247247

248248
completion = client.chat.completions.create(
249-
model="deployment-name", # gpt-35-instant
249+
model="deployment-name", # model = "deployment_name"
250250
messages=[
251251
{
252252
"role": "user",
@@ -281,7 +281,7 @@ client = openai.AzureOpenAI(
281281
)
282282

283283
completion = client.chat.completions.create(
284-
model=deployment,
284+
model=deployment, # model = "deployment_name"
285285
messages=[
286286
{
287287
"role": "user",

0 commit comments

Comments
 (0)