Tales from the jar side: Perplexity has an API, V is for Venkat, a Flux 1.1 video, the WNBA, and the usual tweets and toots
I made my wife's dream come true by getting married in a castle, but you wouldn't have known it from her frowns as we were bouncing around (H/T @mediocrejoker)
Welcome, fellow jarheads, to Tales from the jar side, the Kousen IT newsletter, for the week of October 13 - 20, 2024. This week I taught my Reactive Spring course on the O’Reilly Learning Platform and my regular courses at Trinity College.
Perplexity API
Perplexity is an AI-based search engine that has grown a lot in the last few months. Here’s a snapshot:
The question I asked was, “What is the market share for Perplexity?” and the answer is really small, but growing. Among the AI tools, it’s doing really well. The important thing to notice in the snapshot that the response returned its sources as well as answers, and that the answers are annotated with references. The response also included relevant figures, which I could browse separately.
What you don’t see are any ads. Perplexity is a subscription service. A lot of people are using it, and its arguably the first real threat to Google in years. With the Pro plan, you can do a lot more customization as well, such as picking which of the major AI engines you want it to use, like switching from GPT-4o to Claude 3.5, adding your own documents, and customizing the search. All things Google could have done but didn’t because monopolies don’t need to worry about such things.
What I find significant this week is that Perplexity introduced a programmatic API. More than that, it basically reuses the OpenAI API, which you can see from this Python sample:
In other words, use the openai
library, just with the Perplexity API URL and its own key. Everything else is the same, though you have to pick one of their models:
llama-3.1-sonar-small-128k-online
llama-3.1-sonar-large-128k-online
llama-3.1-sonar-huge-128k-online
llama-3.1-sonar-small-128k-chat
llama-3.1-sonar-large-128k-chat
What strikes me immediately is that they’re delegating to the llama3.1 model from Meta (Facebook), which is open source. So what do you get for using their API that you couldn’t get from any of those models directly? Access to current information on the web, for one, plus their summarization engine. The other benefit is that API access is way less expensive than the regular subscription, costing about half a cent for 1000 tokens, which is pretty consistent with the other AI tools.
I registered, got a key, set it as an environment variable (lol my rant about that in the last newsletter), and tried a few examples. It works well, though I’m not sure how often I’ll use it. Still, it made for a nice exercise for my AI Integration students, since the necessary code is a tiny variation on the OpenAI model they’ve already been using.
V is for Venkat
Venkat Subramaniam visited New England this week. I would normally say that he came to Connecticut, but Venkat never does anything halfway. He and his wife did come to the state to visit their son, who is graduating this year from Yale. But as is typical, they didn’t stay in one place. They decided, pretty much on a whim, to drive to Boston to visit schools up there (his son is looking at MD/Ph.D. programs, because of course he is), and then, on the way back, they stopped by Trinity College so Venkat could teach a couple of my courses, before heading all the way down to Philadelphia to drop off their son at a conference.
The part about teaching my courses was actually planned. I asked him when he would be visiting his son down at Yale and scheduled around it. Even though New Haven is about an hour away from Hartford, I knew Venkat would take time out of his schedule to come by and talk to my students. Asking him to give a couple of talks is nothing to him, or so he says, so that was not much of an imposition. I did at least buy him lunch. :)
Here’s a post of his from just before his current trip began, along with my reply:
I’m glad he threw an international trip into the mix, or that would be a misleading tour.
Venkat talked to my Software Design students about design patterns in the light of functional programming, and then he spoke to my senior seminar students about The Art of Technical Presentations. Naturally he told a lot of stories in that one, and made a few recommendations, some of which I don’t necessarily agree with. We’ll debrief next week. Still, both classes were fun and interesting and I’m sure the students got a lot out of them.
In between the classes (and lunch), I managed to get him to do a Live Stream, which you can find on the Tales from the jar side YouTube channel.
The title is “5 Questions for Venkat Subramaniam,” but what the video was really about was introducing Venkat to the Venbot 5000, the custom GPT I made for his conference a couple of weeks ago. He was appropriately appalled that the custom instructions told the bot to continually push one of his books in the answers, but he found it funny that almost every answer also recommended my Mockito Made Clear book, with the weak justification that Venkat wrote the foreword so it must be awesome.
We had a really good time. Both of us were in my office, and as you can see he was facing the window and I wasn’t, so the lighting on my side was pretty bad. If I’m going to do this again I’m going to need to do a better job with that. Still, the whole interview was fun.
Flux 1.1 Video (Java version)
I mentioned last week I’d finally gotten around to recording a video about accessing the Flux 1.1 pro image generator. I released that video on Monday:
This week I’ll release the companion video that accesses the same service in Kotlin with coroutines. In celebration, here’s a new picture from the same service:
Not to be outdone, here’s a cat general as well:
I’m still enjoying this image generator, which feels to me like the best of the bunch.
WNBA Championship Tonight
In case you haven’t noticed, this WNBA season has been fantastic. The championship series is a best of 5 (next year they go to best of 7) involving the #1 seed New York Liberty and the #2 seed Minnesota Lynx, and the two teams are as evenly matched as can be. All four games so far have gone down to the wire, with at least two of them decided by the last shot. The series is tied at 2 - 2.
Here’s the minute of Game 3, featuring a logo 3 for the win:
Tonight is game 5, at 8 pm ET on ESPN. One way or the other, the season ends tonight. If you like basketball at all, try to make time for this game.
(I’m trying not to think about the fact that the two teams are so evenly matched that the winner will be determined almost completely at random. Sometimes it’s bad to know math.)
Tweets and Toots
Just sayin’
Again a bad week for the GOP candidate. I’m not going to go into details, but it’s getting really ugly for him and them.
Elon and his investment
This week Twitter updated its terms of service. Not only do all disputes have to get resolved in that particular district in Texas where the judge owns Tesla stock.
This is “judge shopping” at its finest, or worst, depending on your point of view. Also, now Twitter will use all your data to train its AI, and opting out isn’t so easy.
I’m sure in unrelated news, the value of Twitter is estimated to be down 84% from when Elon bought it. Things are going great over there.
It’s now come out that in addition to campaigning openly for Trump (despite having multiple major government contracts), he set up sites that are using fake replicas of Harris and tweeting made up messages that are supposed to look like the come from her. Frankly, he’s going to be lucky to stay out of jail. It’s hard to think of anyone who deserves it more.
Meet the Bishop of Mars
By that convention, here’s this:
I know it’s not up to me, but by all means, take that seriously. :)
WordPress drama
My newsletters have been too long lately (or not so lately), so I haven’t had a chance to get into the drama at WordPress. It centers around a conflict between WordPress co-founder Matt Mullenweg and WP Engine, a major WordPress hosting company. Maybe I’ll get into the details next week, but it looks very much like Mullenweg has completely lost his mind and is fighting a control battle that’s likely to ensure mutual destruction.
Believe me, when David Hannemeier Hansson (DHH, who sent the above tweet and wrote the companion blog post) is calling you out for arrogant, unnecessarily confrontational behavior, you’ve really gone over the top. That’s like Marjorie Taylor Greene saying your conspiracy theory is a little hard to believe.
This a car wreck worth watching. I’ll just include this post:
Here’s the direct link to that post in case you want to check it out.
Genius
I have to try that next time I have a problem.
Yet another AI tool?
The look on the cat’s face makes the picture.
The joys of home ownership
I know owning a home is the American dream, and I’m really fortunate to have one, but the sentiment in that post is real. Last week it wasn’t a noise that triggered it, but we finally had to have our roof replaced. The workers did a good job, but it was, shall we say, pricey.
Incidentally, I acquired my first house the old fashioned way: I married into one. Highly recommended if you can do it.
The pain will go away eventually
Good advice, but ouch.
An easy mistake to make
I’m sure they’ll understand. Anybody could make that mistake.
And finally:
The other GTA
That’s a good gag. I’ll have to add it to the list.
Have a great week, everybody!
Last week:
Reactive Spring, on the O’Reilly Learning Platform
My regular Trinity College schedule. Two of my three classes were taught by the inimitable Venkat Subramaniam.
This week:
No training classes this week. Maybe that means I can make some more videos.
My regular Trinity College schedule.
I love how you discuss API info and strategies! Your insights are practical and actionable. I’ve started using EchoAPI, and it has simplified my process of building clean and efficient APIs.