Bad Cold Brew, Laracon Talk Prep, and Prism Developments

Chris Gmyr (00:00)
Hey, welcome back to the Slightly Caffeinated Podcast. I'm Chris Gmyr

TJ Miller (00:03)
I'm TJ Miller.

Chris Gmyr (00:05)
Hey TJ, so what's new in your world? It's been a little while since we chatted.

TJ Miller (00:09)
Yeah,

yeah, man. It's been a couple of weeks. it's crazy. feel like I don't have a lot to talk about for the last couple of weeks. Like I've been pretty heads down on like Laracon prep and trying to squeeze in as much of prism as I can and, keeping my son busy for the, for the summer and making sure he's got plenty of stuff to do. yeah, battling some mental health stuff just,

It's been a tough go the last few months. lot of ups and downs, but you know, just treading, treading water, moving along. And like I said, just like deep in, in Laracon prep and then whatever, whatever spare time I have is going into Prism. Would love to be spending a little bit more time on it right now, but Laracon's the priority. Lots of talk prep.

Chris Gmyr (00:53)
Yeah.

Yeah. A couple more weeks for that, but getting close.

TJ Miller (00:57)
Yeah, man, think we're, I think

we're in the like 19 days. So like we're, we're getting there. Um, but this is probably the most prepped I've ever been for a talk like this early. So, um, I think it's going to bode really well. think you've, you've seen a couple of the drafts, um, like draft recordings. So, uh,

Yeah, feeling good about it. How about you, man? How was travels?

Chris Gmyr (01:20)
Yeah. Travels were OK. was a long couple weeks. Because going up to New York, we stay over halfway through and just everyone in the hotel room and the single hotel room with the dog and kids and noises and stuff like that is just tough. that's I don't know. I think we're getting to a point, especially with the three year old, that she doesn't.

like to sleep and she was like kind of sick coming back home. like that coming back home, like in the hotel was kind of a disaster. it's like, man, I think we have to try and like get up early and drive straight through next time, even though it's like 12 hours. But I don't know, it's a lot better than stopping and assuming that you're going to sleep and rest and then don't, and then probably worse off than just like driving straight through. So.

TJ Miller (01:47)
Mmm.

Yeah,

yeah, that's quite the debate, man, because I think you're probably worse off stopping and not sleeping. Like, you're probably just better off like powering through and then like, I don't know. I've, I've done a couple like big ones like that where, I mean, these were solo, so I didn't have to worry about all that much, but it was like, yeah, get to a point where I feel like I was fading, pull into a rest area, like grab an hour of sleep and then

pick back up and keep trucking. But that's going to be so hard to do with dogs and kiddos and...

Chris Gmyr (02:41)
Yeah, yeah. And when we've done like slightly longer like day trips before like eight or like six or eight hours, usually we'll try and find like a park or, you know, something like that that we can stop in, you know, get some food, get some gas. And then there's like a park or something close by that the kids can just round for, you know, 10, 15 minutes or half an hour. But when you need to be in the car driving for.

TJ Miller (02:58)
Yeah.

Chris Gmyr (03:05)
12 hours, that's a lot harder to do. Cause even if we left at like six in the morning, you're still not getting there until like after dinner time. so to add on another hour for two stops or something like that is, I don't know, it can be a lot tougher. So, I don't know, we'll see how it goes. And it depends on when we go up there next. I'm not sure if we're going up there for the holidays or not, but it's also a lot trickier when it's snowing and cold and icy and all that.

TJ Miller (03:13)
Yep.

Yeah. Yeah.

Conditions get a lot more like you gotta make a lot more considerations for like weather conditions and stuff. Yeah. Yeah. I top out in like eight, nine hours in the car and then I got to take a break. my, it's less like mental strain and more like my back. Like my back starts to get really irritated. I've got some like weird thing where like

Chris Gmyr (03:31)
Yeah.

TJ Miller (03:52)
I'll get a pinched nerve on like one side and it's happened on road trips like several times and then you're just like I'm I'm screwed the whole trip like it it could take like a day to recover it could take like it's been taking weeks to recover before. ⁓ So yeah, it's I top out at about like eight nine hours and I'm done driving.

Chris Gmyr (04:07)
Yeah.

Yep, totally. But besides the actual travel, once we got up there, it was pretty good. No one really sleeps very well there, and the kids were up at 5 o'clock in the morning every day, which is a lot earlier than they usually get up. So it was just early days, long days. But at least we had enough family or friends or activities during most of the days to occupy them. And we got a couple nights to ourselves, and that was nice too.

TJ Miller (04:36)
Yeah.

