Hands-on Spring AI

Hands-on Spring AI

Fu Cheng
This is a sample of the book's content.Buy on Leanpub

Table of Contents

Spring AI Basics›

  • Getting Started
    • Prerequisites
    • Spring Boot Application
    • Use Model Service
    • Consolidate Local and Production Environment
    • Summary
  • Chat Completion
    • Model
    • ChatModel
    • Create Prompts
    • Chat Response
    • ChatClient
    • Use Custom Chat Options
    • Prompt Template
    • Advisor
  • Streaming Chat Completion
    • StreamingChatModel
    • Streaming Web Application
    • Streaming JSON Events
  • Structured Output Converter
    • StructuredOutputConverter
    • ListOutputConverter
    • MapOutputConverter
    • BeanOutputConverter
    • Use ChatClient
  • Multimodal Input
    • Media
    • Image Understanding

Retrieval-Augmented Generation›

  • RAG Introduction
    • Reduce Hallucinations
    • Naive RAG
  • Embedding Model
    • EmbeddingModel
    • EmbeddingOptions
    • BatchingStrategy
    • Use EmbeddingModel
  • Documents
    • Create Documents
    • Document Reader
    • Document Transformer
    • Document Writer
  • Vector Store
    • VectorStore
    • Create VectorStore
    • Add Documents
    • Delete Documents
    • Similarity Search
    • VectorStore REST API
    • SimpleVectorStore
    • Pgvector
    • Vector Store Cloud Services
  • RAG
    • Simple RAG
  • Modular RAG
    • Query
    • Pre-Retrieval
    • Retrieval
    • Post-Retrieval
    • Generation
    • RetrievalAugmentationAdvisor
  • RAG Examples
    • Text-to-SQL
    • PDF Q&A

MCP›

  • MCP Introduction
  • Quick Start
    • Java Development Basics
    • Sample MCP Server
    • stdio Server
    • HTTP SSE Server
    • MCP Client
    • Spring Integration
    • Spring AI Integration
  • MCP Server
    • Shared Models
    • ServerExchange
    • Prompt Templates
    • Resources
    • Tools
    • Completions
    • Logging
    • Pagination
  • MCP Client
    • Roots
    • Sampling
  • MCP Annotations
    • Server Annotations
    • Client Annotations
    • Special Parameters
  • MCP Examples
    • File System MCP Server

Agent›

  • Agent Introduction
    • Cooking Suggestion Agent
  • Agent Components
    • Profile
    • Persona
    • Tools
    • Knowledge and memory
    • Reasoning and evaluation
    • Planning and feedback
  • Agentic Patterns
    • Task Execution
    • Evaluator-Optimizer
    • Parallelization Workflow
    • Routing Workflow
    • Chain Workflow
    • Agent as Tool
    • Tool as Agent
    • Orchestrator-Workers Workflow
  • Agent Development
    • Persona
    • Knowledge
    • Tools
    • Reasoning
    • Task

AI Application Infrastructure›

    Source Code and Materials›

      Hands-on Spring AI/MCP/MCP Server

      MCP Server

      https://leanpub.com/spring-ai

      Shared Models

      https://leanpub.com/spring-ai

      ServerExchange

      https://leanpub.com/spring-ai

      Prompt Templates

      https://leanpub.com/spring-ai

      Resources

      https://leanpub.com/spring-ai

      Resource

      https://leanpub.com/spring-ai

      Resource Template

      https://leanpub.com/spring-ai

      Client Methods

      https://leanpub.com/spring-ai

      Usage

      https://leanpub.com/spring-ai

      Tools

      https://leanpub.com/spring-ai

      Completions

      https://leanpub.com/spring-ai

      Logging

      https://leanpub.com/spring-ai

      Pagination

      https://leanpub.com/spring-ai

      Up next

      MCP Client

      In this chapter

      • MCP Server
      • Shared Models
      • ServerExchange
      • Prompt Templates
      • Resources
      • Tools
      • Completions
      • Logging
      • Pagination