Gentle introduction to Spring AI.
./mvnw spring-boot:runAll chat examples are packaged in chat package, e.g.
- SimpleChatController
- PromptChatController
- RoleController
- MultiModalController
SimpleChatController demonstrates a simple ChatClient API that connects to your LLM model.
http localhost:8080/chat/simplehttp 'localhost:8080/chat/simple?query=tell-me-a-joke'PromptChatController demonstrates simple prompt templating.
http 'localhost:8080/chat/joke'http 'localhost:8080/chat/joke?topic=ai'http 'localhost:8080/chat/joke?lang=swedish'RoleController demonstrates use of user and system prompts.
http localhost:8080/chat/fruithttp localhost:8080/chat/veggieMultiModalController demonstrates usage of Multimodality API and how it can simultaneously
understand and process from various sources, including text, images, audio, video, etc.
This will work on OpenAI, but not on Ollama llama3.2 model as it is a text-based AI.
http localhost:8080/chat/explainLoadController processes JSON objects and stores their embeddings in a vector store.
http localhost:8080/raffle/load/jsonRaffleController leverages the data in the vector store and answers questions about the stored data.
http localhost:8080/raffle/chathttp 'localhost:8080/raffle/chat?question=list all positive feedback'http 'localhost:8080/raffle/chat?question=list all negative feedback'