Chris Gmyr (04:41)
It was just like a little break, but you know, it's always just different sort of chaos, just traveling and then coming back here and then everyone's all, you know, out of sorts, dysregulated and getting back on a routine. And then our daughter, the three year old has been in a crib this whole time. So when we were up there, she was just in a smaller pack and play. So she decided that she was going to start climbing out of the crib. So.

TJ Miller (04:45)
Yep. sure.

Chris Gmyr (05:06)
She was just like out all the time, like just when she was supposed to be sleeping. And then when we get back here and like a much larger crib, she was like, I'm going to try and do it here. So we had to convert her bed to like a toddler bed so she can actually get out and not use like a sleep sack anymore. So she can actually walk without it being a safety issue. So that's been a whole new transition is getting her into a toddler bed and actually like staying in a room and

TJ Miller (05:21)
Yeah.

Chris Gmyr (05:30)
quiet during the night. So I actually had to like unscrew her like main light bulb in the room because she got up at three o'clock in the morning the other the other morning and was just like, oh, it's time to play. And I had there and put her back in. And so the next day I just unplugged the light and she did a lot better last night. But yeah, just lots of transitions, lots of lots of random family stuff have to go through. But

TJ Miller (05:54)
Yeah.

Chris Gmyr (05:58)
Yeah, then just getting back up to speed for the last couple weeks at work and getting back into the swing of things. So all good, not too bad, but just, you know, out of sorts a lot of times.

TJ Miller (06:09)
Yeah, yeah, it's that, especially with young ones, it's that breaking of routine that is, it's so tough on the breaking side and then re-establishing it side is pretty rough too. Yeah, especially with the young ones. But yeah, they'll fall back into it.

Chris Gmyr (06:25)
Yeah, we're we're getting through it. So we're feel like we're getting close pretty soon. Yeah, I want to talk to some coffee for a few minutes.

TJ Miller (06:30)
Yeah.

Yeah, dude,

let's talk some coffee as I'm sitting here drinking maybe the worst cold brew I've ever had in my entire life. It's not mine. Yeah, I ran out and so I ran out of like beans and everything. So like I have beans for hot coffee. I ran out of like bulk beans for cold brew because I'll use a little bit different stuff for cold brew than I do my hot coffee. And I ran out and so I was at the store and I bought

Chris Gmyr (06:40)
now.

good.

TJ Miller (07:01)
like just a jug of cold brew. And this stuff is awful. It is so bad. This is luckily this is my last my last cup of it, but it was it was the worst cold brew I've ever had. So

Chris Gmyr (07:17)
Yeah, I've tried

a couple off the shelves and a lot of them are just like just bitter, gross, not sweet or flavorful at all. It's just gross.

TJ Miller (07:25)
Like,

yeah, the unsweetened stuff is like always bitter and the sweetened stuff is like way too sweet. so I, there's a couple brands that like, can definitely tolerate. so like, we'll pick up a jug of those for road trips and stuff, you know, like toss them in a cooler and we got like iced coffee to, to drive with. but man, this stuff was, stuff was rough. Like I'll drink it cause it's all I got, but like, brutal.

Chris Gmyr (07:45)
Yeah, yeah.

Yeah. Yeah. And when we were traveling, sometimes I bring my coffee stuff like grinder and our own beans and stuff like that, but we, it wasn't quite long enough to warrant that. So like, just used whatever was there. the last time we were up there, I got a new like drip coffee pot. but like, my mom got us cause she stocks a few like groceries when we first get there. So she bought this like huge tub of like, you know, pre ground.

Dunkin Donuts coffee. I'm like, all right. So we've been drinking that like on vacation and then coming back here. It's like, oh, finally back to beans back to grinder, fresh ground and all the niceties. So I don't know, might have to pre ground some coffee on the next trip or something, but I don't know. It's just so much other stuff to pack that it's like, it's probably not worth it.

TJ Miller (08:22)
Yeah. Yep.

Yeah, like, like we've talked about before, I think like the number one thing you can do to improve coffee is like fresh ground. Like I think that's it's a

I think it's like probably the smallest thing you can do to make the biggest improvement. ⁓ Like there's a lot of other things like brew method is huge and everything, but like even out of, if you're like just using like drip, if you move to like fresh ground, I think it makes such a big difference.

Chris Gmyr (08:53)
Yeah.

Yep, yep, totally. ⁓

TJ Miller (09:08)
So yeah, just like bring

your grinder and some beans and you'll be all right.

Chris Gmyr (09:11)
Yeah,

yeah, if I ever get like a new grinder, which I got just got one a couple years ago or two years ago, because the other one that I had finally stopped working. But if I wanted to switch up what I got now, I might bring this one up to New York and just leave it there. Then not have to worry about it in the future. So just a little tweaks and improvements over time.

TJ Miller (09:29)
Yeah.

Yep. Yeah, for sure, man.

