Your teacher will be clueless...
- Windows only!
- .NET 7 (C# 11) | self-contained, single-file EXE
- WinForms
- Hides as a little tray icon.
- Uses
User32.dll
functions to register a clipboard format listener. - Sends any copied text to ChatGPT, places response back into the clipboard.
The application may be built as a self-contained executable, enabling it to run even on computers that do not have the .NET 7 runtime installed.
-
Install .NET 7 (Framework & Runtime)
-
From the project root:
dotnet publish -c Release \ -r win-x64 \ --self-contained true \ -p:PublishSingleFile=true \ -p:IncludeNativeLibrariesForSelfExtract=true \ -p:PublishReadyToRun=true
Alternatively for Powershell:
dotnet publish -c Release ` -r win-x64 ` --self-contained true ` -p:PublishSingleFile=true ` -p:IncludeNativeLibrariesForSelfExtract=true ` -p:PublishReadyToRun=true
The resulting binary and DLL:s are located in ClipGpt7\bin\Release\net7.0-windows\win-x64\publish
.
See releases.
- (If you haven't already) Create a ChatGPT account and generate an API token (https://platform.openai.com/account/api-keys).
- Start the application
ClipGpt7.exe
- Locate the tray icon with the white question mark on black background.
- Right-click → Settings
- Paste the API token.
- Click "Save and Close"
- Now simply copy your questions, wait a bit, then paste GPTs answer.
- The tokens in the prompt are added to the max_tokens request field. This may be no larger than 4096. Somehow, we need to calculate the tokens in the prompt and make sure, that we don't request a max_token larger than 4096 - promp_tokens.
- To 'lessen' the above problem, we limit the max_tokens to 3840. This leaves 256 for the request. In Chat-Mode, the context is automatically cleared.
- We limit the temperature between 0-1.6, although the API would allow up to 2. However, anything above 1.6 seems to produce garbage.