Skip to content

Commit 32b5f10

Browse files
Fix minor issues
1 parent 0c4a314 commit 32b5f10

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ const result = await client.getChatCompletions(deploymentName, messages, { azure
173173

174174
---
175175

176-
- `"@azure/openai/types"` is imported which adds Azure-specific definitions (for example, `data_sources`) to the client types
176+
- `"@azure/openai/types"` is imported which adds Azure-specific definitions (for example, `data_sources`) to the client types.
177177
- The `azureExtensionOptions` property has been replaced with the inner `data_sources` property.
178178
- The `parameters` property has been added to wrap the parameters of the extension, which mirrors the schema of the Azure OpenAI service API.
179179
- Camel case properties have been replaced with snake case properties.
@@ -205,10 +205,10 @@ const result = await client.getAudioTranscription(deploymentName, audio);
205205

206206

207207

208-
- The `getAudioTranscription` method has been replaced with the `audio.transcriptions.create` method
209-
- The `AzureOpenAI` has to be constructed with the `deployment` option set to the deployment name in order to use audio operations such as `audio.transcriptions.create`
210-
- The `model` property is required to be set in the options object but its value isn't used in the operation so feel free to set it to any value
211-
- The `file` property accepts various types including `Buffer`, `fs.ReadaStream`, and `Blob` but in this example, a file is streamed from disk using `fs.createReadStream`
208+
- The `getAudioTranscription` method has been replaced with the `audio.transcriptions.create` method.
209+
- The `AzureOpenAI` has to be constructed with the `deployment` option set to the deployment name in order to use audio operations such as `audio.transcriptions.create`.
210+
- The `model` property is required to be set in the options object but its value isn't used in the operation so feel free to set it to any value.
211+
- The `file` property accepts various types including `Buffer`, `fs.ReadaStream`, and `Blob` but in this example, a file is streamed from disk using `fs.createReadStream`.
212212

213213
### Audio translation
214214

@@ -324,8 +324,8 @@ const threadResponse = await assistantsClient.createMessage(
324324
---
325325

326326

327-
- The `createMessage` method has been replaced with the `beta.threads.messages.create` method
328-
- The message specification has been moved from a parameter list to an object
327+
- The `createMessage` method has been replaced with the `beta.threads.messages.create` method.
328+
- The message specification has been moved from a parameter list to an object.
329329

330330
#### Runs
331331

@@ -367,8 +367,8 @@ do {
367367
368368
369369
370-
- The `createRun` method has been replaced with the `beta.threads.runs.create` and `createAndPoll` methods
371-
- The `createAndPoll` method is used to create a run and poll it until it is in a terminal state
370+
- The `createRun` method has been replaced with the `beta.threads.runs.create` and `createAndPoll` methods.
371+
- The `createAndPoll` method is used to create a run and poll it until it is in a terminal state.
372372
373373
#### Processing Run results
374374
@@ -418,9 +418,9 @@ const embeddings = await client.getEmbeddings(deploymentName, input);
418418
---
419419
420420
421-
- The `getEmbeddings` method has been replaced with the `embeddings.create` method
422-
- The `input` parameter is now passed in the options object with the `input` property
423-
- The `deploymentName` parameter has been removed. The `deploymentName` parameter isn't needed if the client was created with the `deployment` option. If the client was not created with the `deployment` option, the `model` property in the option object should be set with the deployment name
421+
- The `getEmbeddings` method has been replaced with the `embeddings.create` method.
422+
- The `input` parameter is now passed in the options object with the `input` property.
423+
- The `deploymentName` parameter has been removed. The `deploymentName` parameter isn't needed if the client was created with the `deployment` option. If the client was not created with the `deployment` option, the `model` property in the option object should be set with the deployment name.
424424
425425
### Image generation
426426
@@ -442,9 +442,9 @@ const results = await client.getImages(deploymentName, prompt, { n, size });
442442
443443
444444
445-
- The `getImages` method has been replaced with the `images.generate` method
446-
- The `prompt` parameter is now passed in the options object with the `prompt` property
447-
- The `deploymentName` parameter has been removed. The `deploymentName` parameter isn't needed if the client was created with the `deployment` option. If the client was not created with the `deployment` option, the `model` property in the option object should be set with the deployment name
445+
- The `getImages` method has been replaced with the `images.generate` method.
446+
- The `prompt` parameter is now passed in the options object with the `prompt` property.
447+
- The `deploymentName` parameter has been removed. The `deploymentName` parameter isn't needed if the client was created with the `deployment` option. If the client was not created with the `deployment` option, the `model` property in the option object should be set with the deployment name.
448448
449449
### Content filter
450450
@@ -492,8 +492,8 @@ for (const choice of results.choices) {
492492
---
493493
494494
495-
- camel case properties have been replaced with snake case properties
496-
- `"@azure/openai/types"` is imported which adds Azure-specific definitions (for example, content_filter_results) to the client types, see the [Azure types](#azure-types) section for more information
495+
- Camel case properties have been replaced with snake case properties.
496+
- `"@azure/openai/types"` is imported which adds Azure-specific definitions (for example, content_filter_results) to the client types, see the [Azure types](#azure-types) section for more information.
497497
498498
## Comparing Types
499499
@@ -561,4 +561,4 @@ The following table explores several type names from `@azure/openai` and shows t
561561
562562
## Next steps
563563
564-
- [Azure OpenAI Assistants](../concepts/assistants.md)
564+
- [Azure OpenAI Assistants](../concepts/assistants.md)

0 commit comments

Comments
 (0)