[HN Gopher] Show HN: YakGPT - A locally running, hands-free Chat...
       ___________________________________________________________________
        
       Show HN: YakGPT - A locally running, hands-free ChatGPT UI
        
       Greetings!  YakGPT is a simple, frontend-only, ChatGPT UI you can
       use to either chat normally, or, more excitingly, use your mic +
       OpenAI's Whisper API to chat hands-free.  Some features:  * A few
       fun characters pre-installed  * No tracking or analytics, OpenAI is
       the only thing it calls out to  * Optimized for mobile use via
       hands-free mode and cross-platform compressed audio recording  *
       Your API key and chat history are stored in browser local storage
       only  * Open-source, you can either use the deployed version at
       Vercel, or run it locally  Planned features:  * Integrate Eleven
       Labs & other TTS services to enable full hands-free conversation  *
       Implement LangChain and/or plugins  * Integrate more ASR services
       that allow for streaming  Source code:
       https://github.com/yakGPT/yakGPT  I'd love for you to try it out
       and hear your feedback!
        
       Author : kami8845
       Score  : 151 points
       Date   : 2023-03-30 15:47 UTC (7 hours ago)
        
 (HTM) web link (yakgpt.vercel.app)
 (TXT) w3m dump (yakgpt.vercel.app)
        
       | einpoklum wrote:
       | Hi ChatGPT! Let me register using my personal information, then
       | tell you what my tasks are at works, what I'm interesting in,
       | what I'm struggling with in life and a bunch of other sensitive
       | personal information. I trust you completely, and am sure a nice
       | AI such as yourself would never use my personal data for
       | anything.
        
         | HeavyFeather wrote:
         | Barking up the wrong tree, this post is for a thirdparty tool.
        
       | oriettaxx wrote:
       | It's pretty bad to ask people to enter e private secret key in a
       | web site (any, I mean)
        
         | Veen wrote:
         | What alternative would you suggest for a free service that
         | depends on OpenAI APIs? It's easy enough to generate an API key
         | for this service and delete it afterwards.
        
         | gkbrk wrote:
         | Why? OpenAI keys can be revoked at any time, and OpenAI allows
         | you to set soft and hard limits for billing as well.
         | 
         | You can also generate multiple keys, so if one app misbehaves,
         | you don't need to rotate all the keys, just the one that
         | misbehaves.
         | 
         | This is assuming the API keys can only do generation. If it can
         | access billing details or something it's very different of
         | course.
        
           | balls187 wrote:
           | > Why?
           | 
           | Because it's bad practice to provide sensitive information to
           | untrusted sources, and if you are an ethical developer, it's
           | an anti-pattern to write software that encourages bad
           | practices.
           | 
           | Your credit card company will reverse any authorized charges.
           | Will you email me all your credit card info?
        
             | sebzim4500 wrote:
             | If I could generate a credit card number just to send you
             | money then yeah sure.
        
         | thangngoc89 wrote:
         | They provided an option to build it locally and run it
         | yourself. But yeah, I wish there is a common proxy protocol
         | that would allow website accessing private resources without
         | exposing private keys
        
           | andag wrote:
           | Maybe a small video demo would be an ok alternative?
        
           | titaniczero wrote:
           | OpenAI should implement an oauth authorization server and
           | allow developers to use "Login with OpenAI account" into
           | their apps.
        
       | FriedPickles wrote:
       | I love the concept of this and other alternate ChatGPT UIs, but I
       | hesitate to use them and pay for my calls when I could use
       | chat.openai.com for free.
       | 
       | Any chance you could integrate the backend-api, and let me paste
       | in my Bearer token from there?
        
         | 1xdevloper wrote:
         | You can try the extension I built [0] which uses your existing
         | ChatGPT session to send requests.
         | 
         | [0] https://sublimegpt.com
        
           | unitg wrote:
           | The overlay option is great .. Any chance for a firefox
           | version?
        
         | kami8845 wrote:
         | Hey! I definitely understand the reservation. This is
         | definitely me as well. My reasons for using the UI at this
         | point:
         | 
         | * GPT-4 is decently faster when talking straight to the API
         | 
         | * The API is so stupidly cheap that it's basically a rounding
         | error for me. Half an hour of chatting to GPT3.5 costs me $0.02
         | 
         | Would be curious what you mean by integrating the backend-api?
        
           | joenot443 wrote:
           | Wow! Is it really that cheap? GPT4 is much more expensive, I
           | imagine?
        
             | kami8845 wrote:
             | GPT-4 is decently more expensive -- I personally really
             | like & use the therapist character a lot. In this scenario
             | the session would cost me less than $1 which is still much
             | cheaper than any therapist I've used previously :)
        
               | coolspot wrote:
               | What is your setup?
        
           | agotterer wrote:
           | I'd love to see a comparison of the average cost to use this
           | with the OpenAI API versus subscribing to chat-gpt plus.
           | 
           | Maybe I'll have to try this for a month and see if it end up
           | costing more than $20. Thanks for creating it!
        
           | qwertox wrote:
           | GPT-3.5 is really cheap (prompt and completion = $0.002 / 1K
           | tokens), but GPT-4 is around 20 times more expensive (prompt
           | = $0.03 / 1K tokens + completion = $0.06 / 1K tokens).
           | 
           | But the benefit from using the API is that you can change the
           | model on the fly, so you chat with 3.5 until you notice that
           | it's not responding properly and, with all the history you
           | have (probably stored in your database), you can send a
           | bigger request with a probably better response once with
           | GPT-4 as the selected model.
           | 
           | I really wish the interface on chat.openai.org would allow me
           | to switch between models in the same conversation in order to
           | 1) not use up your quota of GPT-4 interactions per 3 hours as
           | quickly and 2) not strain the backend unnecessarily when you
           | know that starting a conversation with GPT-3.5 is efficient
           | enough until you notice that you better switch models.
           | 
           | OpenAI already has this implemented: When you use up your
           | quota of GPT-4 chats, it offers you to drop down into GPT-3.5
           | in that same conversation.
        
             | sebzim4500 wrote:
             | Sure, but GPT-4 through the UI costs $20 per month, which
             | is a lot of api calls.
        
           | robopsychology wrote:
           | How is it that cheap?! I ran three queries on langchain
           | yesterday with two ConstitionalPrompts and it cost $0.22 -
           | made me realize deploying my project for cheap could be
           | expensive quick.
        
             | monkmartinez wrote:
             | You need to check which model you are using, also...
             | LangChain runs through the model several times with
             | increased token count on each successive call.
        
               | robopsychology wrote:
               | Yeah I assumed it would be doing several times but still
               | more expensive than OP mentioned. I think the issue is
               | I'm using davinci-003
        
               | drusepth wrote:
               | Yeah, davinci-003 is gonna be gpt3, which is more
               | expensive than 3.5.
               | 
               | One more anecdote: I've been running a half dozen gpt3.5
               | IRC bots for a few weeks and their total cost was less
               | than a dollar. A few hours of playing around with
               | LangChain on gpt3 cost me almost $4 before I realized I
               | needed to switch to 3.5, though even then it still uses a
               | _ton_ of tokens every chain.
        
               | robopsychology wrote:
               | Thanks, I'll do that later
        
             | kami8845 wrote:
             | GPT3.5 Turbo pricing is 10k tokens or ~7500 words for
             | $0.02. Though note that every API request includes the
             | entire chat context and charges for input & output tokens.
             | https://openai.com/pricing
        
         | [deleted]
        
         | Karunamon wrote:
         | Remember that using the API comes with privacy guarantees that
         | using the chatGPT site does not. tldr; anything sent through
         | the API won't be used to train the model and will be deleted
         | after a month.
         | 
         | https://help.openai.com/en/articles/5722486-how-your-data-is...
        
           | kami8845 wrote:
           | This is a good point I'll add!
        
       | kristopolous wrote:
       | Make it easier to try
        
         | kami8845 wrote:
         | Hey! I would love to. I seriously considered adding my own key
         | into the app, and implementing some rate limiting to e.g. allow
         | you to send 3 messages for free. But unfortunately that would
         | require me to store some backend data on you that I do not
         | want: I want this to be a completely "private" / FE-only
         | application that stores no data on anyone.
        
           | connorgutman wrote:
           | Testing YakGPT right now, excellent work! I would recommend
           | adding some screenshots to the GitHub README so that people
           | can get an idea of how it looks before entering their API
           | key.
        
         | avindroth wrote:
         | Before you comment something like this, ask yourself "How would
         | I make this easier to try?" The only reasonable answer is
         | providing the OP's own API key, which is undesirable.
        
           | kristopolous wrote:
           | A video demonstration, cleaner example of what it is, etc...
           | You can experience it by observation
        
       | meghan_rain wrote:
       | > Run locally on browser - no need to install any applications
       | 
       | > Please enter your OpenAI key
       | 
       | ...
       | 
       | Do people just not get it?
       | 
       | I would in fact rather give all my company secrets to this random
       | dude than OpenAI.
        
         | [deleted]
        
         | iib wrote:
         | There are instructions on how to run the GUI from localhost,
         | and the title and even the phrase that has the link to their
         | own hosting tell you you can run it locally first.
         | 
         | It seems they are genuine, and they phrase it exactly as it is.
         | The only thing I would have maybe wanted to see in the title is
         | "open-source" or free software.
        
           | runnerup wrote:
           | Everything still gets sent to OpenAI. "Locally hosted" means
           | the UI, not the AI.
        
             | hombre_fatal wrote:
             | OP already makes it clear that they are just a front-end.
        
       | jwarden wrote:
       | Nice. It took about a minute to clone it, run it, enter my API
       | key, and get started. The speech-to-text worked flawlessly.
       | 
       | Most people can talk faster than they can type, but they can read
       | faster than other people can talk. So an interface where I speak
       | but read the response is an ideal way of interfacing with
       | ChatGPT.
       | 
       | What would be nice is if I didn't have to press the mic button to
       | speak -- if it could just tell when I was speaking (perhaps by
       | saying "hey YakGPT"). But I see how that might be hard to
       | implement.
       | 
       | Would love to hook this up to some smart glasses with a heads-up
       | display where I could speak and read the response.
        
         | xupybd wrote:
         | It wasn't so smooth for me.
         | 
         | I gave up at
         | 
         | Creating an optimized production build ...TypeError: Cannot
         | read properties of null (reading 'useRef')
        
           | johnchristopher wrote:
           | Oh, my install failed at:                   Failed to
           | compile.              pages/index.tsx         `next/font`
           | error:         Failed to fetch `Inter` from Google Fonts.
           | > Build failed because of webpack errors
           | 
           | Apparently because it can't fetch a font from Google. There
           | should be assets that are critical (js/ts code,
           | templates,css) and assets that are not (freaking fonts) to a
           | yarn build.
        
             | kami8845 wrote:
             | Haha, I'll set up a docker image that people can pull down!
        
               | johnchristopher wrote:
               | FWIW, I'd be more interested in why it doesn't build.
               | Shouldn't yarn/npm/gulp/whatever manage dependencies ?
        
       | chenxi9649 wrote:
       | This is very well made and designed. I will likely use this
       | instead of the actual Chatgpt UI since their API is a lot cheaper
       | than the 20$/month pricing for my usage amount.
       | 
       | Interesting note: I tried speaking mandrain chinese to the mic
       | and it auto translated what I said into English.
        
       | [deleted]
        
       | afro88 wrote:
       | This is exactly what I need, thank you for building this! We're
       | using Azure cognitive services for API access to OpenAI models
       | though. With any luck, expect a PR today for basic Azure support
       | :)
        
       | asow92 wrote:
       | Love the idea of prompt dictation. Taking that idea a step
       | further, would it possible to have a feature where ChatGPT
       | responses are spoken back to the user?
        
         | pibefision wrote:
         | War Games
        
           | mthoms wrote:
           | "Do you want to play a game?"
        
       | ushakov wrote:
       | What's the use-case for this instead of the default UI?
        
       | jerrygoyal wrote:
       | could you please add some screenshots of how it looks
        
         | kami8845 wrote:
         | will do!
        
       | smusamashah wrote:
       | This is fast. And talking to it is a nice touch. Consider adding
       | text to speech too :)
       | 
       | One feature I am missing from all these front ends is the ability
       | to edit your text and generate new response from that point.
       | Official chat gpt UI is the only one that seems to do that.
        
         | kami8845 wrote:
         | Hey! You can edit past messages you've submitted and they will
         | generate a new response that overwrites whatever happened in
         | the conversation previously. If you're talking about a tree-
         | like struct where you can have different branches, then true,
         | only the official UI has it AFAIK :)
        
         | danielbln wrote:
         | Chat-with-gpt has that, we use it in our org as an alternative
         | chatgpt Interface: https://github.com/cogentapps/chat-with-gpt
        
       | Tiberium wrote:
       | Looks cool! Are you planning on adding more customization to be
       | able to influence the AI? See https://bettergpt.chat/ (it's also
       | open source and uses API in the browser). Basically with that
       | frontend you can control the role of all messages (e.g. add
       | system messages) and also edit them all to better influence the
       | AI in some cases.
        
         | kami8845 wrote:
         | Editing the prompts (which are currently submitted via the
         | system message similar to your linked app) is a great idea.
         | I'll add it to the to-do list :)
        
       | fudged71 wrote:
       | I've been playing around with your Idea Generator persona for the
       | last 15 minutes and have been absolutely blown away. Excellent
       | prompt engineering.
       | 
       | As mentioned by others, it would be great to customize or write
       | new personas/prompts.
       | 
       | Also could you add a voice chatbot as well using vocode? It could
       | be an alternative UI for each of the personas.
        
       | teawrecks wrote:
       | > Run locally on browser - no need to install any applications
       | 
       | That's not what "run locally" means. This isn't any more "local"
       | than talking to chatgpt directly, which is never running locally.
        
         | rafael09ed wrote:
         | It is more local than talking to chat GPT directly. Open AI
         | stores all your requests on their server. This saves it on your
         | computer. The title also claims it's a UI which always, for
         | now, runs locally.
        
         | kami8845 wrote:
         | Hey, run locally in this case means: YakGPT has no backend.
         | Whether you use the react app through
         | https://yakgpt.vercel.app/ or run it on your own machine, I
         | store none of your data. I will try and make this wording
         | clearer!
        
       | kulikalov wrote:
       | Isn't GPT a trademark owned by OpenAI? Is it legal to use it?
        
         | sebzim4500 wrote:
         | Looks like they've recently applied for the trademark but they
         | haven't got it yet. I have no idea if they will get it or not,
         | it is just an acronym but they did come up with it.
        
       | LanternLight83 wrote:
       | Could I hook this up to one of text-generation-webui's API
       | formats?
        
       ___________________________________________________________________
       (page generated 2023-03-30 23:00 UTC)