Spring Boot Application with ChatGPT API using LangChain4J

Published: 25 March 2024
on channel: Java Master
1,166
36

In this tutorial, we build our first ChatBot using Spring Boot, OpenAI API (ChatPGT), and LangChain4j.
We take a look at how to specify custom system messages to ChatGPT. We explore how to create chat history using LanChain4j. And also try to receive complex Java objects as a response from OpenAI API response.

Link to the source code: https://github.com/caligula95/spring-...

00:00 - Intro
00:25 - Generate empty Spring Boot Project
01:10 - Get familiar with LangChain4J
01:57 - OpenAI API
03:40 - Add dependencies for LangChain4J
04:50 - Create Controller and Service Layer
08:05 - Implement LangChain4J model completion functionality
13:30 - Add SystemMessage and UserMessage
17:50 - Implement Chat Memory
32:20 - Consume generated answer as Java Object
39:55 - Specify custom Descriptions and Restrictions


Watch video Spring Boot Application with ChatGPT API using LangChain4J online without registration, duration hours minute second in high quality. This video was added by user Java Master 25 March 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,166 once and liked it 36 people.