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
On this page of the site you can watch the video online Spring Boot Application with ChatGPT API using LangChain4J with a duration of hours minute second in good quality, which was uploaded by the user Java Master 25 March 2024, share the link with friends and acquaintances, this video has already been watched 1,166 times on youtube and it was liked by 36 viewers. Enjoy your viewing!