Tag: reactive prompts

Articles and experiments related to reactive prompts.

Reactive Prompts

I've created a small library called reactive-prompt that lets you easily manage prompts in a reactive way, similar to how you'd build a web app with React. It uses Preact's Signals to track changes to inputs and automatically re-runs prompts when those inputs update. This allows for efficient chaining of prompts, where the output of one becomes the input of another, and only necessary prompts are re-evaluated. The library currently uses Chrome's experimental prompt API but could be adapted for other providers like OpenAI or Gemini. It makes complex prompt flows much more manageable.

Read article

Stay in the loop.

I'm trialing a newsletter. Join for monthly insights into web dev, Chrome, and the open web.

alternate_email

Get in touch

Open to chat about Chrome or Web development.

Book a consultation