https://github.com/redis-developer/spring-ai-redis-demo
https://github.com/redis-developer/spring-ai-redis-demo
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/redis-developer/spring-ai-redis-demo
- Owner: redis-developer
- Created: 2024-02-06T21:50:25.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-12T20:19:25.000Z (almost 2 years ago)
- Last Synced: 2025-05-08T21:43:49.521Z (10 months ago)
- Language: JavaScript
- Size: 27.8 MB
- Stars: 16
- Watchers: 4
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= Spring AI Redis Demo
:linkattrs:
:project-owner: redis-developer
:project-name: spring-ai-redis-demo
:project-group: com.redis
:project-version: 0.0.1-SNAPSHOT
:project-title: Spring AI Redis Demo
---
A Retrieval Augmented Generation demo using link:https://docs.spring.io/spring-ai/reference/[Spring AI] and link:https://redis.io/docs/interact/search-and-query/advanced-concepts/vectors/[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 https://portal.azure.com[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.
[source,console]
----
export SPRING_AI_AZURE_OPENAI_API_KEY=
export SPRING_AI_AZURE_OPENAI_ENDPOINT=
export SPRING_AI_AZURE_OPENAI_CHAT_OPTIONS_MODEL=
----
== Run the demo
[source,console]
----
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 link:http://localhost:8080[localhost:8080] and ask a question around beers:
image:src/docs/asciidoc/spring-ai-redis-screenshot.png[]