The Prompt API

(developer.chrome.com)

44 points | by gslin 2 hours ago

13 comments

  • afshinmeh 6 minutes ago
  • haberman 46 minutes ago
    This API seems perfect for an idea I've had for a while: a de-snarkifier for social media.

    Social media can be intellectually stimulating and educational, but it's also easy to get sucked into ideological sniping and flamewars, even if you didn't go looking for it. The emotional and intellectual energy spent flaming strangers on the Internet is a complete waste of human capital.

    With an API like this, I assume you could have a browser extension that could de-snarkify content before showing it to you. You could ask the LLM to preserve all factual content from the post, but to de-claw any aggressive or snarky language. If you really wanted to have fun, you could ask it to turn anything written in an aggressive tone into something that sounds absurd or incompetent, so that the more aggressive the post, the more it would make the author look silly.

    This could have a double benefit. For the reader, it insulates them from the personal attacks of random strangers on the Internet. Don't get me wrong, there is a time and a place for real, charged arguments about important issues that affect us all. But there is little to be gained from having those fights with strangers; on the contrary, I think it poisons the body politic when strangers are screaming at each other.

    For the writer, it takes away any incentive to be snarky or rude. If other people filter their content this way, there's no point in trying to be mean to them, and no "race to the bottom" for who can be more nasty.

    • jurgenburgen 2 minutes ago
      On the other hand it would make all comments sound the same and further dilute internet content into average slop.
    • coalstartprob 18 minutes ago
      what's this, a snowflake's version of the internet?
      • UqWBcuFx6NV4r 5 minutes ago
        I think the proposed extension would simply hide your comment, and all users would be better for it.
        • ptrl600 2 minutes ago
          It would hide all comments in the thread, including this one.
      • aurareturn 2 minutes ago
        He can't see your message because it's snark. Assuming author already has this built in somehow.
      • dtmooreiv 2 minutes ago
        haberman's requested translation (that would cause the comment above to be filtered out): this stranger on the internet has nothing useful to add and so their comment does not appear.
  • avaer 1 hour ago
    It works, I've shipped this as a "local inference"/poor person's ollama for low-end llm tasks like search. The main win is that it's free and privacy preserving, and (mostly) transparent to users in that they don't have to do anything, which is great for giving non-technical users local inference without making them do scary native things.

    But keep in mind the actual experience for users is not great; the model download is orders of magnitude greater than downloading the browser itself, and something that needs to happen before you get your first token back. That's unfixable until operating systems start reliably shipping their own prebaked models that an API like this could plug into.

    • Yokohiii 1 hour ago
      > That's unfixable until operating systems start reliably shipping their own prebaked models that an API like this could plug into.

      Maybe the next big thing will be some software subscription premium offers with a bunch of 5090s as an extra.

    • subhobroto 1 hour ago
      > It works, I've shipped this as a "local inference"/poor person's ollama for low-end llm tasks like search

      fantastic!

      > the model download is orders of magnitude greater than downloading the browser itself, and something that needs to happen before you get your first token back

      sure but does this mean the model is lazily downloaded? that is, if I used this and I am the first time the model was called, the user would be waiting until the model was downloaded at that point?

      that sounds like a horrible user experience - maybe chrome reduces the confusion by showing a download dialog status or similar?

      also, any idea what the on disk impact is?

      • avaer 8 minutes ago
        The model download is lazy and cached, so it's a one-time cost presumably across all origins (I assume so since the alternative would be a trivial DoS waiting to happen).

        So it's once per browser, not once per site.

        You can track the download state yourself and pop whatever UI you want.

      • why_is_it_good 42 minutes ago
        > Storage: At least 22 GB of free space on the volume that contains your Chrome profile.
        • subhobroto 18 minutes ago
          > `> Storage: At least 22 GB of free space on the volume that contains your Chrome profile.`

          Yes, I can read and comprehend English and you should assume I read the page. Because of the "At least" wording, I was curious what a person who has actually used the feature has noticed, aka, learning from people who have actually done it already.

        • taejavu 37 minutes ago
          Lmao and here I am still staunchly treating Blazor’s 2MB runtime as a deal-breaker
          • dotancohen 16 minutes ago
            Emacs had long ago exceeded eight megs!
  • jameslk 1 hour ago
    Seems like a good way for a rogue JS script to offload token generation to a bunch of unsuspecting visitors

    It would actually be pretty interesting to see if its possible to decentralize the compute to generate something useful from a larger prompt broken down and sent to a bunch of browsers using a subagent pattern or something like RLM, each working on a smaller part of the prompt

    • varun_ch 1 hour ago
      This feels like a lot of work for low reward, the technical/business infrastructure would be wild. And if anyone wants to offload their prompts to users browsers, they might as well just use the Chrome API correctly? How many server side prompts would realistically be useful to offload to a low end model like this?

      Plus even if you really wanted to do that, WebGPU exists and has for a while right?

      • jameslk 1 hour ago
        > How many server side prompts would realistically be useful to offload to a low end model like this?

        There's a lot of ways this API could go, e.g. more powerful models eventually, or perhaps integration with cloud models. For example, I could see Google trying to default Gemini as the model for users signed into Chrome

        • varun_ch 58 minutes ago
          I think we’ll get more powerful models when they become reasonable to run on regular people’s computers, in which case the compute costs would hopefully fall enough that people don’t need to resort to this kind of weird stuff.

          As for cloud models, that would be interesting, although I guess then the fraud would be easier in spoofing whatever parameters (ip address? domain name? some Chrome install identifier?) to get around whatever rate limiting they come up with, rather than actually using people’s computers.

          Anyways I’m sure if it ends up being abused, they can throw a permissions dialog in front of it. Just need to figure out a way to make normal people understand.

  • nl 1 hour ago
    The model this uses is useless for anything beyond 2 round chat at the most.

    If you want to do anything interesting you need transformers.js and a decent mode. Qwen 0.9B is where things start working usefully

  • danny_codes 33 minutes ago
    Domain names are a nice candidate for a Georgian tax
  • skybrian 1 hour ago
    Still in origin trial? Looks like they're adding a temperature parameter:

    https://chromestatus.com/feature/6325545693478912

  • gorgoiler 1 hour ago
    Imagine a Vendor API that adds a way to link from the page straight into a device purchase workflow. As a trial of the API in Chrome you can order a new Google Pixel 9b directly from any page with the word Android in it!

    Or a LocalNet API that integrates with trusted hardware devices on your local network. As a trial (Chrome beta programme — strictly limited but here’s 3x signup links to share with your friends) you can adjust your Google Next Mini underfloor heating directly from Chrome!

    Or a DirectCast API that lets you stream <video> elements to a device of your choice even over a VPN. As a Chrome trial, you can use your Google Cloud account to stream directly from YouTube Premium to any linked Google Chromecast devices you own!

  • fg137 1 hour ago
    "sorry, to use our website, you must have at least 22 GB of free disk space."
    • cdrini 32 minutes ago
      True, but arguably better than "sorry, to use our website, you must have a ChatGPT subscription."
  • arcknighttech 29 minutes ago
    [dead]
  • iggerews 1 hour ago
    [dead]
  • iggerews 1 hour ago
    [dead]