Skip to content

redis-developer/spring-ai-redis-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring AI Redis Demo


A Retrieval Augmented Generation demo using Spring AI and Redis Vector Search.

Pre-requisites

Docker

This demo requires Docker to build and run the application.

Azure OpenAI

Obtain your Azure OpenAI endpoint (e.g. https://demo-us-west.openai.azure.com/) and api-key from the Azure OpenAI Service section on Azure Portal.

The Spring AI project defines a configuration property named spring.ai.azure.openai.api-key that you should set to the value of the API Key obtained from Azure.

If your model deployment name is not the default gpt-35-turbo you can specify it using the configuration property named spring.ai.azure.openai.chat.options.model.

Exporting an environment variable is one way to set these configuration properties.

export SPRING_AI_AZURE_OPENAI_API_KEY=<INSERT KEY HERE>
export SPRING_AI_AZURE_OPENAI_ENDPOINT=<INSERT ENDPOINT URL HERE>
export SPRING_AI_AZURE_OPENAI_CHAT_OPTIONS_MODEL=<INSERT MODEL NAME HERE>

Run the demo

git clone https://github.com/{project-owner}/{project-name}.git
cd {project-name}
docker compose up

Once the Spring application is running (com…​..Application: Started Application in …​), point your browser to localhost:8080 and ask a question around beers:

spring ai redis screenshot