A new JavaScript library, Prompts.js, offers an await-based alternative to the browser's built-in alert, confirm, and prompt functions. It leverages the o1 model from OpenAI for rapid code prototyping, allowing for smoother and more customizable modal dialogs. The library is available on npm and through CDNs like jsDelivr. Recent updates improved accessibility by integrating the browser's dialog.showModal() method.

•4m read time•From simonwillison.net
Post cover image
2 Comments

Sort: