Welcome to PowerShell AI Assistant
, a module designed for seamless integration with OpenAI Assistant
APIs, providing a rich set of functionalities to empower your PowerShell scripts with the latest AI technologies. Dive into an enhanced scripting experience by leveraging an AI-powered assistant in your console.
PowerShell AI Assistant
is where advanced AI meets PowerShell scripting. With this module, you can create interactive, intelligent scripts and applications that understand and process natural language with ease.
Note: If you have
PowerShellAI
you can safelyPowerShellAIAssistant
using-AllowClobber
Install-Module PowerShellAIAssistant -AllowClobber
- Create an OpenAI account or sign in.
- Navigate to the API key page.
- Click "Create new secret key", optionally naming the key. Make sure to save this somewhere safe and do not share it with anyone.
- Set the environment variable
OpenAIKey
to your API key. - Open a new PowerShell and type
$ENV:OpenAIKey
. If you do not see your API key, you may need to either restart your computer or use a script like Refresh-EnvironmentVariables for it to be detected. - Run the Sanity-Check script, which will create and delete an assistant on OpenAI to confirm it's working. If it works, you're good to go.
There is one example and it is in a Polyglot Interactive Notebook titled Assistants API overview. This notebook shows how to use the Assistants API to build a simple question answering interaction.
After creating an Azure OpenAI resource, you can use the PowerShellAIAssistant
module to interact with it.
You need to get the following secrets form the Azure Portal and Azure AI Studio - apiURI
,apiVersion
,apiKey
,deploymentName
.
$secrets = @{
apiURI = "<Your Azure OpenAI API URI>"
apiVersion = "<Your Azure OpenAI API Version>"
apiKey = "<Your Azure OpenAI API Key>"
deploymentName = "<Your Azure OpenAI Deployment Name>"
}
Set-OAIProvider AzureOpenAI
Set-AzOAISecrets @secrets
See: Simple-Tutor-Azure-OpenAI.ps1
A Set-OAIProvider
and Get-OAIProvider
function are available to switch between OpenAI and Azure OpenAI.
- Easy integration with OpenAI's Assistants API
- Build conversational AI models within PowerShell
- Access a suite of AI capabilities for natural language processing, understanding, and decision making
- Extend your automation scripts with smart AI assistant features
I am developing PowerShell AI Assistant
transparently, and I welcome you to participate in this innovative journey:
- Transparency: Witness the development process as it unfolds.
- Collaboration: Contribute ideas, code, or feedback to help shape the project.
- Education: Observe and learn from ongoing development practices and community interaction.
I am Doug Finke, a PowerShell expert, AI developer, and a 15x Microsoft MVP, dedicated to merging the potential of AI with the flexibility of PowerShell.
Follow the project's progress and stay in touch by following me on
and by watching the repo.
I'm excited to see how PowerShell AI Assistant
will revolutionize your scripting and automation tasks.
Join us to push the boundaries of what's possible with AI in PowerShell!