@@ -74,7 +74,7 @@ client = AzureOpenAI(
74
74
)
75
75
76
76
response = client.chat.completions.create(
77
- model = " gpt-35-turbo" , # model = "deployment_name".
77
+ model = " gpt-35-turbo" , # model = "deployment_name"
78
78
messages = [
79
79
{" role" : " system" , " content" : " You are a helpful assistant." },
80
80
{" 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
135
135
# Send a completion call to generate an answer
136
136
print (' Sending a test completion job' )
137
137
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"
139
139
print (response.choices[0 ].text)
140
140
```
141
141
@@ -221,7 +221,7 @@ async def main():
221
221
api_version = " 2024-02-01" ,
222
222
azure_endpoint = os.getenv(" AZURE_OPENAI_ENDPOINT" )
223
223
)
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
225
225
226
226
print (response.model_dump_json(indent = 2 ))
227
227
@@ -246,7 +246,7 @@ client = AzureOpenAI(
246
246
)
247
247
248
248
completion = client.chat.completions.create(
249
- model = " deployment-name" , # gpt-35-instant
249
+ model = " deployment-name" , # model = "deployment_name"
250
250
messages = [
251
251
{
252
252
" role" : " user" ,
@@ -281,7 +281,7 @@ client = openai.AzureOpenAI(
281
281
)
282
282
283
283
completion = client.chat.completions.create(
284
- model = deployment,
284
+ model = deployment, # model = "deployment_name"
285
285
messages = [
286
286
{
287
287
" role" : " user" ,
0 commit comments