Skip to content

michaelisvy/demo-spring-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published