jwmcpeak wrote a comment+100 XP
2w ago
@khaled-sayed Yes, a typical Laravel app is a monolith. It's a single codebase that has views, controllers, services, queues, etc. It's one big codebase that is deployed all together.
Microservices is about breaking the server into multiple independent and smaller services. For example: a user service to just manage users, a service for billing, and yet another service just for reporting. They're developed individually (and sometimes in different languages) and deployed separately.
jwmcpeak liked a comment+100 XP
2w ago
jwmcpeak liked a comment+100 XP
2w ago
Should be this one https://github.com/laracasts/Building-AI-Powered-Features-with-Laravel-AI
jwmcpeak wrote a comment+100 XP
2w ago
@xmaop @sebastiangperez Oh wow. Thanks, y'all. I'll look and see what happened there.
jwmcpeak wrote a comment+100 XP
2w ago
@ctrlaltdelme With Navigate, Livewire's JavaScript handles the click event before the browser can send the request to the server. So, the server still receives the request, but it was sent via fetch() as opposed to typical browser navigation.
As for security: it's still Laravel. Routes are still protected with the auth middleware.
jwmcpeak liked a comment+100 XP
2w ago
jwmcpeak wrote a comment+100 XP
2w ago
jwmcpeak liked a comment+100 XP
2w ago
Perhaps it'd be worth completing the messages() method in the agent in the previous video otherwise this one won't work
Something along these lines
public function messages(): iterable
{
return TicketMessage::where('ticket_id', $this->ticketId)
->get()
->map(function (TicketMessage $message) {
$role = is_null($message->user_id)
? Laravel\Ai\Messages\MessageRole::Assistant
: Laravel\Ai\Messages\MessageRole::User;
return new Laravel\Ai\Messages\Message($role, $message->body);
})->toArray();
}
jwmcpeak liked a comment+100 XP
2w ago
Hello Jeremy, Just some quick feedback. I gotta say, I love this "vanilla" way of simply writing code to pass on ideas and concepts. Without interference from auto completion tools while listening to and watching you in action, this makes so much easier to assimilate it all.
While you probably should've extracted functionalities to services and used Livewire, It is just as nice to watch it being built like that 😄 thanks so much for this great series!
jwmcpeak liked a comment+100 XP
2w ago
If anyone ends up getting 400 errors form OpenAi on tool calls: https://github.com/laravel/ai/issues/313
jwmcpeak wrote a comment+100 XP
3w ago
@Antimated That is the carbon theme.
jwmcpeak wrote a comment+100 XP
3w ago
@Antimated Yep! I forgot to mention backticks here, but we use them later in the series.
jwmcpeak wrote a comment+100 XP
3w ago
@connor1231 It's separation of concerns. The benefit of emitting an event is that the game doesn't have to worry about, or know how to, display a message.
jwmcpeak liked a comment+100 XP
3w ago
jwmcpeak liked a comment+100 XP
3w ago
jwmcpeak liked a comment+100 XP
3w ago
jwmcpeak liked a comment+100 XP
5mos ago
jwmcpeak liked a comment+100 XP
5mos ago
@jwmcpeak I wrote a post on database views a couple of years ago, and I think some of your viewers might benefit from it.
https://tray2.se/posts/use-a-view-instead-of-a-complex-eloquent-query-in-your-laravel-application