Skip to content

Commit 78debe2

Browse files
committed
fit and finish javascript and ts quickstarts
1 parent 158dc87 commit 78debe2

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

articles/ai-services/openai/includes/text-to-speech-javascript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Your app's _package.json_ file will be updated with the dependencies.
7070

7171
// Required Azure OpenAI deployment name and API version
7272
const deploymentName = process.env.AZURE_OPENAI_DEPLOYMENT_NAME || "tts";
73-
const apiVersion = process.env.OPENAI_AOI_VERSION || "2024-08-01-preview";
73+
const apiVersion = process.env.OPENAI_API_VERSION || "2024-08-01-preview";
7474

7575
// keyless authentication
7676
const credential = new DefaultAzureCredential();

articles/ai-services/openai/includes/use-your-data-common-variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You need to retrieve the following information to authenticate your application
1515
|Variable name | Value |
1616
|--------------------------|-------------|
1717
| `AZURE_OPENAI_ENDPOINT` | This value can be found in the **Keys & Endpoint** section when examining your Azure OpenAI resource from the Azure portal. An example endpoint is: `https://my-resoruce.openai.azure.com`.|
18-
| `AZURE_OPENAI_DEPLOYMENT_ID` | This value corresponds to the custom name you chose for your deployment when you deployed a model. This value can be found under **Resource Management** > **Deployments** in the Azure portal.|
18+
| `AZURE_OPENAI_DEPLOYMENT_NAME` | This value corresponds to the custom name you chose for your deployment when you deployed a model. This value can be found under **Resource Management** > **Deployments** in the Azure portal.|
1919
| `AZURE_AI_SEARCH_ENDPOINT` | This value can be found in the **Overview** section when examining your Azure AI Search resource from the Azure portal. |
2020
| `AZURE_AI_SEARCH_INDEX` | This value corresponds to the name of the index you created to store your data. You can find it in the **Overview** section when examining your Azure AI Search resource from the Azure portal. |
2121

@@ -27,7 +27,7 @@ Learn more about [keyless authentication](/azure/ai-services/authentication) and
2727
|--------------------------|-------------|
2828
| `AZURE_OPENAI_ENDPOINT` | This value can be found in the **Keys & Endpoint** section when examining your Azure OpenAI resource from the Azure portal. An example endpoint is: `https://my-resoruce.openai.azure.com`.|
2929
| `AZURE_OPENAI_API_KEY` | This value can be found in **Resource management** > **Keys & Endpoint** section when examining your Azure OpenAI resource from the Azure portal. You can use either `KEY1` or `KEY2`. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption. |
30-
| `AZURE_OPENAI_DEPLOYMENT_ID` | This value corresponds to the custom name you chose for your deployment when you deployed a model. This value can be found under **Resource Management** > **Deployments** in the Azure portal.|
30+
| `AZURE_OPENAI_DEPLOYMENT_NAME` | This value corresponds to the custom name you chose for your deployment when you deployed a model. This value can be found under **Resource Management** > **Deployments** in the Azure portal.|
3131
| `AZURE_AI_SEARCH_ENDPOINT` | This value can be found in the **Overview** section when examining your Azure AI Search resource from the Azure portal. |
3232
| `AZURE_AI_SEARCH_API_KEY` | This value can be found in the **Settings** > **Keys** section when examining your Azure AI Search resource from the Azure portal. You can use either the primary admin key or secondary admin key. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption. |
3333
| `AZURE_AI_SEARCH_INDEX` | This value corresponds to the name of the index you created to store your data. You can find it in the **Overview** section when examining your Azure AI Search resource from the Azure portal. |

articles/ai-services/openai/includes/use-your-data-dotnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ using static System.Environment;
2424

2525
string azureOpenAIEndpoint = GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT");
2626
string azureOpenAIKey = GetEnvironmentVariable("AZURE_OPENAI_API_KEY");
27-
string deploymentName = GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_ID");
27+
string deploymentName = GetEnvironmentVariable("AZURE_OPENAI_DEPLOYMENT_NAME");
2828
string searchEndpoint = GetEnvironmentVariable("AZURE_AI_SEARCH_ENDPOINT");
2929
string searchKey = GetEnvironmentVariable("AZURE_AI_SEARCH_API_KEY");
3030
string searchIndex = GetEnvironmentVariable("AZURE_AI_SEARCH_INDEX");

articles/ai-services/openai/includes/use-your-data-go.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ms.date: 01/17/2025
3939

4040
func main() {
4141
azureOpenAIKey := os.Getenv("AZURE_OPENAI_API_KEY")
42-
modelDeploymentID := os.Getenv("AZURE_OPENAI_DEPLOYMENT_ID")
42+
modelDeploymentID := os.Getenv("AZURE_OPENAI_DEPLOYMENT_NAME")
4343

4444
// Ex: "https://<your-azure-openai-host>.openai.azure.com"
4545
azureOpenAIEndpoint := os.Getenv("AZURE_OPENAI_ENDPOINT")

articles/ai-services/openai/includes/use-your-data-python.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dotenv.load_dotenv()
5454

5555
endpoint = os.environ.get("AZURE_OPENAI_ENDPOINT")
5656
api_key = os.environ.get("AZURE_OPENAI_API_KEY")
57-
deployment = os.environ.get("AZURE_OPENAI_DEPLOYMENT_ID")
57+
deployment = os.environ.get("AZURE_OPENAI_DEPLOYMENT_NAME")
5858

5959
client = openai.AzureOpenAI(
6060
azure_endpoint=endpoint,
@@ -132,12 +132,12 @@ print(f"{completion.choices[0].message.role}: {completion.choices[0].message.con
132132

133133
openai.requestssession = session
134134

135-
aoai_deployment_id = os.environ.get("AZURE_OPENAI_DEPLOYMENT_ID")
135+
aoai_deployment_id = os.environ.get("AZURE_OPENAI_DEPLOYMENT_NAME")
136136
setup_byod(aoai_deployment_id)
137137

138138
completion = openai.ChatCompletion.create(
139139
messages=[{"role": "user", "content": "What are my available health plans?"}],
140-
deployment_id=os.environ.get("AZURE_OPENAI_DEPLOYMENT_ID"),
140+
deployment_id=os.environ.get("AZURE_OPENAI_DEPLOYMENT_NAME"),
141141
dataSources=[ # camelCase is intentional, as this is the format the API expects
142142
{
143143
"type": "AzureCognitiveSearch",

articles/ai-services/openai/includes/use-your-data-rest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ To trigger a response from the model, you should end with a user message indicat
2020
> There are several parameters you can use to change the model's response, such as `temperature` or `top_p`. See the [reference documentation](../reference.md#completions-extensions) for more information.
2121
2222
```bash
23-
curl -i -X POST $AZURE_OPENAI_ENDPOINT/openai/deployments/$AZURE_OPENAI_DEPLOYMENT_ID/chat/completions?api-version=2024-10-21 \
23+
curl -i -X POST $AZURE_OPENAI_ENDPOINT/openai/deployments/$AZURE_OPENAI_DEPLOYMENT_NAME/chat/completions?api-version=2024-10-21 \
2424
-H "Content-Type: application/json" \
2525
-H "api-key: $AZURE_OPENAI_API_KEY" \
2626
-d \

0 commit comments

Comments
 (0)