Automating Media Asset Creation with Cloudinary’s GenAI Transformations

I’ve been happily using Cloudinary on my blog for a few years now, but it’s been quite some time since I’ve blogged about them. For folks who don’t know, CLoudinary provides media APIs (image, video) that work via URLs. So for example, I can craft a Cloudinary URL that transforms a picture to resize it to a particular size. Or add text. Or compress it. Pretty much anything you can imagine doing with an image or a video, and probably a lot of things you can’t think of, are all possible, and literally enabled by crafting a particular URL. It’s shockingly powerful and easy at the same time. More recently, they announced a set of AI capabilities, including – Generative... more →
Posted in: JavaScript

Turn Your Weather into Poetry with GenAI

I was struggling to get some real, productive work done (I just got back from a trip in Europe) and I thought I’d tackle something that’s been in my queue for a little while now. This is, yet again, one of my "bad ideas" that you should probably not ever use in production, but it was fun, it made me happy, and you get to see the kind of silliness I do when I’m trying to distract myself. The idea was simple – given a forecast, how well could generative AI transform it into something more fun, like poetry? As I usually do, I opened up Google’s AI Studio and tried it there first. I began with a system instruction: Given a forecast, rewrite it in poetry. Return... more →
Posted in: JavaScript

Automating Object Detection with Google Gemini GenAI and Pipedream

For my last technical post of the year (although I can’t promise I’ll stop blogging!), I wanted to share an interesting workflow I built using Google Gemini and Pipedream. The idea was somewhat simple – how difficult would it be to build a "general purpose" workflow to look for objects in images and trigger an alert if certain things were found. Here’s what I was able to build. Step One – Image Input In my mind, I imagined this workflow would be tied to some service that was either streaming in video or generating still images. You could image a security camera posting new pictures every 30 seconds or so, or some other system that takes a picture at a regular... more →
Posted in: JavaScript

Creating a Content Assistant with Gemini and GenAI

One of the use cases for generative AI that I’ve discussed before is the idea of using the tool to aid in the writing process. I’m not talking about creating content so much as creating suggestions and providing feedback about the content you yourself have created. This past weekend I worked on a "general purpose" tool with this in mind and thought I’d share it to get your feedback. ("You" being the smart readers of this blog who keep me honest when I show something stupid. 😉 The Application # The application itself is rather straightforward. It asks two questions – first, what are you trying to accomplish with your writing and what are the desired... more →
Posted in: JavaScript

Using GenAI to Help Pick Your D & D Class

A few weeks back I wrote up my experience with generative AI as a dungeon master. That post ended up being really popular and got me thinking about other ways I could integrate D & D, or other games, with Generative AI. With Gemini 1.5 now available via API, I thought it would be good to find an excuse to hit the API in a demo. So with that in mind, I’d like to introduce you to the Class Suggester. The Application # The app begins by simply presenting some introductory text and invites you to click a button to roll for your stats. You can hit the Roll Stats button as many times as you want. It uses the standard D & D rule of rolling a six-sided dice four times and removing the... more →
Posted in: JavaScript

Using GenAI to Classify an Image as a Photo, Screenshot, or Meme

File this under the "I wasn’t sure if it would work and it did" category. Recently, a friend on Facebook wondered if there was some way to take a collection of photos and figure out which were ‘real’ photos versus memes. I thought it could possibly be a good exercise for GenAI and decided to take a shot at it. As usual, I opened up Google’s AI Studio and did a few initial tests: I then simply removed that image and pasted more info to test. From what I could see, it worked well enough. I then took the source code from AI Studio and began working. The Code # First, I grabbed some pictures from my collection, eleven of them, and tried to get a few photos, memes,... more →
Posted in: JavaScript

Function Calling and GenAI

I love when I work on one demo, hit an issue, discover something else and get joyfully distracted into learning something completely different. In this case, it was a suggestion to help with an issue I was having with output from a prompt, and while it wasn’t a good solution for what I was doing, it was an eye-opening look at a really cool feature of Generative AI – Function Calling. Now, I’m new to GenAI, and new to this particular feature having been introduced to it a bit less than twenty-four hours ago. I know it’s supported by Google AI APIs as well as OpenAI and a quick search around other offerings seems to imply it’s a universal thing. I want to give a quick... more →
Posted in: JavaScript

Can GenAI help you win in Vegas?

No. Thank you and goodbye. Ok, first off, I apologize for the click-bait style title. Every now and then when I get an idea for a demo, it doesn’t work. But sometimes, it doesn’t work out in a fun and interesting way, and I figure it’s a good idea to share it anyway. (Also, there’s always the strong chance that it didn’t work out because I did something wrong!) Today’s demo is a perfect example of that I think. Earlier this year I built a Blackjack game using Alpine.js and the quite excellent Deck of Cards API. Yesterday I was thinking about the game and I wondered – what would happen if I used generative AI to ask for help when playing it? So for example,... more →
Posted in: JavaScript