So I haven't, but have you tried any of the like, multi coffee subscription services? Like I think there's a few of them out there. I've not, I've not tried any coffee subscription service at all before. Probably something I should try, but like I'm almost

I'm almost always working, like trying to get from like local roasters and stuff too. So that's, trying to support the, like the local stuff, but yeah. Have you ever tried any of these like multi coffee subscriptions or subscription services?

Chris Gmyr (10:08)
Yeah, it's been been a little while because I've just been on the purity coffee, so I just subscribe to them with like three or four bags a month. But before I was trying like a lot of different coffee, so I tried Misto box and it's like one of the ones you sign up for. You take like a little survey of like what you like, what you don't like to the type of root methods that you're using and stuff like that. And then it'll send you however many bags that you sign up for.

you know, per month or like every few weeks or something like that. And they're all from like smaller coffee roasters. So even though it's not like maybe local to you, it's just other local roasters just in different areas. And I haven't tried trade coffee, but that's another big one that is very similar. I've also tried Seattle Coffee Gears subscription.

TJ Miller (10:46)
Yeah

Chris Gmyr (10:56)
And they do a lot of they still have like some local coffee roasters, but tend to be like a little bit of the larger ones. So yeah, I've tried a bunch from had some wins had some that were like not as good. So you just don't really know, you know what you're going to get, which is kind of, you know, interesting and to try some things out, but not doing any any of them right now. But when I was doing it,

I think I mentioned before a couple times that I made that notion database of all the coffees that we had come in, and I rated them, and had pictures, and prices, and all the things. So that was super helpful to dial in some of those subscription preferences, which I don't really use right now because I just get the same stuff all the time. But when you're getting a whole bunch of random coffee for the year, it's hard to keep track of which ones that you like, which ones that you didn't like.

TJ Miller (11:27)
Yeah.

Yeah.

Chris Gmyr (11:48)
And ideally, if you find ones that you like, then you can just buy those direct in the future or whatever. So it's good to keep track of.

TJ Miller (11:54)
Yeah.

Yeah, no, that's cool, man. think maybe that's something we'll try this winter is, you know, I guess I've always thought about them as like subscriptions to like counterculture or something, right? Where it's like, that's a coffee brand, right? Yeah. Yeah, I'm a fan as well. And so I always think about the subscriptions as like subscribing to like

Chris Gmyr (12:12)
Yes. Yep. I counterculture.

TJ Miller (12:21)
their, like that brand, right? Like I've not thought about any of the like, multi-coffee like subscription boxes where it's like, yeah, it could be anything. Like it could be from like any, any roaster, but it'll like kind of suit your profile still. I think it'd be cool to kind of like try different stuff. know like, gosh, I feel really old, but like, man, it was probably like 10 years ago.

we had a random coffee trade circle going on and that was super fun. That was, yeah dude, I'm done. This is like eight, something years ago. It's gotta be getting up there. It's been a long time. We pulled a bunch of random people in there. We pulled Abigail in there and we were doing it too. That was a lot of fun. We should maybe, when we get to the holidays, maybe we should do that.

Chris Gmyr (12:51)
that was a real long time ago. ⁓

TJ Miller (13:10)
get a handful of people together and do a like secret Santa coffee trade.

Chris Gmyr (13:13)
Yeah, that would be super fun. ⁓

TJ Miller (13:15)
my gosh,

we should totally do that. That'd be super fun.

Chris Gmyr (13:18)
Yeah, I like that. should, I don't know, how about like a sign up form or if you are interested, can email us at hey at slightly caffeinated FM or leave a comment.

TJ Miller (13:26)
Yeah. If you're interested

in email us and we'll like vibe code an app or something where you can just like sign up and then we'll like, I mean, dude, we could easily do this with like Google forms too. Just like sign up, give us like, yeah, well, absolutely vibe code it. Yeah. Somehow managed to work AI into this. we could, we could have AI do the assignments, like match people up. that could be kind of fun. yeah, I think, I think.

Chris Gmyr (13:30)
Yeah.

Yeah, that's not fun. We'll vibe code it. Do something like prism stuff like.

TJ Miller (13:51)
I think it's a fun idea. Yeah, like get your profile, like your flavor profiles and stuff in there. And then, man, that sounds like a lot of fun.

Chris Gmyr (13:58)
That'd cool.

does sound fun. We should do that.

TJ Miller (14:03)
Yeah, we should absolutely do that. I gotta write

this down.

Sick man. moving on from coffee, we're like, yeah, we touched on it a little bit, we're like, as of recording, we're like 19 days out from Laracon. And I am speaking and I am deep, deep in the weeds on prep.

Chris Gmyr (14:13)
Yeah, it's getting close.

Yeah,

