Skip to content

Instantly share code, notes, and snippets.

View krnese's full-sized avatar
💭
Living the dream

Kristian Nese krnese

💭
Living the dream
View GitHub Profile
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"roleGuid": {
"type": "string",
"defaultValue": "[guid(deployment().name)]"
}
},
"resources": [
@krnese
krnese / GPT4Vision and Computer Vision
Created February 20, 2024 08:31
GPT4 Vision sample sequence and requests
# Validation of GPT4-vision and AI Vision indexer
# Azure Open AI configuration
$AzureOpenAIEndpoint = ""
$VisionDeploymentName = ""
# Storage Configuration
$StorageAccountEndpoint = ""
@krnese
krnese / RAG
Created January 30, 2024 15:28
rag validation
# Azure Open AI configuration
$AzureOpenAIEndpoint = ""
$DeploymentName = ""
$EmbeddingDeploymentName = ""
$Prompt = ""
# Azure AI search configuraton
@krnese
krnese / Interact with Azure Open AI (GPT4 Vision)
Created January 17, 2024 13:50
New-AzOpenAIVisionPrompt.ps1
function New-AzOpenAIVisionPrompt {
<#
- Kristian Nese, SWAT team
Quick function to validate 1) access to Azure Open AI instance (GTP4), and 2) ability to generate a prompt, with 3) reference to an image URL.
Note: for this to work, the caller ID must have appropriate permissions to the Azure Open AI instance via data plane RBAC.
This is brought to you by the courtesy of Kristian, who is a true believer of Leo Messi.
.Synopsis
Prompt Azure Open AI w Vision using PowerShell function
.Example
@krnese
krnese / New-AzOpenAIPrompt.ps1
Created October 12, 2023 14:49
Azure Open AI API prompt
function New-AzOpenAIPrompt {
<#
10/10/2023 - Kristian Nese, SWAT team
Quick function to validate 1) access to Azure Open AI instance (GTP4), and 2) ability to generate a prompt.
Note: for this to work, the caller ID must have appropriate permissions to the Azure Open AI instance via data plane RBAC.
This is brought to you by the courtesy of Kristian, who is a true believer of Leo Messi.
.Synopsis
Prompt Azure Open AI using PowerShell function
.Example
@krnese
krnese / ARM template
Created August 18, 2023 09:40
Link DNS Zones to connectivity hubs
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"rgName": {
"type": "string",
"metadata": {
"description": "Provide name for resource group"
}
},
@krnese
krnese / ARM template
Last active August 18, 2023 08:34
VNet Peering of existing VNet
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vNetRgName": {
"type": "string",
"metadata": {
"description": "Provide a name for the resource group that will contain the virtual network."
}
},
@krnese
krnese / ARM template
Last active October 31, 2023 19:26
Compliant VNet config
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"addressPrefix": {
"type": "string",
"defaultValue": "192.168.0.0/16"
},
"vnetName": {
"type": "string",
@krnese
krnese / PolicyDefinition
Created August 17, 2023 17:05
Azure Policy for Azure Activity Diagnostic to Event Hub
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/managementGroupDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"resources": [
{
"type": "Microsoft.Authorization/policyDefinitions",
"apiVersion": "2021-06-01",
"name": "Diag-AzAc-EH",
"properties": {
@krnese
krnese / Subnet
Created August 8, 2023 12:12
Compliant subnet
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vnetName": {
"defaultValue": "knvnet-eastus",
"type": "String"
},
"nsgName": {
"defaultValue": "nsg-eastus",