### Run Spring Boot Application with Maven Source: https://spring.io/projects/spring-ai/index This command shows how to run a Spring Boot application using the Maven wrapper. This is a common way to execute Spring Boot applications during development. ```bash ./mvnw spring-boot:run ``` -------------------------------- ### Initialize ChatClient and Call AI Model in Spring Boot Source: https://spring.io/projects/spring-ai/index This Java snippet demonstrates how to set up a CommandLineRunner in a Spring Boot application to build a ChatClient and make a simple prompt to an AI model. It then prints the content of the AI's response. ```java @Bean public CommandLineRunner runner(ChatClient.Builder builder) { return args -> { ChatClient chatClient = builder.build(); String response = chatClient.prompt("Tell me a joke").call().content(); System.out.println(response); }; } ``` -------------------------------- ### Configure OpenAI API Key in Spring Boot Source: https://spring.io/projects/spring-ai/index This snippet shows how to configure your OpenAI API key in the application.properties file for a Spring Boot application using Spring AI. Ensure you replace the placeholder with your actual API key. ```properties spring.ai.openai.api-key= ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.