Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcushellberg/spring-ai-web
https://github.com/marcushellberg/spring-ai-web
Last synced: 30 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/marcushellberg/spring-ai-web
- Owner: marcushellberg
- Created: 2024-02-20T23:36:39.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-02T21:08:42.000Z (8 months ago)
- Last Synced: 2024-10-05T08:20:28.302Z (about 1 month ago)
- Language: JavaScript
- Size: 240 KB
- Stars: 38
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://github.com/marcushellberg/spring-ai-web/tree/streaming) 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](https://sdkman.io) (`sdk u java 21.0.2-tem`)## Running the app
Run the project using `./mvnw spring-boot:run` and open [http://localhost:8080](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`).