webapi/DeploymentTemplates/DeploySK.ps1

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<#
.SYNOPSIS
Creates a Semantic Kernel service deployment.
#>

param(
    [Parameter(Mandatory)]
    [string]
    # Name for the deployment
    $DeploymentName,

    [Parameter(Mandatory)]
    [string]
    # Subscription to which to make the deployment
    $Subscription,

    [string]
    # Resource group to which to make the deployment
    $ResourceGroup = "",

    [string]
    # Region to which to make the deployment (ignored when deploying to an existing resource group)
    $Region = "South Central US",

    [string]
    # Package to deploy to web service
    $PackageUri = 'https://skaasdeploy.blob.core.windows.net/api/skaas.zip',

    [string]
    # SKU for the Azure App Service plan
    $AppServiceSku = "B1",

    [switch]
    # Switches on verbose template deployment output
    $DebugDeployment
)

$ErrorActionPreference = "Stop"

$templateFile = "$($PSScriptRoot)/sk.bicep"

if (!$ResourceGroup)
{
    $ResourceGroup = "rg-" + $DeploymentName
}

Write-Host "Log into your Azure account"
az login | out-null

az account set -s $Subscription
if ($LASTEXITCODE -ne 0) {
  exit $LASTEXITCODE
}

Write-Host "Creating resource group $($ResourceGroup) if it doesn't exist..."
az group create --location $Region --name $ResourceGroup --tags Creator=$env:UserName
if ($LASTEXITCODE -ne 0) {
  exit $LASTEXITCODE
}

后面还有 13 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。