Creating a Generic Generative Language with Chrome AI / / No Comments As I explore Chrome’s on-device AI initiatives, one of the things I’m doing is looking at some of my older demos (kinda funny to think of ‘old’ GenAI demos) and seeing which may make sense in the browser versus API calls. Last July, I investigated creating a template language parser with Google Gemini. The idea was – take a string with tokens that defined a type of word and have Gemini replace it. So for example: My name is {{ name }} and my favorite food is {{ food }}. I asked Gemini to look for values inside brackets, use that as the seed of a random word, and replace it. So for example: My name is Frederic Dinglehooper the 3rd and my favorite food is sushi. I... more → Posted in: JavaScript Tagged with: Chrome, creating, Generative, Generic, Language
Creating a Generic Generative Template Language in Google Gemini / / No Comments I’ve been a fan of ‘random text’ for some time. "Random text" is a bit vague, but to me the idea of using code to generate random stories, or even snippets, is fascinating. Back in April, I blogged about how I created short dragon-based stories. It took a generic string: A #adjective# dragon lives #place#. She #verb# her hoard, which consists of a #number# of #thing#, #number# of #thing#, and #number# of #thing#. She feels #feeling#. And created a story by replacing the pound-wrapped tokens with real words. I used a couple of different tools to build this, but the core one was a cool little Node library named random-word-slugs. It’s a powerful random word library... more → Posted in: JavaScript Tagged with: creating, Gemini, Generative, Generic, Google, Language, Template
Building a Generic RSS Parser Service with Cloudflare Workers / / No Comments About once every three months I’ll write a quick JavaScript demo and attempt to fetch someone’s RSS feed… and then remember that the vast majority of RSS feeds don’t specify a CORS header to allow remote scripts to load them. I know this – and yet I still tend to forget. I thought it would be kind of fun to build a serverless API via Cloudflare Workers to handle loading, parsing, and returning a RSS feed with CORS allowed. I figured this would be pretty easy, but I ran into a snag right away. Workers and NPM Modules # Cloudflare Workers is Node.js compatible… with some issues. Cloudflare has a documentation page on it addressing what you may run into, and for... more → Posted in: JavaScript Tagged with: building, Cloudflare, Generic, Parser, service, workers