Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save darrenjrobinson/c6ab46fa524e9a202a035e58d95f98f7 to your computer and use it in GitHub Desktop.
Save darrenjrobinson/c6ab46fa524e9a202a035e58d95f98f7 to your computer and use it in GitHub Desktop.
PowerShellAI OpenAI Graphical User Interface. Associated blogpost https://blog.darrenjrobinson.com/generative-ai-chatgpt-with-powershell/
# 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
# 4. Start the GUI
.\Invoke-GenerateContent.ps1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment