Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RomansPriv/PSChatGPT
PowerShell into the ChatGPT OpenAI API
https://github.com/RomansPriv/PSChatGPT
Last synced: 8 days ago
JSON representation
PowerShell into the ChatGPT OpenAI API
- Host: GitHub
- URL: https://github.com/RomansPriv/PSChatGPT
- Owner: RomansPriv
- License: mit
- Created: 2022-12-20T20:20:03.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-21T13:35:53.000Z (almost 2 years ago)
- Last Synced: 2024-08-01T12:23:31.844Z (3 months ago)
- Language: PowerShell
- Size: 6.84 KB
- Stars: 19
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PSChatGPT
PowerShell into the ChatGPT OpenAI API via REST.
## Prerequisites
1. Needs Powershell 7x to work.
2. A user account on chatGPT. Create one with your e-Mail address and mobile number, or use an existing microsoft or google account.
3. An API-Key. Create one in your user profile and store it as secret with the name ChatGptAPI (Set-Secret) in your SecretStore.
If you are not familiar with PowerShell SecretManagement, read my [BlogPosts](https://www.powershell.co.at/powershell-secrets-management-part-1-introduction/) about it.
4. Download (clone) my repo and run . ./CodeCompletion.ps1## Usage
The Script codecompletion contains ine CmdLet Get-AIAnswer. This posts a question to ChatCPG, receives the answer and emits it on the console. By default we use 3 additional default-parameters.
### Model
text-davinci-003 is used as standard-model, there are some more models i added as ValidateSet. You may play around with different language models.
### MaxTokens
For my understanding, tokes define how massive the output from ChatGPT is. This is especially true for code completion, a low token value may cut of emitted code. For me it seems the token value will be used as a rate limit in the future.
### temperature
This value controls how different the first answer is from a second and third answer. With temperature = 0, all three answers for the same question will be identical, with temperature = 1, all answers will have maximum difference.