Skip to content

marcushellberg/spring-ai-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring AI demo with a Vaadin UI

This is a minimal example of using Vaadin to create a UI for Spring AI.

Check out the streaming branch for a version that uses the OpenAI streaming API.

Requirements

  • OpenAI API key saved as an environment variable OPENAI_API_KEY
  • Java 21 (or beyond), e.g., by SDKman (sdk u java 21.0.2-tem)

Running the app

Run the project using ./mvnw spring-boot:run and open http://localhost:8080 in your browser.

You can also create a GraalVM native image using ./mvnw package -Pnative -Pproduction native:compile and run the resulting native image. Note that you must use a Graal JDK in this case (sdk u java 21.0.2-graal).