Book description
Ready to build applications using generative AI? This practical book outlines the process necessary to design and build production grade AI services with a FastAPI web server that communicate seamlessly with databases, payment systems, and external APIs. You'll learn how to develop autonomous generative AI agents that stream outputs in real-time and interact with other models. Web developers, data scientists, and DevOps engineers will learn to implement end-to-end production-ready services that leverage generative AI.
You'll learn design patterns to manage software complexity, implement FastAPI lifespan for AI model integration, handle long-running generative tasks, perform content filtering, cache outputs, implement retrieval augmented generation (RAG) with a vector database, implement usage/cost monitoring and tracking, protect services with your own authentication and authorization mechanisms, and effectively control stream outputs directly from GenAI models. You'll explore efficient testing methods for AI outputs, validation against databases, and deployment patterns using Docker for robust microservices in the cloud.
- Build generative services that interact with databases, external APIs, and more
- Learn how to load AI models into a FastAPI lifecycle memory
- Monitor and log model requests and responses within services
- Use authentication and authorization patterns hooked with generative models
- Handle and cache long-running inference tasks
- Stream model outputs via streaming events and WebSockets into browsers or files
- Automate the retraining process of generative models by exposing event-driven endpoints
Ali Parandeh is a Chartered Engineer with the UK Engineering Council and a Microsoft and Google certified developer, data engineer, and data scientist.
Publisher resources
Table of contents
- Brief Table of Contents (Not Yet Final)
- 1. Introduction
- 2. Getting Started with FastAPI
- 3. AI Integration and Model Serving
- 4. Implementing Type Safe AI Services
- 5. Achieving Concurrency in AI Workloads
- About the Author
Product information
- Title: Building Generative AI Services with FastAPI
- Author(s):
- Release date: March 2025
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781098160302
You might also like
book
Building Machine Learning Pipelines
Companies are spending billions on machine learning projects, but it’s money wasted if the models can’t …
book
Building Python Microservices with FastAPI
Discover the secrets of building Python microservices using the FastAPI framework Key Features Provides a reference …
book
Generative AI on Google Cloud
Learn a comprehensive approach to building and deploying generative AI and large language models on Google …
book
Hands-On APIs for AI and Data Science
To succeed in AI and data science, you must first master APIs. API skills are essential …