I mean, it's looking good. You made like six or seven trial run videos that you shared with us and the cash money channel. And I think I didn't look at the earlier ones. I just looked at the latest one. But man, it's a it's a super awesome talk and lots of code. I prefer more code than, you know, anything else. So like if you're interested in more code.

heavy and lots of examples, like you're going to this talk. I think it's going to be great. I wish I was there, going to be there, the live conference version. But alas, I am not.

TJ Miller (14:54)
Yeah.

Yeah, I'm still so bummed.

I'm still so bummed about that. Yeah, everyone else is going. Yeah, it's a huge, huge bummer. But yeah, I really appreciate that. Yeah, this is, I mean, we're talking Prism. like, really, I don't know any other way to talk about it than like talking about the code, because that's like such a huge piece of what I've poured into Prism is like the

Chris Gmyr (15:01)
So I think everyone else is going, right?

TJ Miller (15:24)
the API and how you interact and work with Prism. So this is super code heavy. I considered live coding it because it is so code heavy, but I'm just not that confident and brave. we're just slides of code. ⁓ But.

Chris Gmyr (15:41)
Yeah, even though that

would be cool, like there's always like depending on what you're working out, which you're touching on basically all of the features in prism. So I think the latency on some of those responses could be pretty heavy, like the image generation and analytics and things like that. So I think it's probably better that you don't do live coding, but maybe some like examples of outputs or screenshots of.

whatever is the outputs for some of these things would be really cool to put into.

TJ Miller (16:11)
Yeah, I think that's what I was kind of thinking as far as like, if I wanted a live demo stuff or something like that was to probably like cache all the responses so that I could get just like instantaneous, like so I can interact with like real responses, but not have to make a real request. ⁓ So that's, and I was going to try to leverage.

Chris Gmyr (16:31)
Yeah, that's a good idea.

TJ Miller (16:35)
Prisms like testing utilities. So could like either, either do something like PHP VCR where I can just like play back the responses or use like Prisms testing utilities to like kind of stub out all those responses and everything so that it could just be like real snappy, snappy feedback and everything. Because we use Laravel's HTTP client under the hood. There's just like so many affordances for us to be able to like.

intercept the HTTP requests and do different things. it's something I thought about, but I'm just, I'm not confident or brave enough to do it. So yeah, we're just, we're, doing codes and slides. And I think it works out fine. Like, it was tough. One of the things that was like interesting about putting together the code for all of this was trying to figure out like,

how to break the code down or think of examples where the code could fit on a slide in an easily digestible way. So that was kind of tricky coming up with some of these examples. It's like, need tight, clean code for this. So I need an example that's interesting to talk about and interesting to work through.

something that's relevant to how people are going to be interacting with Prism, because I wanted to like, I want people to walk away feeling confident being able to use this. So all of the examples I feel like are practical use cases for Prism. And it's like trying to come up with those examples that can fit into a slide or that I could break down over a couple slides.

That was, that was kind of tricky, but I feel like I've got all the examples nailed down now and we're just, we're in like refinement mode, rather than like still, like I think, I think I've recorded six run-throughs of it so far. I've done probably a dozen run-throughs on it and something I, I did different for PHP tech and my talk there was.

I just like, I ripped through and came up with a bunch of like slides that in the end I never ended up using, but like, I basically just like stubbed out the talk and then just started like running it. Um, and we're just refining it iteratively, like run it. All right. Didn't like that. This didn't flow well. This flowed well. Um, this example was good, but it was like awkward to talk about. So I got to like, let's change this example out.

But really, instead of just like painstakingly working on the talk, I decided to evolve it by like doing the talk over and over and over again. And that felt, I think it resulted in the talk feeling very natural. And I decided to take a very similar approach here where I kind of like figured out

most of the examples that I wanted to use for things. So I kind of like came up with like, here's the sections, here's what I think are some examples for this stuff, and then just started like running it and kind of doing the same thing. There is some of the flow for this talk that I'm not 100 % confident on, but in order to rearrange it, I feel like I would need to rework the examples and

I don't know if I want to do that at this point. I'm feeling like it's pretty dialed in. It's like I talk about text generation, then structured output, then streaming text generation. And I think I'd like to go text generation, streaming text generation, then structured output. But the stuff we talk about for streaming text generation is built on the code example that we use for structured output.

because that's kind of how I wrote everything to start.

I think it would flow better that way, but I'm already pretty ingrained with these examples. So like, I'm just going to run with it. ⁓ Yeah. And I think it builds well. So like some of the examples kind of build on each other so that there's like,

Chris Gmyr (20:22)
Yeah, they're gonna pay, right.

TJ Miller (20:31)
One of the things going through so much code is like, really wanted to try and limit the attendees like context switching. We're like, here's a thing, here's like a feature that we're building as an excuse to talk about using Prism. But I don't want you to have to like constantly be switching like concept of what we're building. So like text generation is its own thing.

