跳到主要内容

Oracle Coherence

https://coherence.community/

Maven 依赖

<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-coherence</artifactId>
<version>1.0.0-beta3</version>
</dependency>

langchain4j-coherence 模块将 Coherence 作为提供的依赖项,因为它适用于各种 Coherence 版本。 开发人员应该包含相关的 Coherence 依赖项,可以是社区版或商业版。 Coherence CE 的 groupId 是 com.oracle.coherence.ce,商业版的 groupId 是 com.oracle.coherence

例如,要使用社区版 (CE),请将 Coherence BOM 添加到依赖管理部分,然后添加 Coherence 作为依赖项。然后可以根据需要向项目添加其他 Coherence 模块。

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.oracle.coherence.ce</groupId>
<artifactId>coherence-bom</artifactId>
<version>24.09</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-coherence</artifactId>
<version>1.0.0-beta3</version>
</dependency>
<dependency>
<groupId>com.oracle.coherence.ce</groupId>
<artifactId>coherence</artifactId>
</dependency>
</dependencies>

API

  • CoherenceEmbeddingStore
  • CoherenceChatMemoryStore

示例