Redis
Maven Dependency
You can use Redis with LangChain4j in plain Java or Spring Boot applications.
Plain Java
note
Since 1.0.0-beta1
, langchain4j-redis
has migrated to langchain4j-community
and is renamed to
langchain4j-community-redis
.
Before 1.0.0-beta1
:
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-redis</artifactId>
<version>${previous version here}</version>
</dependency>
1.0.0-beta1
and later:
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-community-redis</artifactId>
<version>${latest version here}</version>
</dependency>
Spring Boot
note
Since 1.0.0-beta1
, langchain4j-redis-spring-boot-starter
has migrated to langchain4j-community
and is renamed
to langchain4j-community-redis-spring-boot-starter
.
Before 1.0.0-beta1
:
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-redis-spring-boot-starter</artifactId>
<version>${previous version here}</version>
</dependency>
1.0.0-beta1
and later:
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-community-redis-spring-boot-starter</artifactId>
<version>${latest version here}</version>
</dependency>
Or, you can use BOM to manage dependencies consistently:
<dependencyManagement>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-community-bom</artifactId>
<version>${latest version here}</version>
<typ>pom</typ>
<scope>import</scope>
</dependency>
</dependencyManagement>
APIs
RedisEmbeddingStore