Last active
February 9, 2023 17:38
-
-
Save AlexanderHolmeset/da532b1b2f209a3d52633cded681de72 to your computer and use it in GitHub Desktop.
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
Get-AzureOpenAIToken -APIKey "Enter API Key here" | |
$DeploymentName = "TextModel" | |
$ResourceName = "AzureOpenAIAlex" | |
$Prompt = "What is microsoft teams?" | |
$Request = Get-Completion -DeploymentName $DeploymentName -ResourceName $ResourceName -Maxtokens 100 -Prompt $Prompt | |
"Genetrated text:" | |
$Request.choices.text | |
"Token cost" | |
$Request.usage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment