Skip to content

Commit

Permalink
Bicep with Entra files
Browse files Browse the repository at this point in the history
  • Loading branch information
johnthebrit committed Aug 4, 2024
1 parent bc9c84e commit 3dabe0b
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 3 deletions.
5 changes: 2 additions & 3 deletions AI/getcompletion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ function Edit-TextSegment {
$body = [ordered]@{
messages = $messages
max_tokens = 4096
temperature = 0.7
top_p = 0.7
temperature = 0.3
} | ConvertTo-Json

# Send a request to generate an answer
Expand All @@ -63,7 +62,7 @@ $openai = @{
api_key = (Get-Secret -Name OpenAIKey -AsPlainText) # one of the 2 keys for your OpenAI resource
api_base = (Get-Secret -Name OpenAIEndpoint -AsPlainText) # your endpoint, e.g. https://RESOURCE_NAME.openai.azure.com/
api_version = '2023-05-15' # Curren API at time of creation
name = 'gpt4' #This will correspond to the custom name you chose for your deployed model
name = 'gpt-4o' #This will correspond to the custom name you chose for your deployed model
}

$headers = [ordered]@{
Expand Down
5 changes: 5 additions & 0 deletions Bicep/bicepconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"experimentalFeaturesEnabled": {
"extensibility": true
}
}
20 changes: 20 additions & 0 deletions Bicep/entrademo.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
extension microsoftGraph

// param location string = resourceGroup().location

resource testgroup1 'Microsoft.Graph/[email protected]' = {
displayName: 'Test Group 1'
mailEnabled: false
mailNickname: 'test-group-1'
securityEnabled: true
uniqueName: 'testgroup1'
members: [
'730c65b5-18ac-4cbf-a922-2469d4366110'
'0a27b6b7-2327-4ce6-94c8-78008693bbd9'
]
}

// resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
// name: 'testUAMI007'
// location: location
// }
4 changes: 4 additions & 0 deletions Bicep/entrademo.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
New-AzResourceGroup -Name entraBicepRG -Location eastus

New-AzResourceGroupDeployment -ResourceGroupName entraBicepRG `
-TemplateFile ./entrademo.bicep
Binary file added Whiteboards/EntraBicep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3dabe0b

Please sign in to comment.