A dead simple way to call the ChatGPT API from your machine
Try the client directly --> https://dmingod.github.io/CallGPT/chat_gpt.html
This is a dead simple way to have a ChatGPT client that you have control over and that you can actually use without having to go to any website
-
Its just 1 html that you can save on your desktop or anywhere else and have an interface where you can interact with ChatGPT.
-
Except for loading jQuery and Bootstap from a CDN -- there are no services involved. You can download these 2 libraries on your local and work with that if you prefer.
-
There are no 3rd party services called -- the calls are made from your machine to OpenAI.
-
The functinality is intentionally kept at a bare-minimum so you can tweak it to your liking.
-
You will need to use an API key from OpenAI. The API is fairly cheap, but nevertheless a paid service.
Custom actions executed by the bot:
-
Download this repo and save the HTML file on any location on your PC.
-
Double-click and run it using chrome.
-
Get an API key from OpenAI for ChatGPT ( from their website )
-
Put your API Key in the field in the top corner and make the calls.
-
Modify the HTML file as you like.
-
Enjoy! 🙂
You can add your own custom actions to this bot very easily -- there are 3 examples of doing this in the code.
You only need to do these 2 steps:
- Define the details of your custom action -- What function should be called, what is the name of the action etc.
- Write your custom function -- This is the function that will do the work.
Make sure the key name (___changeBackground
in this example) is the same as the func_name_param_pattern
in the custom_functions
dictionary.
There are 3 examples of custom code examples shown of how you can have the bot execute some functions for you.
- Change the background color of the page --> you can say "change background to red" and the background will change to red.
- Change the text to white and it will change the text to white.
- Fetch the top X stories from Hacker News and show it in the media tab.