Skip to content

Commit

Permalink
Fixing Powershell Code Strings
Browse files Browse the repository at this point in the history
  • Loading branch information
RisokHdz authored Aug 28, 2024
1 parent f8fd1c1 commit a46d083
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions deployments/docker/generate_api_key.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
Write-Host "Generating API key..."

# all characters
$API_KEY=(-join ((33..126) | Get-Random -Count 32 | % {[char]$_}))
# Define character ranges for alphanumeric characters
$chars = @()
$chars += 48..57 # 0-9
$chars += 65..90 # A-Z
$chars += 97..122 # a-z

# Generate API key
$API_KEY = -join ($chars | Get-Random -Count 64 | ForEach-Object { [char]$_ })
$env:AI_UNLIMITED_INIT_API_KEY = $API_KEY

Write-Host "API Key is generated, please export it by running the following command: \n"
Write-Host '$env:AI_UNLIMITED_INIT_API_KEY = $API_KEY'
Write-Host "API Key is generated, please export it by running the following command: `n"
Write-Host '$env:AI_UNLIMITED_INIT_API_KEY = $API_KEY'

0 comments on commit a46d083

Please sign in to comment.