-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2fda6f8
commit 8d1aad1
Showing
6 changed files
with
342 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Deploy Azure Resources\n", | ||
"\n", | ||
"https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=cli" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"az account show\n", | ||
"\n", | ||
"$location = \"eastus\"\n", | ||
"$resourceGroup = \"rg-elasticsearch-playground\"\n", | ||
"$aiResourceName = \"ai-elasticsearch-playground\"\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"az group create `\n", | ||
" --name rg-elasticsearch-playground `\n", | ||
" --location $location" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"az group show --name rg-elasticsearch-playground" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"az cognitiveservices account create `\n", | ||
" --name $aiResourceName `\n", | ||
" --resource-group $resourceGroup `\n", | ||
" --location $location `\n", | ||
" --kind OpenAI --sku s0" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"az cognitiveservices account show `\n", | ||
" --name $aiResourceName `\n", | ||
" --resource-group $resourceGroup | jq -r '.properties.endpoint'\n", | ||
"\n", | ||
"az cognitiveservices account keys list `\n", | ||
" --name $aiResourceName `\n", | ||
" --resource-group $resourceGroup | jq -r .key1" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"az cognitiveservices account `\n", | ||
" deployment create `\n", | ||
" --name $aiResourceName `\n", | ||
" --resource-group $resourceGroup `\n", | ||
" --deployment-name \"text-embedding-3-small\" `\n", | ||
" --model-name \"text-embedding-3-small\" `\n", | ||
" --model-version \"1\" `\n", | ||
" --model-format OpenAI `\n", | ||
" --sku-capacity \"1\" `\n", | ||
" --sku-name \"Standard\" `\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "pwsh" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelName": "pwsh" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"az cognitiveservices account deployment list `\n", | ||
" --name $aiResourceName `\n", | ||
" --resource-group $resourceGroup" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": ".NET (C#)", | ||
"language": "C#", | ||
"name": ".net-csharp" | ||
}, | ||
"polyglot_notebook": { | ||
"kernelInfo": { | ||
"defaultKernelName": "csharp", | ||
"items": [ | ||
{ | ||
"aliases": [], | ||
"languageName": "csharp", | ||
"name": "csharp" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.