structured output and streaming text generation kind of like build on each other. And then I think the rest of it are all like independent examples. So there's only like one section that kind of like builds on each other. But I think it's a like strong example of how to build on each other. So like, I think it just like helps keep the flow of everything and keep

people from having to context switch too, too much. And I think I need to slow down my pace a little bit just because it is so code heavy. And we break down a lot of the code examples too. And that's something that like,

I thought was important where it's not just like, here's a big block, like here's a block of code that does a thing. But like, let's step through this code and like explore all the different pieces and like a little bit of like why we're using like different parts of it and like what they do. So.

Chris Gmyr (21:42)
Totally, even though it is a lot of code, like the fact that you step through, like mainly line by line for everything, is really helpful to follow because there is a lot, but when you're doing that, it is more manageable for the viewer and listener.

TJ Miller (21:58)
Yeah, that was something that I really wanted to focus on was like, I know this is going to be a lot of code. I feel like there's any time you do that, there's like a risk of like glazing people's eyeballs. Um, and I really, I wanted to be cautious of that. So there is a lot of code that we walk through, uh, like either chunk by chunk or like line by line.

And I think that that was important to keep things digestible. cause that was just like, it was an important thing for me. it was like, I want this to be, it's going to be code heavy, but I still want it to be like digestible. Um, so that's why I think I erred on like breaking things down, like line by line throughout it is just like, and it kind of, I think sets the pattern for like,

Chris Gmyr (22:38)
Mm-hmm.

TJ Miller (22:50)
By the end, you understand the expectations around using Prism. So you get to that point where you can start to assume method names exist. And because we've broken everything down line by line, I feel and I hope that you just walk away with this really deep understanding of Prism and be able to walk out of the talk, go look at the docs, and start interacting with it right away.

That's kind of the hope that like people could like sit down at lunch after my talk. like I talk schedules out. So like I'm speaking early on the first day, which I'm super excited about. So I don't have to like stress about the talk like the whole time. So.

Chris Gmyr (23:17)
Mm-hmm.

Yeah.

TJ Miller (23:32)
I go early earlier on the first day. Like I think it'd be super awesome to see people come out of my talk and be able to like sit down at lunch and be able to build with Prism like right off the rip. And I, and I hope that that's how people can walk away from this talk is like feeling good enough and confident enough and like having enough understanding of it that they could like sit down with the docs and start building at lunch after the talk.

Chris Gmyr (23:55)
Yeah, totally. I think that's totally reasonable. And we're going to be sharing the slides shortly after or available during the talk.

TJ Miller (24:03)
I don't see why not.

I see why not. I didn't have any specific plans to do that or not, but I use, I've really become a big fan of slide dev. You can check them out at sli.dev, but it's like a Markdown driven presentation tool. So like you have a slides.md Markdown file and all of your slides are in that file.

But it's all like, it's, you can like create custom view components and use those if you wanted to. You can just drop in and use like Tailwind and CSS and use like Shaky for highlighting. It's just like, it's got like everything you could need and enough affordances that you can like heavily customize it if you want. Like I took the bass theme.

exported it and then just like went to town customizing it to get like my slides to look the way that I wanted to. And it supports like light and dark mode, which seems like

seems like not an important feature, but I'll tell you what, like getting to a venue and not knowing how the lighting is going to be. Like if the room's dark, you can use, you can get away with a dark mode theme and like, that's what I'd prefer. But if like the contrast isn't really strong, like depending on it also depends on like how your slides are being shown, like the contrast that's available there. So it's like, I feel like supporting light and dark mode is actually.

like fairly important so that you can adjust on the fly depending how your slides are showing up on the display at the venue. So when I did the theming, I made sure to like make sure both dark and light mode like work work well so I can toggle between the two. But like.

I used to use Keynote, which is fine, but like...

slide dev has just been amazing. I used it for all my slides for PHP tech, and then the Laracon stuff went super smooth with it, being able to customize it even further than I did for stuff at tech.

So yeah, slide dev is great.

Chris Gmyr (25:57)
I haven't made slides in a while. I used to use Dexset, which is similar, like Markdown. you can do different. They have tons of different designs that you can use out of the box. And you can adjust them and lots of customization. I don't think you can put in any sort of JavaScript or do anything too fancy like that. But.

TJ Miller (26:19)
Yeah,

so I used Dexset before as well. I liked it. This has so many affordances. one of the things that the reason I bring it up based on what you had said was they make it really easy to export to HTML. And so I can easily have a repo for it already. So I could easily, I think, turn it into GitHub pages or

Chris Gmyr (26:37)
Mm-hmm.

