Automating Movie Recommendations with Generative AI and Pipedream

For the past few months or so, I’ve started tracking my movie watching with Letterboxd. I’m not doing a lot of reviews, mostly just logging, but I find it neat to look back and remind myself of what I’ve watched recently. You can see my profile if you’re curious, or check out my "Now" page as well. I thought it might be interesting to see if I could use my Letterboxd data along with Google Gemini as a way to suggest the next movie I should watch. I was able to build a quick workflow using the incredible Pipedream in a few minutes. Let me share with you how I did that. What does it do? # At a high level, my workflow does the following: It runs, automatically,... more →
Posted in: JavaScript

JSON Results with Google Gemini Generative AI API Calls

Forgive the somewhat alliterative title there, but today’s post covers something that’s been on my mind since I started playing with Google Gemini, specifically, how to get the results of your API calls in JSON. To be clear, the REST API returns a result in JSON, but I’m talking about the content of the result itself. Before I continue, a quick shot out to Allen Firstenberg who has been helping me off and on with Google Gemini stuff. Anything I get wrong though is entirely my fault. 😜 Ok, so before I go on, let’s look at a typical result. Take a prompt like so: "What is the nature of light". Pass this to Gemini via the API, and the result you get, once you... more →
Posted in: JavaScript

Using Generative AI to Check for Spam

A few days ago I wrote up an exploration I did in Spam APIs, "Spam APIs in 2024". After working on those demos and writing up my findings, I thought it might be interesting to see how a generative AI tool, like Googele’s Gemini would handle such a task. Initial Tests # So – once again – I’m a broken record on this – but I fired up AI Studio first to give it some quick tests. I began with this prompt: Given the following text, rate how much it appears to be spam by giving it a score between 1 and 10, with 10 being the most likely the content is spam. For my first test, I used a ‘bad’ sample (see my last post for a full listing of my sample data): 💪... more →
Posted in: JavaScript

Testing Multiple Variations of Generative AI Prompts

In nearly all of my recent explorations of Generative AI, I’ve come to realize how important prompts are. That hasn’t necessarily translated me into writing better prompts all the time, but being aware of the problem is at least one step towards correcting it, right? One of the things that I thought would help me personally would be to have a tool to quickly compare and contrast different prompts. Obviously, I could just open up multiple tabs in a browser, but I really wanted something more direct and simplified for my purposes. With that in mind, let me share what I’ve built. Prompt Tester # Prompt Tester is my incredibly imaginatively named tool to… um… test prompts.... more →
Posted in: JavaScript

Using Generative AI to Organize Video Game Screenshots

Way back in January (remember January), I wrote a blog post describing how to use gen ai to improve image filenames. This worked by uploading the image to Google Gemini, asking for a short description, and using that description for a new filename. Recently I was thinking about that demo and was curious how well it would work for video games. As always, I did a few quick tests in Google AI Studio. I did some quick Googling for various games and screenshots, and the results were pretty impressive. Here are three mostly modern examples: And here’s a first failure, identifying this as Final Fantasy 14, not 16. It did well for one really old game, although to be fair the name is in the picture: Although... more →
Posted in: JavaScript

Using Generative AI as Your Content Assistant

Last week I had the honor of presenting one at TheJam.dev. This was my first presentation on generative AI and I got to share what I thought was an interesting use case – helping with the writing process. Now to be clear, I don’t mean using GenAI to write blog posts, that would be a horrible idea. (IMO!) Instead, I looked at how it could help with some of the process. Let me back up a bit and give some background. I’ve been a fan of John Birmingham for many years now. He’s an author who writes in the military/sci-fi/etc genre and has some pretty fascinating ideas. I initially discovered him via his "Axis of Time" trilogy which dealt with the idea of a modern... more →
Posted in: JavaScript

Using Generative AI to Improve Image Filenames

Last night I had an interesting thought. Many times I work with images that have vague filenames. For example, screenshot_1_24_12_23.jpg. Given that there are many APIs out there that can look at an image and provide a summary, what if we could use that to provide a better file name based on the content of the image? Here’s what I was able to find. As always, I began by prototyping in Google AI Studio. I apologize for stating this in basically every post on the topic, but I really want to stress how useful that is for development. I used a very simple prompt: Write a one sentence short summary of this image. The sentence should be no more than five words. And then did a quick test: If... more →
Posted in: JavaScript

Using Generative AI to Detect Cat Breeds

Let’s be honest, what other use is there for generative AI than working with cats? If you read my previous post on Google’s Gemini AI launch, you may have seen my test prompts asking it to identify the kind of cat shown in a picture. I decided to turn this into a proper web application as a real example of the API in action. Here’s what I came up with. The Front End # For the front end, I decided to make use of a native web platform feature to access the user’s camera via a simple HTML form field. By using capture="camera" on an input tag, you directly get access to the device camera. There are more advanced ways of doing this, but for quick and simple, it works... more →
Posted in: JavaScript
1 2