AI-PowerShell (Ask-AI v.2) is a PowerShell function designed to simplify troubleshooting within PowerShell. With this tool, you can easily request assistance for resolving errors, rectifying syntax issues, or locating the right commands using the power of OpenAI's GPT-3 engine.
Before you get started, make sure you have the following prerequisites:
- PowerShell 5.1 or higher
- An OpenAI API key
- Clone or download this repository to your local machine.
- Open the
AskAI.ps1
file. - Replace
'OPENAI API HERE'
with your actual OpenAI API key. - Save the changes.
AI-PowerShell offers several options to customize your interaction:
/s
: Display the full message sent to OpenAI's API./d
: Request detailed assistance (expands tokens and word count from OpenAI)./a
: Display the full message and request detailed assistance./i
: Send a custom message to OpenAI's API./help
or/?
: Display the help message.
To request assistance with the last error message:
Ask-AI
To display the help message:
Ask-AI /?
This project is licensed under the MIT License - see the LICENSE file for details.