TJ Miller (26:44)
I don't know. I'm sure I can do something relatively easy or put it up on Cloudflare or I could probably toss it up on Cloudflare pages pretty easy too. So I think there's, like I said, the reason I brought it up was, yeah, I think I could export it and host it pretty easily so people can get back in and see the examples. There's not a lot of, there's a lot of code, but there's not a lot of text.

So there's not many slides that are bullet points. A lot of it is, here's some code. Let's step through this code line by line, and I'll talk about it as we get there. So there's not a ton of context, but you will be able to get to see the code examples.

Chris Gmyr (27:22)
Yeah, and are the is Lercon using like speaker deck or anything else like that to because I know sometimes they ask for slides and like PDFs or something to upload there and you can rate and review and comment on speakers and presentations and stuff. Are they doing anything like that this year?

TJ Miller (27:39)
I don't,

I don't know if they're, they're doing anything specifically for that, but I think, I think that's community driven and like, if people want to go and do, do that, like you can go and do that. there's another service that's similar. but I, yeah, I don't know. There, there's nothing official as far as I know. but.

I could always upload stuff to speaker deck later. ⁓ But I might as well just host it at larycon.prisonphp.com or something like that and just serve the slides there, make it easy to access.

Chris Gmyr (28:00)
Yeah.

Yeah, totally. Cool. Yeah, I'm looking forward to it. Hopefully I'll be able to catch the recording and if they're doing the live stream again this year.

TJ Miller (28:20)
Yeah,

I'd assume they're doing the live stream again. That's been something they've been doing for the last few, so.

Yeah. Yeah, man. Moving on from Laracon, we can talk some like Prism stuff too.

Chris Gmyr (28:31)
Yeah, what you been sneaking in there?

TJ Miller (28:34)
boy. well, putting together the talk, there were some slides around, multimodal inputs. So like being able to send like images and documents and like different types of media to the language models for like context and like processing and stuff. Right. So like you want to send like a PDF and like have it analyze some data or CSV or something like that. we allow for all of that, but right now that's all done through like chat.

And so, um, it's kind of annoying to like break out of the main API and like force people to use the chat interface, like the messages interface to send media. So as I was putting together a slide, I'm like, ah, I'm like putting the code example together for the slide and I'm like, mm, mm, don't like this. like ended up just reworking the slide. And then now I've been working on a PR to like add that functionality, like

two prisms. So there's, as the talk stands now, there's some not merged functionality that I talk about, like I use in the code examples. So I've got to hurry up and get that stuff in. ⁓ Yeah, I'm trying to get to 1.0 before Laracon. Like, I think that's something that's important for me to do. But there are some like, breaking changes I want to make beforehand.

Chris Gmyr (29:39)
Yep, got a little bit more time though.

TJ Miller (29:53)
so if I'm going to break out this messages functionality for multimodal inputs, I want to rename space the value objects for these different things like media or document or image. I want to rename space them because right now they're namespace under like value objects, messages, support image or document. so they're like deeply nested specific to messaging. And I want to like.

Rename space those just like top level value objects of like document image media all that kind of stuff Or maybe namespace them under like

value object slash media or something like I don't know like I just want to rename space them like out of this messages like realm so that's a breaking change for people who are doing that kind of stuff so I want to I mean that's a pretty easy like thing to grep like just like riprap through your your code base and like fix

Chris Gmyr (30:33)
.

TJ Miller (30:44)
But I want to make that breaking change. And then I'm really torn on what to do about streaming. So I want to make some significant improvements and adjustments to streaming output that are going to be breaking changes. But I don't know if I can get them done before Laracon. Because there is some community debate around those changes. Because I opened up a draft PR for it.

There are a couple of pending PRs for like streaming chunk changes. so like, I kind of need to make up my mind about what I want to do and like solidify the vision for streaming and then make those breaking changes. So the decision I'm faced with is to like,

Chris Gmyr (31:21)
Mm.

TJ Miller (31:26)
really push hard and try and get those changes in before 1.0, or tag 1.0 but flag streaming as beta. And I don't know how I feel about that of including a feature in a 1.0 release, but saying there could be breaking changes to streaming still.

Chris Gmyr (31:46)
That is a little weird.

TJ Miller (31:48)
It's a little weird, but I feel like it's not an uncommon thing of like, we've introduced this like feature. It's like a beta feature.

but like.

I don't want to, it's not like I want to strip streaming out and publish a 1.0 and then re-add streaming later. That feels even worse. Because we have a usable stream now.

Chris Gmyr (32:09)
Yeah, if you tag 1.0 with streaming being beta, would you just tag like a V2 once streaming was up to date or where you wanted it?

