Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 2.46 KB

README.md

File metadata and controls

37 lines (24 loc) · 2.46 KB

Demo Application for Spring AI

Setup

  • 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

usage of ChatMemory

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 Callback Functions

Using a local model

  • 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)