4 ms·
Since I use ChatGPT regularly, I decided to create my own client. I prefer to avoid third-party services that require privilege escalation like Grammarly and Co
by itsuka 4y ago
Since I use ChatGPT regularly, I decided to create my own client. I prefer to avoid third-party services that require privilege escalation like Grammarly and Copilot. I have developed distinct profiles for different tasks, each with its own system prompt and input method. After getting the hang of it, I plan to tweak the parameters as well. Here are some of the profiles:
Explainer: a default, general purpose Q&A. The prompt is "Explain to me like a 3rd grader. Skip prose." I plan to expand this profile to include additional communication styles, including step-by-step explanations, elaboration, and the Socratic method.
Proofreader: I use this profile to edit, simplify, and shorten any text (including this comment). I borrowed this feature from Grammarly Go, and it works by pasting the text and clicking a button.
Developer (in development): this uses a simple editor as input, with features similar to Cody/Copilot, such as adding types, naming things, summarizing, autocomplete, auditing, explaining, fixing, refactoring, and more.
Lastly, I plan to add two more profiles that are more creative and generative: Writer and Designer. They will act as private consultants/partners and assist me in brainstorming and complementing my skills in building websites.
- theonlybutlet 4y agoThank you, I intend on stealing your phrase "skip prose", was trying to find a way to force it to exclude this whilst saving tokens.
- thih9 4y agoI’m unfamiliar with gpt and tokens, what would “skip prose” change?
- itsuka 4y agoIt is hinting GPT to skip generating unimportant texts such as filler words, while still maintaining coherence in the output. For example, if I asked GPT "How to make bibimbap?" with the prompt "skip prose", it will give concise list of ingredients and instructions in about ~250 tokens [1]. Without the prompt, it would first explain what bibimbap is and then give a slightly longer instructions, totaling around ~360 tokens. [1] A token is like a building block of a sentence - it can be a word, a punctuation mark, a number, or even a combination of words. In case you didn't know, Chat API users are charged based on the number of tokens used. So we try to keep it to a minimum.
- hnthrowaway0328 4y agoI'm wondering if it can remove all "a"/"the"/"an" from the output to further reduce # of tokens spent.
- VierScar 4y agoThe annoying habit GPT has of restating the question as the start of the answer. "How do I write a function in JavaScript to sort a list of cities by population grouped by region? GPT: To sort a list of cities by population grouped by region, in JavaScript, would at a high level require 3 steps...." Super frustrating when you just want the answer without the "polite professionalism"
- bumbledraven 4y agoQ: How do I write a function in JavaScript to sort a list of cities by population grouped by region? Just show me the code, no prose. GPT-4: function sortCitiesByPopulation(cities) { return cities.sort((a, b) => { if (a.region === b.region) { return b.population - a.population; } return a.region.localeCompare(b.region); }); } …
- itsuka 4y agoIf you can only work with GPT-3.5 model, the prompt that bumbledraven shared may still produce some explanations and provide no syntax highlighting. To solve this, you can add: "Skip prose. Skip explanation. Answer in a single code block in markdown." Also, if you're using the playground, I'd recommend keeping the temperature low (I normally set it to 0 for this task). This will prevent any extra information such as test data, from being included. From my experience, setting the prompt I shared earlier as the system prompt produced more consistent results. However, whatever I shared is based on my own trial & error, so I'm not sure if this will work for you/in general.
- itsuka 4y agoAnother idea - since I found the explanation on MDN Docs can be too technical sometimes (filled with jargons from the specs), I think beginners like me would find ChatGPT helpful. Here are some screenshots comparing the two: - MDN Docs: https://nitter.net/pic/orig/media%2FFsDOMrEaUAAy-Y5.jpg https://nitter.net/pic/orig/media%2FFsDOMrEaUAAy-Y5.jpg - GPT-3.5: https://nitter.net/pic/orig/media%2FFsDPHbXagAA7Ky8.jpg https://nitter.net/pic/orig/media%2FFsDPHbXagAA7Ky8.jpg
- barrenko 4y agoI was reluctant in using phrases like "skip prose", because I thought it would end up in a Waluigi.
- pmoriarty 4y ago"I prefer to avoid third-party services that require privilege escalation like Grammarly and Copilot" How do they require privilege escalation?
- itsuka 4y agoI'm sorry, I think I might have used "privilege escalation" in a confusing way here. To clarify, these services sometimes need access to the surrounding environment to enhance the AI's context and prevent misuse. For example, according to the Chrome Web Store, Grammarly may need to monitor network, mouse, and keystrokes (from non-sensitive input fields), as well as location data. Meanwhile, Copilot may require access to adjacent code or open tabs, which I believe is now configurable. As I'm not a security researcher or user of these products, I may get these details wrong.
- rr808 4y agoAre there any good open source clients you recommend? At work we're not allowed to use chatgpt so having our own would be nice.
- itsuka 4y agoSorry, I can't recommend any other clients since I don't use them. If your company's policy permits accessing ChatGPT through the API, you can assess clients from awesome lists like this one: https://github.com/humanloop/awesome-chatgpt https://github.com/humanloop/awesome-chatgpt I've seen companies use Slack bots since they are easy to implement/integrate with.
- r0b05 4y agoFascinating idea. Can you share some code or screenshots of your client?
- itsuka 4y agoI don't think there's anything unique about my client, and since I'm too embarrassed to open-source my spaghetti code, I'm sharing this demo instead: https://nitter.net/itsuka_dev/status/1639631487493632000#m https://nitter.net/itsuka_dev/status/1639631487493632000#m
- r0b05 4y agoI really like your UI design! There is something about it that is soothing.
- schappim 4y agoYeah, I built myself something similar for 1-shot tasks[1], examples[2]. [1] https://files.littlebird.com.au/Screen-Recording-2023-03-26-10-35-58-Idhlea.gif https://files.littlebird.com.au/Screen-Recording-2023-03-26-... [2] https://files.littlebird.com.au/Shared-Image-2023-03-26-10-36-46-UpiNF1.png https://files.littlebird.com.au/Shared-Image-2023-03-26-10-3...
- itsuka 4y agoNice! I would like to see more examples out there that do not limit the experience to only a text/chat interface. It is becoming tiring to repeatedly add extra prompts and format the input/output manually. I found that some workflows can be executed more efficiently by using GUI/form controls (like the "simplify" button for proofreader). Node-based UIs would also be ideal for some design-related tasks. Builders have already started experimenting with these, I guess, and I'm excited to see what they come up with.