Repository files navigation Demo Application for Spring AI
When using OpenAI, setup your API key with this environment variable: OPENAI_API_KEY
The OpenAI cost for running this project with the default model should be a few cents at most.
See application.properties for more details
Calls to the ChatClient (simple call, parameters, entities)
Use an Image as Input and ask questions about the image
Retrieval Augmented Generation with Excel and PDF files
Retrieval Augmented Generation with a PDF file that contains mixed text and images content
Using an in-memory Vector Database
usage of Tools (agents / functions) with mock tool
usage of Tools (agents / functions) with a real tool calling an API
usage of MCP to read file names from the file system
Install Ollama and run it locally
Inside application.properties , configure the model that you are running inside Ollama (default is spring.ai.ollama.chat.model=llama3.2)
Inside pom.xml , change the dependency spring-ai-openai-spring-boot-starter into spring-ai-ollama-spring-boot-starter
Run all the tests (some will not be working as some of the features are not supported by local models)
You can’t perform that action at this time.