PHP AND LLMs
PHP AND LLMs
Practical Integrations using Laravel
About the Book
This book is a practical guide for PHP developers navigating the rapidly evolving landscape of Large Language Models (LLMs). Moving beyond the hype, it delves into real-world applications and solutions, providing step-by-step instructions on how to integrate LLMs into your existing projects.
From mastering prompts to building reusable tools and working with various LLMs, this book equips you with the skills needed to leverage the power of Ai in everyday development tasks.
Whether you’re looking to automate complex workflows, enhance content verification, or simply stay ahead in a changing industry, this book offers the insights and hands-on examples to get you there. This isn’t just another “Hello World” guide—it’s a deep dive into the future of PHP development, focusing on real solutions that drive real results.
Sample book here https://bit.ly/php_llms_sample
See all the code at https://github.com/alnutile/php-llms
Table of Contents
- [COMPLETE] Introduction - Embracing the Reality of LLMs in Development
- Code Examples
- [COMPLETE] Why Use LLMs
- What You’ll Learn
- Big Picture View
- It is your pair coding colleague
- It is there to do the grunt work for you
- It is there to help you try new ways to solve problems for your customers and yourself.
- It Can Empower Your Users
- Why Not LLMs?
- Wrapping it up
- What You’ve Learned
- [COMPLETE] Local LLMs: Streamlining Your Development Workflow
- Big Picture
- What You Will Learn
- Setting up your local Computer
- Ollama
- HTTP Client with Tests
- Using the Chat Method
- Update Client for Chat
- Real Use Case - News Summary
- What You Learned
- [COMPLETED] Building the LLM Agnostic Driver
- Summary of What You Will Learn
- Summary of What You Will Learn
- Step One: The Facade
- Step Two: Mock Client and Data Objects
- Step Three: OllamaClient
- Step Four: Claude, Groq, OpenAI
- Extra Features
- What You’ve Learned
- Links
- [COMPLETE] Prompting Overview
- What You’ll Learn
- Big Picture View
- The term “Prompt Engineering” is not as stupid as I first thought!
- Keep it simple
- System Prompt
- First Shot vs Multi-Shot
- Tools
- Place Holders
- Putting it all together
- What You’ve Learned
- Links
- [COMPLETE] Parsing Opt-Out Text
- Summary of What You Will Learn
- The Goal
- What You Have Learned
- Tools Overview Enhancing LLM Capabilities
- [COMPLETE] - Web Scraping and Building an Events Database
- Summary of What You Will Learn
- Big Picture View
- Orchestration
- Deep Dive
- What You’ve Learned
- Making Tools LLM-Agnostic
- Chaining Tools
- Web Searches with LLMs
- Marketing Assistant
- Hand Written Notes to Task List
- RAG and Vector
- SiteMap - Feed to RAG
- Agents to Evaluate the Results
- Standards Checking Tool
- Final Thoughts
- Resources
- Deeplearning.ai
- HuggingFace
- Troubleshooting Tips and Tricks
- Saving JSON Messages and Payload
- Terminology
- API (Application Programming Interface)
- Batch Jobs
- Chat
- CI (Continuous Integration)
- Completion
- Context Window
- Data Transfer Object (DTO)
- Embedding
- Facade Pattern
- Fine-tuning
- First-Shot Prompting
- Fixture
- GIS (Geographic Information System)
- Hallucination
- HTTP Facade
- HTTP Pooling
- Inference
- LangChain
- Laravel
- LLM (Large Language Model)
- LLM Agnostic Driver
- LLM Router
- Machine Learning
- Mixture of Agents
- Mock
- Mock Driver
- Multi-shot Prompting
- Multi-shot Strategy
- NativePHP
- Ollama
- Placeholder
- Process Facade
- Prompt
- Prompt Engineering
- RAG (Retrieval-Augmented Generation)
- Real-Time Facades
- System Prompt
- Sentiment Analysis
- Task Scheduling
- Temperature
- Templatizer
- TLDR
- Token
- Tool (in LLM context)
- [COMPLETE] Introduction - Embracing the Reality of LLMs in Development
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them