جعبه ابزار هوش مصنوعی همهچیز تمام
The Batteries-Included AI Toolkit
The Laravel AI SDK is a first-party toolkit for adding AI features to your applications. Using a helpdesk app as our playground, you’ll learn structured output, chat with memory, streaming, tool use, retrieval, and everything else you need to build AI features that are reliable, testable, and ready for production.
This is an incredibly powerful toolkit, and I can't wait to show you what you can build. Let's get going!
قسمتهای دوره
خروجی ساختاریافته به عنوان پایه
19m 53sBuild a ticket triage flow using structured output: extract priority, department, sentiment, tags, and summary from ticket text, then apply it.
ثبت استفاده از هوش مصنوعی
10m 37sAdd real visibility to AI calls in Laravel: build AiRun and AiUsage, log requests and token usage, and debug triage flows with confidence.
معماری مکالمه و مدیریت زمینه
16m 48sBuild ticket-scoped AI chat in Laravel: add conversation IDs, create TicketAssistant, and manage context via TicketChatController.
نمایش عامل چت ما
7m 51sAdd an Alpine chat panel to a ticket page, call your Laravel controller via fetch, handle CSRF, and prep the loop for streaming.
پخش پاسخهای هوش مصنوعی به رابط کاربری
19m 30sStream AI chat replies in real time with Laravel and Alpine: add output_text, build a streaming endpoint, and render chunks as they arrive.
دادن توانایی استفاده از ابزارها به هوش مصنوعی
14m 19sStop AI guessing by adding safe tools in Laravel—generate Artisan tool classes, enforce schemas/auth, and set max_steps for real ticket data.
تولید افزایشیافته بازیابی با دیتابیس شما
14m 17sAdd retrieval-augmented generation to your app: create embeddings, store vectors in SQLite JSON, and rank documents with cosine similarity.
بازیابی از فایلها و منابع خارجی
19m 46sScale Laravel AI Q&A: upload files, store embeddings in provider vector stores, and ask questions with FileSearch using clean endpoints.
طراحی برای قابلیت اطمینان و شکست
15m 9sBuild reliable AI features with provider failover, smart timeouts, and queue fallback—create a product description agent that runs sync or async.
کنترل هزینه قبل از اینکه شما را کنترل کند
13m 51sControl AI token costs in Laravel: correlate runs and usage via invocation_id, auto-log with events, and enforce a daily budget middleware.
لایههای ایمنی و نردههای محافظ
13m 48sAdd trusted safety layers: wire Input/OutputSafetyMiddleware, screen prompts, filter responses, and lock WebSearch to approved domains.
تست ویژگیهای هوش مصنوعی بدون ضربه به API
11m 33sTest AI features fast and safely—fake providers, keep tests local and deterministic, and fail fast with preventStrayPrompts guards.
نمایش ویژگیهای هوش مصنوعی خود با MCP
12m 49sExpose Laravel AI features safely with MCP: install Laravel MCP, publish a triageTicket tool, and verify responses with the inspector.




