-
Thank you Darren Robinson
- max_tokens increased to what Azure OpenAI supports https://github.com/dfinke/PowerShellAI/issues/173
-
Added
$name
toNew-ChatMessageTemplate
. Required when a message has the role of function
- Thank you Shaun Lawrie
- Fixed progress bars for users with proxies configured https://github.com/dfinke/PowerShellAI/pull/171
- Added a new role
function
for messages
- Fix "[] is too short - 'messages'" https://github.com/dfinke/PowerShellAI/issues/163
- Thank you merlinfrombelgium
- Introduce re-prompting after explain is chosen in copilot function
- Updated to latest models for interacting with GPT
- Added example:
Read-ExcelAndMultiplyUnits.ps1
Uses the ImportExcel
Get-ExcelFileSchema
to read the schema of the Excel file, then creates GPT chat messages for the user and system, the prompt read the excel file multiply the units by 20%
. Finally, it outputs the PowerShell code that reads the Excel file, multiplies the units by 20%, and formats the output as a table.
Thank you Shaun Lawrie
- Fix GPT fails when run from a PSDrive
- Reported by Jeff Hicks - https://github.com/dfinke/PowerShellAI/issues/148
- Implement mechanism to turn on/off persistence of chat message
- Add
Get-CompletionFromMessages
so you can get messages can be passes standalone to get the completions
- Fixed spaces in property names #141
- Thank you Shaun Lawrie!
- Fix function builder not running with latest PowerShellAI
- Fix write-progress breaking notebooks
- Thank you Shaun Lawrie!
- Added
Write-Progress
, tests and mocks
- Added
- Added
Write-Information
as an indicator after callint GPT
New-Chat
refactored- Now immediately posts to GPT if you specify a prompt and displays the response
- No prompt, still closes existing session and creates a new one
- Improved the
system prompt
forcopilot
gh?
function - Make
New-NBCell
public
- Added
Get-OpenAIEmbedding
to get a vector representation of a given input - Added
-temperature
param tochat
- Added "send to vs code" option to menu
- Added two new functions:
git?
: Translate natural language to Git commandsgh?
: Translate natural language to GitHub CLI commands
Full Changelog: https://github.com/dfinke/PowerShellAI/compare/v0.6.1...v0.6.2
- Upgraded
copilot
andexplain
to useWrite-CodeBlock
fir syntax highlighting - Added call to
Invoke-Formatter
to prettify the code
- Fixed
Invalid JSON
- https://github.com/dfinke/PowerShellAI/issues/119
Thank you @ShaydeNofziger for the contribution!
- Update .gitignore
- Update help comment
Also, I:
- Added
kql
to validate set forNBCopilot
Thanks Shaun, great work!
AI Function Builder
by Shaun Lawrie- AIFunctionBuilder takes a prompt and generates a PowerShell function which is validated for syntax and logical issues so you don't have to do the boring work.
- https://github.com/dfinke/PowerShellAI/tree/master/CommunityContributions/06-AIFunctionBuilder#readme
Notebook Copilot
by Doug Finke- This PowerShell function allows you to use ChatGPT directly from your Interactive Notebook.
- https://github.com/dfinke/PowerShellAI/tree/master/CommunityContributions/07-NotebookCopilot#readme
Devcontainer
created for easier use in Codespaces Doug Finke
- Enables chat conversations with either the public OpenAI or a private Azure OpenAI Service.
Community Contributions:
- Thank you Svyatoslav Pidgorny
-
Copilot prompt change, adding clipboard
PS D:\> copilot 'cmds to find k8 pods' ╔═════════════════════════╗ ║Q: cmds to find k8 pods ║ ║═════════════════════════║ ║1: kubectl get pods ║ ╚═════════════════════════╝ Run the code? You can also choose additional actions [Y] Yes [E] Explain [C] Copy [N] No [?] Help (default is "N"):
-
- @SP3269 made their first contribution in https://github.com/dfinke/PowerShellAI/pull/105
- Added support for GPT-4, conversation-in and message-out
- Saves the conversation to a file in each invocation
- Supports changing chat options like the model like
gpt-4
orgpt-3.5-turbo
and more - List sessions that have been saved, plus you can get their content
Note: This defaults to using gpt-4
. You can set the model to chat with:
Get-ChatSessionOptions
Set-ChatSessionOption -model gpt-3.5-turbo
Get-ChatSessionOptions
Getting started example:
New-Chat 'respond only in json'
chat 'what are the capitals of Spain, France, and the USA?'
{
"Spain": "Madrid",
"France": "Paris",
"USA": "Washington, D.C."
}
- Copilot can now
explain
the code it generates. - Thank you Kris Borowinski for fixing the Pester tests.
- Thank you to Matt Cargile for suggestions on improving the prompt for
Invoke-AIExplain
and reviewing the updates.- Prompt now includes
- 'You are running powershell on'
- $PSVersionTable.Platform
- Prompt now includes
- Added $max_tokens to
Invoke-AIExplain
- Added
$IdEnd
. You can ask for the explanation of a range of history itemsInvoke-AIExplain -Id 20 -IdEnd 23
- Added
Invoke-AIExplain
- The function utilizes the OpenAI GPT-3 API to offer explanations for the most recently run command, and more. - Added alias
explain
toInvoke-AIExplain
-
Added proof of concept to work with the new Chat REST API
- There is more to it. Requires refactoring and tests
- Proving to be very useful
new-chat 'you are a powershell bot' chat 'even numbers btwn 1 and 10' chat 'odd numbers'
- Thank you Kris Borowinski for re-working Get-OpenAIKey to Get-LocalOpenAIKey and creating/updating tests
- For
Get-OpenAIUsage
- Default start and end date
- Added switch $OnlyLineItems
Thank you to the community for your contributions!
-
- Update README with fixes and clarifications
-
Usage by @stefanstranger in https://github.com/dfinke/PowerShellAI/pull/69
-
- Added functions to get OpenAI Dashboard information and more
- Demos in the Polyglot Interactive Notebook
Thank you to the community for your contributions!
- Kris Borowinski
- On PS 6 and higher use Invoke-RestMethod with secure Token
- Shaun Lawrie
- Add error insights by Shaun Lawrie
- James Brundage
- PowerShellAI enhancement for short cut key by @StartAutomating
- Adam Bacon
- Add functions and prompts for use with ChatGPT
- Thank you to Pieter Jan Geutjens
Get-OpenAIEdit
works both with pipeline input as well as-InputText
param
- Added
New-Spreadsheet
- Creates a new Excel spreadsheet from a prompt - Moved [CmdletBinding()] above param. Synopsis was not displaying.
- Changed the default model for
Get-OpenAIEdit
tocode-davinci-edit-001
- Thank you Skatterbrainz
- Added Git-Examples.ipynb
- Updated
Get-OpenAIEdit.ps1
to return alltext
- Thank you Skatterbrainz
- Thank you Kris Borowinski
- Wired in A-Z ability to provide
OpenAIKey
via secure string
- Wired in A-Z ability to provide
- Added
Get-OpenAIEdit
. Given a prompt and an instruction, the model will return an edited version of the prompt. Thank you Skatterbrainz
- Added
-Method POST
toGet-OpenAIModeration
. Thank you Skatterbrainz
- Change
-temperature
default to 0
- Thank you to Pieter Jan Geutjens
- Added
-temperature
param toai
andcopilot
- Changed the input type from
int
todecimal
- Changed the range on temperature from [0,1] to [0,2] according to the API documentation
- Added
- Refactored to use
Invoke-OpenAIAPI
function. This function is used by all the other functions in the module. This allows for a single place to update the API URL and the API Key. - Add
Get-*
functions for OpenAI URIs - Took the function suggestions from Skatterbrainz and updated with
Invoke-OpenAIAPI
the refactor: https://github.com/dfinke/PowerShellAI/pull/30 - Refactored
Get-DalleImage
to useInvoke-OpenAIAPI
- Refactored
Get-GPT3Completion
to useInvoke-OpenAIAPI
- Check if
$result.choices
is not null before trying to access it. Thank you StartAutomating - Examples added to comment based help in
copilot
. Thank you Wes Stahler - Add
New-Spreadsheet
script. Creates a new spreadsheet from a prompt. Check out the code - Added
ConvertFrom-GPTMarkdownTable
function. Converts a markdown table to a PowerShell object. Check out the code - Unit tests started
- GitHub Actions in place to run CI/CD
- Added
Get-DalleImage
: Given a description, the model will return an image - Added
Set-DalleImageAsWallpaper
: Given a description, the model will return an image form DALL-E and set it as the wallpaper
- Added -max_tokens parameter to the
ai
function
-
Added
copilot
- Makes the request to GPT, parses the response and displays it in a box and then prompts the user to run the code or not. Check the README.md for me details. -
Added
ai
function:-
Experimental function enables piping
ai "list of planets only names as json"
[ "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune" ]
ai "list of planets only names as json" | ai 'convert to 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>
-
- Thank you Martyn Keigher for your contributions!
-
Added
gpt
as an alias:# Get-GPT3Completion "list of planets only names as json" gpt "list of planets only names as json" ``
-
Added validation for:
temperature
,max_tokens
,top_p
,frequency_penalty
,presence_penalty
-