Building Generative AI Services with Fastapi: A Practical Approach to Developing Context-Rich Generative AI Applications
暫譯: 使用 FastAPI 建立生成式 AI 服務:開發具上下文豐富的生成式 AI 應用程式的實用方法

Parandeh, Alireza

  • 出版商: O'Reilly
  • 出版日期: 2025-05-20
  • 售價: $2,490
  • 貴賓價: 9.5$2,366
  • 語言: 英文
  • 頁數: 528
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1098160304
  • ISBN-13: 9781098160302
  • 相關分類: 人工智慧
  • 海外代購書籍(需單獨結帳)

商品描述

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.

商品描述(中文翻譯)

準備好使用生成式 AI 建立應用程式了嗎?這本實用的書籍概述了設計和構建生產級 AI 服務所需的過程,使用 FastAPI 網頁伺服器與資料庫、支付系統和外部 API 無縫通信。您將學習如何開發自主的生成式 AI 代理,實時串流輸出並與其他模型互動。網頁開發人員、數據科學家和 DevOps 工程師將學會實現端到端的生產就緒服務,利用生成式 AI。

您將學習設計模式以管理軟體複雜性,實現 FastAPI 生命週期以整合 AI 模型,處理長時間運行的生成任務,執行內容過濾、快取輸出,使用向量資料庫實現檢索增強生成 (RAG),實施使用/成本監控和追蹤,使用您自己的身份驗證和授權機制保護服務,並有效地直接控制來自 GenAI 模型的串流輸出。您將探索 AI 輸出的高效測試方法,對資料庫進行驗證,以及使用 Docker 部署模式以在雲端構建穩健的微服務。

- 建立與資料庫、外部 API 等互動的生成服務
- 學習如何將 AI 模型載入 FastAPI 生命週期記憶體
- 監控和記錄服務中的模型請求和回應
- 使用與生成模型連接的身份驗證和授權模式
- 處理和快取長時間運行的推理任務
- 通過串流事件和 WebSockets 將模型輸出串流到瀏覽器或檔案
- 通過暴露事件驅動的端點自動化生成模型的再訓練過程

Ali Parandeh 是英國工程委員會的特許工程師,並且是微軟和谷歌認證的開發人員、數據工程師和數據科學家。