Using Chrome AI for Color Suggestions / / No Comments Today’s blog post came to me on the way to dropping of my kids at school and made complete sense to me, but I’ve also got the flu and am heavily medicated, so take that for what you will. The idea was simple, given a description of something in the real world, could I use AI to generate RGB colors that would represent that abstract idea. I thought this could be a good use of Chrome’s built-in AI model and decided to whip up a quick demo. The front end is pretty simple, just a form for you to enter your description and a place for the results: <h2>Description to Color</h2> <p> In the form field below, describe the color you are trying to recreate and Chrome... more → Posted in: JavaScript Tagged with: Chrome, Color, Suggestions, using
Using Google Static Maps in Your Print View / / No Comments This is just a quick thought experiment really. Yesterday I was working on a demo that made use of Google’s Static Map API. I’ve blogged about this API for probably over a decade now and I rarely see people use it, but it’s a lightweight, image only "API" for when you need simple map images without interactivity. Honestly, I see a lot of sites using the full JavaScript maps library when a simpler image would be fine. It’s also an excellent way to use maps in presentations or emails as well. It occurred to me that the static map image could be a great way use of print media queries in CSS and I thought I’d build a quick demo to show this. Media queries and... more → Posted in: JavaScript Tagged with: Google, maps, print, Static, using, View
Using Chrome AI to Summarize Comic Books / / No Comments A few weeks back, I blogged about analyzing comic books with gen ai, and honestly, it worked really darn well. I extracted the pages with Python, and send them to Google Gemini to create the summary. I was naturally curious to see if this could be done entirely on device, using Chrome’s AI support. Here’s what I found. First, a reminder – a few days ago I updated my web-based comic book reader and described that process. The code I’m sharing today is built upon that first application, so if you missed that post, I’d strongly suggest reading it first. (And if you don’t want to miss any of my posts, don’t forget to subscribe!). How It Works Alright –... more → Posted in: JavaScript Tagged with: Books, Chrome, Comic, Summarize, using
Using Chrome’s Built-in AI to Improve AI Prompts / / No Comments Props for this article go to my best friend, Todd Sharp, who yesterday said something along the lines of, "Hey Ray, you should blog a demo of …" which is pretty much akin to bring out a laser pointer in front of a cat. Not only do I love getting ideas for new demos, his idea was actually pretty freaking brilliant, which means I get to pretend I’m brilliant as well. His idea was this: Given a user created prompt meant to be shipped off to a "proper" (i.e. maybe expensive) Generate AI API, can we use tools to help improve the prompt and make it "cheaper" before used. Given we’ve got AI in the browser via Chrome (ok, we will have it soon), this seemed... more → Posted in: JavaScript Tagged with: Builtin, Chrome's, improve, Prompts, using
Using AI to Search Maps / / No Comments The magnificent David Rumsey Map Collection now has an AI Search Assistant that can help you find maps, learn more about individual maps, and even query specific elements within maps.The David Rumsey Map Collection is one of the largest online collections of maps, and its new AI Search Assistant is a fantastic resource. It not only helps you search and discover maps in the collection Maps Mania… more → Posted in: Interactive Maps Tagged with: maps, search, using
Using StringBind in BoxLang / / No Comments Ok, to be honest, this is going to be a pretty lightweight post as it’s about a simple little string function in BoxLang, but as I discovered it rather recently and was intrigued by what it did. So first off – how did I find this? In the BoxLang docs, there’s a whole section on built-in functions and a subcategory just for string. I was looking it over and realized there were quite a few that I had not known existed. There are some interesting ones in there like pascalCase and snakeCase. I was pretty sure I knew exactly how these worked, but I went ahead and built a quick demo that demonstrates both: Ok, that works well enough, but let’s talk StringBind. StringBind... more → Posted in: JavaScript Tagged with: BoxLang, StringBind, using
Using Chrome AI for Sentiment Analysis (Again) / / No Comments Every now and then I get an idea for a blog post/demo, prepare to write about it, and realize I’ve actually covered the topic in the past. Sometimes, though, it works out really well especially when the technology has changed quite a bit. Almost a year ago, I blogged about doing sentiment analysis with Chrome’s AI upcoming AI feature. At the time, it worked…. ok. The biggest issue at the time was the inability to provide a system instruction to the model as well as being able to shape the response a particular way. Thankfully, both of those are now supported. As a reminder, the prompt API for the web is still in an origin trial, see the docs for more information and join the... more → Posted in: JavaScript Tagged with: Again, Analysis, Chrome, Sentiment, using
Using AgentQL and Pipedream to Fix Missing RSS Feeds / / No Comments Last week I blogged about how I used AgentQL to scrape a web page, this blog to be precise, into pure data. If you don’t remember, AgentQL lets you pass a simple query string that is run against a web page and parsed into data. So for example, I was able to use this query on my home page to get a list of entries in pure data: { blogposts[] { url title date } } The REST API was incredibly easy, and I demonstrated in BoxLang how I could use AgentQL to turn my blog’s home page into a much simpler, smaller, HTML version. This of course begs the question, how else could we transform it? What about creating a RSS feed for a blog that doesn’t have one! Of course, if... more → Posted in: JavaScript Tagged with: AgentQL, Feeds, missing, Pipedream, using