TJ Miller (32:22)
I would probably just like take it out of beta and say like, you know, I'd have like a big, if you went to like the streaming section in the docs, I'd have like a a big notice there saying like, hey, this isn't beta right now. And like, when it comes out of beta, I'll just like pull the notice and just announce that like, yeah, streaming supports out of beta and still be inside of like 1.0.

But just kind of call it out as this is a proprietary feature right now. And so expect breaking changes just to this. And then once that's ready, just announce that it's ready and give it a feature release.

Chris Gmyr (32:56)
Yeah, you know, it's a little weird. think it's probably reasonable, especially if it's well documented.

TJ Miller (33:01)
Yeah, I can't think of a specific example, but I feel like there's precedent, precedence for this. Like, I feel like somebody's done it where it's like, yeah, this, this piece of functionality inside of 1.0 is unstable at the moment. and I have a feeling that that's probably what's going to happen because there's just like, I'm not very well versed on the streaming side of things because I just, I don't, I don't use it.

I haven't had a need for it and like my streaming usage is pretty basic. but there are people who are building like chat interfaces and that are, are really leveraging streaming. so it's hard for me to make decisions and like establish a vision for streaming when I just, I don't use it enough. And so I really wanted to like,

In order to crack streaming, really wanted to sit down and like I've got a prototype, but it's pretty janky. I wanted to build a like Prism chat application UI, like nothing for like public consumption or anything. Like I might build it and use it, but like just build something as an excuse to.

Chris Gmyr (34:04)
that I'll take her with.

TJ Miller (34:10)
be able to play with some of this stuff because there is another package that I want to build called Cortex that is like conversation memory management and persistence for chat. So just like make it super easy to be able to like persist and rehydrate conversations. ⁓ And so I've got like a, I've got a vision for doing that by

Chris Gmyr (34:26)
like that.

TJ Miller (34:31)
I need something to start playing with. I need to build this chat app and feel where the pain points are and where I can make life easy. But also with these streaming changes, I need to feel the pain points in order to know how to make it easier. And while I've got some amazing contributors trying to contribute stuff for streaming,

It's just, it's hard for me to like merge that stuff and know how I like, and know how I feel about it when I'm not actively using it. So it feels like leaving it as a beta or like a proprietary, not a proprietary, just like leaving it as like a beta feature inside of 1.0 is probably what's going to happen until I can sit down and spend the time to like really dig into chat. And there's also like.

I've got a second request now for this. Vercell with their AISDK, which is like a heavy inspiration for Prism, they've released their own streaming chat protocol. And I've had a couple of requests to adopt that streaming chat protocol so that like you could use a Prism backend to fulfill

a Versel AISDK UI. So like you could build the UI with Versel stuff, but you could use Prism as your backend inside of a layer of

Chris Gmyr (35:55)
interesting.

TJ Miller (35:55)
Because they have chat UI components to build your own chat interfaces and everything. So like.

I think that would be something really cool to support as well. I've got some affordances to be able to do that, but it's like, gotta go read the spec, I gotta go learn it. It feels pretty heady too, so I don't know. It's just things like that I've gotta consider and make sure I have affordances for.

don't want to like the rest of prism at this point feels relatively stable. So I want to get 1.0 out there and like I definitely want to hit 1.0 before Laircon. I just don't know if I can get all the streaming stuff like figured out by then. So

Chris Gmyr (36:36)
Yeah,

yeah, totally. Well, you did mention before that you were using like a open web UI or something like that for local chats and just rebuilding that locally and trying out streaming their application.

TJ Miller (36:50)
Yeah, so

a core contributor, very significant contributor to Prism, Pushback, he has created a Laravel starter kit that is a chat UI that uses Prism behind the scenes. And that's very cool. And so I want to go deep dive that some and just kind of do that. But I think I learned so much by like

feeling the pain of building that firsthand that I really want to like, I want to build it to like.

I want to build it to get that firsthand experience. like, I've got a, Claude and I put together a very like vapor wavy chat UI. the UI I think is fine.

it's just a matter of getting all the features and everything together for it in a way that makes it easy to build these kind of things. another piece to streaming that I've been feeling really challenged about is there are some really cool things I think I could do with streaming in Laravel's Event Stream Response Type. The problem is that

not in Laravel 11 and right now Prism supports Laravel 11 and Laravel 12. And so I really want to like do some cool stuff with like streaming in their responses, but like I'd have to drop Laravel 11 support. Which early on I got, I think early on I only supported, maybe I only supported 12.

when I first released Prism. And someone was like, yeah, can we use 11? And at the time it was like, yeah, let's support 11. And then someone came in and was like, yeah, let's support a PHP version lower than what I initially supported too. And that was fine, so I could do that. But like.

I feel like I want to be in a position where I can support like current version of Laravel and like one version behind. So like when we get to like 13, I'll drop 11 and like support 12 and 13. You know, I kind of, want to be able to support this overlap between the versions for now. That way, like as people are upgrading, like you have, you have time to upgrade where like we support both, but

