From 4e299ba10268d620771d2b90c57496eeb369787f Mon Sep 17 00:00:00 2001 From: Luca Guzzon Date: Mon, 6 Mar 2023 13:31:08 +0000 Subject: [PATCH 1/5] fix: almost using only markdown and tip to inline Instruction to inline all external dependencies added --- README.md | 68 ++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index d5d41a9..a1e8cdc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # ☎ CallGPT + A dead simple way to call the ChatGPT API from your machine -Try the client directly --> https://dmingod.github.io/CallGPT/chat_gpt.html +Try the client directly --> ## 👀 What is this? @@ -19,17 +20,17 @@ This is a dead simple way to have a ChatGPT client that you have control over an
- -## Show me the goods: +## Show me the goods **Chat and responses:** + **Custom actions executed by the bot:** - + -## 🤔 How to use: +## 🤔 How to use 1. Download this repo and save the HTML file on any location on your PC. @@ -43,25 +44,29 @@ This is a dead simple way to have a ChatGPT client that you have control over an 6. Enjoy! 🙂 +P.S. + To have a simple htm file with no external dependencies use (having node and npm installed): -## ⭐🤖🏃 Custom assistant: +```bash +npx -y -p inline-source-cli inline-source --compress true chat_gpt.html chatGpt.html +``` -You can add your own custom actions to this bot very easily -- there are 3 examples of doing this in the code. +## ⭐🤖🏃 Custom assistant +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: + 1. Define the details of your custom action -- What function should be called, what is the name of the action etc. 2. Write your custom function -- This is the function that will do the work. - -#### 1. Define the details of your custom action: +### 1. Define the details of your custom action Make sure the key name (`___changeBackground` in this example) is the same as the `func_name_param_pattern` in the `custom_functions` dictionary. -
+![Define the details of your custom action](./readme_media/custom_bot_v4.png) - -#### 2. Write your custom function: +### 2. Write your custom function There are 3 examples of custom code examples shown of how you can have the bot execute some functions for you. @@ -69,48 +74,39 @@ There are 3 examples of custom code examples shown of how you can have the bot e 2. Change the text to white and it will change the text to white. 3. Fetch the top X stories from Hacker News and show it in the media tab. +- A very simple example that changes the background color of the page: -- A very simple example that changes the background color of the page:
-
- -- A slightly more complex example that fetches the top X stories from Hacker News and shows it in the media tab:
-
+ ![simple example](./readme_media/custom_bot_v5.png) +- A slightly more complex example that fetches the top X stories from Hacker News and shows it in the media tab: + ![complex example](./readme_media/custom_bot_v6.png) - -