+
Skip to content

anjandebnath/SpringAIBoT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goal: With Spring AI and OpenAI, build a simple chatbot api and explore other Spring AI provided supports.

Pre Requisite

After cloning the project, make sure you have

  1. JDK 24
  2. Maven latest version
  3. VScode or IntelliJ installed
  4. OpenAPI api-key that has token enabled [paid version]

Start the application

run this command: mvn spring-boot:run

Stop the aplication

runn CTRL+C

promt to the chat bot

    @GetMapping("/chat")
        public String chat(){

            return chatClient.prompt()
            .user("Tell me an interesting fact about java")
            .call()
            .content();

        }   

Reply from the ChatBot client

LangChain4J

About

With Spring AI tools and OpenAI create a chatbot API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载