I also don't want to be in a position where I can't do things because I'm...

supporting like an older version to like that

Chris Gmyr (39:14)
It's really janky if you have, you know, five versions backwards and then can't do a lot of the niceties of the newer versioned framework and also PHP and any underlying technology.

TJ Miller (39:28)
Yeah,

so like using the event stream response type, right? So I guess like getting a little bit in the weeds and we'll wrap up soon. Getting a little in the weeds.

When you use Prism in streaming mode, we return a generator, which ultimately yields out different chunk types. So you have a chunk for text chunk, which could be a part of a word or a whole word or something like that. And then we have meta and usage information. We also emit tool call and tool result.

chunk types. So when a tool is invoked, we'll yield a chunk that's like, hey, a tool is being called. And here's the information about that tool being called. And then when the tool result comes back in, we yield out another chunk that's like, here's the result of that tool. And so you can display that in your chat interface. That's kind of the goal for that stuff. So you can be like, yeah, here's the tool call. So you can display this visibility in the chat window.

and know that this stuff is happening behind the scenes. So with Laravel's stream response type, you can just like...

also yield out this textual information and everything. But using the event stream response type, which I think is an even stronger use case, that you can yield text, but you can also yield this event stream value object that gets picked up on the front end through the affordances that they've also built for consuming event streams.

And so I'd love to be able to just like yield the chunk and like basically I build the chunks to extend this event stream value object. like you could just yield the chunk, like make it super easy. And the reason why you want to do this is like you want the event stream value object to be the same type as the chunk type so that you can differentiate them.

on the front end, because there are different events. Like a tool call is a different event than a new message with text inside of it. And so you want to be able to return these specific event stream value object. I think that's streamed event. So it's like these streamed event value objects. want to return, you want to yield custom versions of these things to be able to listen to these independent events on the front end.

And so I want to make it like really clean where it's like, yeah, just yield the chunk and like, we've taken care of all of the rest of it. Um, but I need to drop level 11 support in order to be able to do that. And like, I really don't want to do that. Like I want to be like, I want to be a driving force to like get people to upgrade and be like, Oh, you're using prism while we only support 12 you better, better get your.

You're better, Laravel, shift your app. Like, let's go. So I want to be, I want to be like a proponent of like keeping yourself up to date. But at the same time, I want to like make sure that there's a wide enough range of people that can like use Prism, you know? So.

Chris Gmyr (42:27)
Yeah,

I'm trying to do that. Conditionally too, because like you could probably have different code paths if you're on Laravel 12 versus 11 and using those new events or not. If you're on 11, but that gets really janky and kind of limits you on what you can do for like future refactorings and it just gets really messy. So.

TJ Miller (42:49)
That's

what I kind of thought about doing was like in the like.

in the event stream where we're in our generator basically looking to see, is this object defined, streamed event value object? If it's defined, then yield these other types instead. Kind of having this adapter layer for this. yeah, that feels kind of janky.

Chris Gmyr (43:15)
Yeah, I wouldn't recommend.

TJ Miller (43:18)
No,

it feels kind of janky, but at the same time, I really want to make life super easy. like I may, I may, I may allow the jank in order to like provide the affordance. don't know.

Chris Gmyr (43:30)
Yeah, well as long as you have plans for when 13 comes out to actually go in and drop all that stuff for 11 and get rid of it.

TJ Miller (43:39)
And that's what I think I'm doing with PHP versions too, is I'll support the latest two and then I'll support the latest two of Laravel and just like, I think it's kind of how I'll define my support policy and just kind of have to like second up and live with that. But that offers a lot of affordance for folks to be able to be like using Prism and still upgrading their applications and like giving people time.

Chris Gmyr (44:02)
Yeah, totally. I think that's a good plan.

TJ Miller (44:04)
Sick dude. Well, I think we can probably wrap it up there.

Chris Gmyr (44:07)
Yeah, let's wrap it up. So thanks for listening to the Slightly Caffeinated podcast. All show notes and links, social channels are down below and also available at slightlycaffeinated.fm. Thank you for listening and we'll catch you all next week.

TJ Miller (44:21)
Thank you.

Creators and Guests

Chris Gmyr
Host
Chris Gmyr
Husband, dad, & grilling aficionado. Loves Laravel & coffee. Staff Engineer @ Rula | TrianglePHP Co-Organizer
TJ Miller
Host
TJ Miller
Dreamer ⋅ ADHD advocate ⋅ Laravel astronaut ⋅ Building Prism ⋅ Principal at Geocodio ⋅ Thoughts are mine!
Bad Cold Brew, Laracon Talk Prep, and Prism Developments
Broadcast by