Spring AI
Published by O'Reilly Media, Inc.
Combining the OpenAI API with Java and the Spring Framework
Course outcomes
- Connect to LLM tools like ChatGPT message chains, prompt templates, and output parsers using Spring AI
- Take advantage of Spring's dependency injection, HTTP interfaces, and JSON parsing to prepare requests and parse responses
- Employ the new Spring AI project's data loaders, vector data, and embeddings to ask questions about your own data
Course description
Join expert Ken Kousen to explore the Spring AI project, a groundbreaking framework designed to seamlessly integrate artificial intelligence capabilities into Java-based systems. You'll gain hands-on experience configuring Spring AI projects, making RESTful calls to AI models, parsing JSON responses, and much more. You'll also learn how to optimize your Spring AI code and deploy AI-integrated applications. By the end of this course, you'll be equipped to solve complex problems by incorporating AI functionalities into your Java-based systems.
What you’ll learn and how you can apply it
- Configure Spring AI projects
- Implement RESTful calls
- Parse JSON responses
- Create message chains
- Utilize prompt templates
- Apply output parsers
- Load and query vector databases
- Optimize Spring AI code
- Debug Spring AI applications
This live event is for you because...
- You're a backend Java developer who’s looking to integrate AI capabilities into Java-based systems.
- You're a technical lead or manager who oversees development teams, project management, and technology strategy, and you want to know the capabilities and limitations of integrating AI into Java-based systems.
Prerequisites
- A solid understanding of Java programming
- Familiarity with the Spring Framework (especially Spring Boot)
- A basic understanding of RESTful APIs, HTTP methods, and client-server interaction
- Familiarity with JSON data format (helpful but not necessary)
Recommended preparation:
- A developer account for the OpenAI API (optional, but necessary to participate in exercises)
- Acquire a rudimentary understanding of AI and machine learning concepts (optional)
- Take Spring in 3 Weeks (live online course with Ken Kousen)
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Introduction and setup (30 minutes)
- Presentation: Introduction to Spring AI; Java 17+ features
- Group discussion: Why Spring AI is important for Java developers
- Q&A
Spring AI basics (40 minutes)
- Presentation: Setting up a Spring AI project with Java 17+
- Hands-on exercise: Initialize a Spring AI project using Java 17+ features
- Q&A
- Break
Networking and RESTful calls (30 minutes)
- Presentation: Making RESTful calls with Spring AI and Java 17+
- Hands-on exercise: Make a RESTful call to a sample AI model using Java 17+ text blocks
- Q&A
JSON parsing and Java 17+ (45 minutes)
- Presentation: Parsing JSON responses with Jackson API and Java 17+
- Hands-on exercise: Parse a JSON response using Java 17+ records
- Q&A
- Break
Message chains and prompt templates (30 minutes)
- Presentation: Introduction to message chains and prompt templates in Spring AI
- Hands-on exercise: Create a message chain and prompt template using Java 17+ sealed interfaces
- Q&A
Output parsers and data loaders (45 minutes)
- Presentation: Working with output parsers and data loaders in Spring AI
- Hands-on exercise: Write an output parser and use a data loader, leveraging Java 17+ features
- Q&A
- Break
Wrap-up and Q&A (20 minutes)
Your Instructor
Ken Kousen
Ken Kousen is the author of the Kotlin Cookbook (O'Reilly), Modern Java Recipes (O'Reilly), Gradle Recipes for Android (O’Reilly), and Making Java Groovy (Manning), as well as O’Reilly video courses in Android, Groovy, Gradle, advanced Java, and Spring. A JavaOne Rock Star, he’s a regular speaker on the No Fluff Just Stuff conference tour and has spoken at conferences all over the world. Through his company, Kousen I.T., Inc., he’s taught software development training courses to thousands of students.