Last active
April 26, 2023 00:20
-
-
Save darrenjrobinson/539c0736e9a95d9bb9d7570f19f48bb8 to your computer and use it in GitHub Desktop.
Simplified Set PowerShellAI OpenAI API Credentials Securely on Windows. Associated blogpost https://blog.darrenjrobinson.com/generative-ai-chatgpt-with-powershell/
This file contains hidden or 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
# 1. Import the OpenAI API Key from the local securely exported credential | |
$chatGPTCred = Import-Clixml .\chatGPTAPIKey.xml | |
# 2. Use the Set-OpenAIKey cmdlet to take the secure credential and set the OpenAIKey environment variable | |
Set-OpenAIKey -Key $chatGPTCred.Password | |
# 3. Import the PowerShellAI Module | |
Import-Module PowerShellAI |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment