Skip to content

Sambsamb/PowerShellAI

 
 

Repository files navigation

Unleash the Power of Artificial Intelligence with PowerShell

Welcome to the PowerShell Artificial Intelligence repository! Here, you will find a collection of powerful PowerShell scripts that will enable you to easily integrate AI into your projects and take them to the next level. Imagine being able to interact directly with OpenAI's GPT AI with just a few simple commands. With this module, it's now possible.

Get Ahead of the Game

By using this module, you'll have the ability to add cutting-edge AI functionality to your projects without needing to have a deep understanding of the underlying technology. This means you can stay focused on what you do best while still being able to work with the latest and greatest.

Start Your AI Journey Today

Installation

In the PowerShell console:

Install-Module -Name PowerShellAI

Get/Create your OpenAI API key from https://beta.openai.com/account/api-keys and then set $env:OpenAIKey.

Examples

Check out these PowerShell scripts to see how easy it is to get started with AI in PowerShell:

PS Script Description Location
Disable-AIShortCutKey Disable the ctrl+g shortcut key go getting completions Disable-AIShortCutKey.ps1
Enable-AIShortCutKey Enable the ctrl+g Enable-AIShortCutKey.ps1
Get-GPT3Completion Get a completion from the OpenAI GPT-3 API Get-GPT3Completion.ps1

Demos of Get-GPT3Completion

Here are demos of Get-GPT3Completion posting your request to the OpenAI GPT-3 API and returning the completion:

Description YouTube Video
Quick Demo of PowerShellAI
Using PowerShell with OpenAI GPT in the console with a shortcut key

What it looks like

Get-GPT3Completion "list of planets only names as json"

[
    "Mercury",
    "Venus",
    "Earth",
    "Mars",
    "Jupiter",
    "Saturn",
    "Uranus",
    "Neptune"
]

As XML

Get-GPT3Completion "list of planets only names as xml"


<?xml version="1.0" encoding="UTF-8"?>
<planets>
  <planet>Mercury</planet>
  <planet>Venus</planet>
  <planet>Earth</planet>
  <planet>Mars</planet>
  <planet>Jupiter</planet>
  <planet>Saturn</planet>
  <planet>Uranus</planet>
  <planet>Neptune</planet>
</planets>

As Markdown

 Get-GPT3Completion "first 5 US presidents and terms as markdown table"


| President | Term |
|----------|------|
| George Washington | 1789-1797 |
| John Adams | 1797-1801 |
| Thomas Jefferson | 1801-1809 |
| James Madison | 1809-1817 |
| James Monroe | 1817-1825 |

Copy and pasted into this README.md:

President Term
George Washington 1789-1797
John Adams 1797-1801
Thomas Jefferson 1801-1809
James Madison 1809-1817
James Monroe 1817-1825

About

GPT-3 on the PowerShell command line

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%