Using AI and PDF Services to Automate Document Summaries

I first discovered Diffbot way back in 2021 when I built a demo of their APIs for the Adobe Developer blog ("Natural Language Processing, Adobe PDF Extract, and Deep PDF Intelligence"). At that time, I was impressed with how easy Diffbot’s API was and also how quickly it responded. I had not looked at their API in a while, but a few days ago they announced new support for summarizing text. I thought this would be a great thing to combine with the Adobe PDF Extract API. Here’s what I found. First off, if you want to try this yourself, you’ll need: Adobe PDF Services credentials. These are free and you get 500 transactions per month for free. For folks who may not know,... more →
Posted in: JavaScript

The Return of the Comment(s)

In the twenty plus years this blog has been around, I’ve had various different comment systems. Initially, I simply stored them in a database (this blog used to be powered by ColdFusion), but eventually moved to Disqus. I had a pretty huge amount of comments and was generally OK with the service, but eventually, folks simply stopped commenting. I then made the decision to simply kill off the integration. I wrote some scripts to get my data, stored them as flat files, and you can still see the old comments on posts that had them. About a year or so I added in Webmentions, which works ok, but doesn’t really feel the same. After some time thinking about it, I decided maybe its time to... 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

My 2023

Happy New Year (well almost) my fabulous readers. Typically at the end of the year, I like to take stock of what I accomplished through the year and share it in one last blog post. I honestly don’t expect anyone to actually read these summaries, but they help me determine what I did well and what I didn’t accomplish over the year while figuring out what I want to adjust for next year. So here’s how I did in 2023. Writing # My goal for the blog is consistent, useful, helpful, and fun posts. My publishing ‘plan’ is one post a week for 52 posts a year. Counting this post, I published 118 posts which I’ll take as a big ole win. My traffic, according to Netlify,... 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

AutoGrow Textareas with CSS

As the demands of the web change and developers experiment with different user experiences, the need for more native language improvements expands. Our presentation layer, CSS, has done incredibly well in improving capabilities, even if sometimes too slow. The need for native support for automatically expanding textarea elements has been long known…and it’s finally here! To allow textarea elements to grow vertically and horizontally, add the field-sizing property with a value of content: textarea { field-sizing: content; // default is `fixed` } The default value for field-sizing is fixed, signaling current behavior. The new behavior, content, will expand as much as possible.... more →
Posted in: JavaScript

An Image Dialog Web Component

A lot of the talk (well, on Mastodon at least) lately concerning web components has been on "HTML Web Components". The idea is that web components can progressively enhance "regular" HTML in the DOM instead of completely blowing it away with the Shadow DOM. (You can find a deeper discussion of this in Jim Nielsen’s blog post.) This is something that’s been on my mind for a while now as well and I’ve kept my eyes open for opportunities to build web components that enhance, not replace, content. With that in mind, I built a really simple component that does something fun. We’ve all seen sites that use JavaScript to provide a thumbnail and detail view... more →
Posted in: JavaScript

Google Gemini and AI Studio Launch

While it feels like just yesterday I first blogged about Google’s PaLM APIs and MakerSuite, it was actually over two months ago, and of course, GenAI offerings are iterating and improving at lightning speed. In the past week, Google has announced Gemini, their new generative AI model. Naturally, I was curious about the API aspect of this and took a quick look. MakerSuite rebranded as AI Studio # First off, the web UI (which I reviewed back in my first post) has been renamed to the generic and boring, but probably more enterprise and appropriate, AI Studio. Along with that, when creating new prompts, it will default to use Gemini models. (You can still select PaLM if you want.) Another change…... more →
Posted in: JavaScript
1 4 5 6 7 8 77