Skip to content

Commit

Permalink
workshop wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Lovan committed Feb 3, 2025
1 parent ded1cf6 commit a787ebb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
10 changes: 6 additions & 4 deletions workshop/content/document_data_management/2_azure_oai.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ title: Deploying Azure OpenAI resource and models

We will start by creating an **Azure OpenAI resource** in the new resource group you created in the [Prerequisites](/azure-open-ai-rag-oyd-text-images/prerequisites#create-azure-resource-group) section. Please run the following command to create the resource:

```bash {class="bash-class" id="bash-codeblock" lineNos=inline tabWidth=2}
<!-- ```bash {class="bash-class" id="bash-codeblock" lineNos=inline tabWidth=2}
az cognitiveservices account create \
--name "${resource_group_name}" \
--resource-group "${resource_group_name}" \
--location "${region}" \
--kind OpenAI \
--sku s0 \
--yes
```
``` -->

{{< copycode lang="bash" >}}
az cognitiveservices account create \
Expand All @@ -50,14 +50,16 @@ Let's verify that Azure OpenAI Service resource was created successfully. Navig

Run the command below to get the URL to the resource group you created prior.

```bash {class="bash-class" id="bash-codeblock" lineNos=inline tabWidth=2}
{{< copycode lang="bash" >}}

domain=$(az rest --method get --url https://graph.microsoft.com/v1.0/domains --query 'value[?isDefault].id' -o tsv)
subscription_id=$(az account show | jq -r .id)
url="https://ms.portal.azure.com/#@${domain}/resource/subscriptions/${subscription_id}/resourceGroups/${resource_group_name}/overview"

# URL to the Azure resource group to see the created resources in it.
echo "${url}"
```
{{< /copycode >}}

</details>

![alt](../../images/document_data_management_2_azure_oai_1.png)
Expand Down
1 change: 1 addition & 0 deletions workshop/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ menu:
markup:
highlight:
style: "dracula"
# noClasses: false
goldmark:
renderer:
unsafe: true
Expand Down
4 changes: 2 additions & 2 deletions workshop/layouts/shortcodes/copycode.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
window.copyCodeInitialized = true;

function copyCode(button) {
const codeBlock = button.nextElementSibling.querySelector('code');
const codeBlock = button.nextElementSibling.querySelector('code');
if (!codeBlock) {
console.error('No code block found!');
return;
Expand Down Expand Up @@ -99,5 +99,5 @@
<button class="copy-button" aria-label="Copy code" onclick="copyCode(this)">
📋 Copy
</button>
<pre><code class="{{ .Get "lang" | default "language-none" }}">{{ .Inner | safeHTML }}</code></pre>
<pre><code class="language-{{ .Get "lang" | default "none" }}" >{{ .Inner | safeHTML }}</code></pre>
</div>

0 comments on commit a787ebb

Please sign in to comment.