diff --git a/chroma/deployment/src/main/java/io/quarkiverse/langchain4j/chroma/deployment/ChromaProcessor.java b/chroma/deployment/src/main/java/io/quarkiverse/langchain4j/chroma/deployment/ChromaProcessor.java index 25859cbbc..990f106d0 100644 --- a/chroma/deployment/src/main/java/io/quarkiverse/langchain4j/chroma/deployment/ChromaProcessor.java +++ b/chroma/deployment/src/main/java/io/quarkiverse/langchain4j/chroma/deployment/ChromaProcessor.java @@ -2,8 +2,11 @@ import jakarta.enterprise.context.ApplicationScoped; +import org.jboss.jandex.ClassType; import org.jboss.jandex.DotName; +import org.jboss.jandex.ParameterizedType; +import dev.langchain4j.data.segment.TextSegment; import dev.langchain4j.store.embedding.EmbeddingStore; import io.quarkiverse.langchain4j.chroma.ChromaEmbeddingStore; import io.quarkiverse.langchain4j.chroma.runtime.ChromaConfig; @@ -34,7 +37,8 @@ public void createBean( ChromaConfig config) { beanProducer.produce(SyntheticBeanBuildItem .configure(CHROMA_EMBEDDING_STORE) - .types(EmbeddingStore.class) + .types(ClassType.create(EmbeddingStore.class), + ParameterizedType.create(EmbeddingStore.class, ClassType.create(TextSegment.class))) .defaultBean() .setRuntimeInit() .defaultBean() diff --git a/redis/deployment/src/main/java/io/quarkiverse/langchain4j/redis/RedisEmbeddingStoreProcessor.java b/redis/deployment/src/main/java/io/quarkiverse/langchain4j/redis/RedisEmbeddingStoreProcessor.java index e2a6c8aa6..71ae3bc24 100644 --- a/redis/deployment/src/main/java/io/quarkiverse/langchain4j/redis/RedisEmbeddingStoreProcessor.java +++ b/redis/deployment/src/main/java/io/quarkiverse/langchain4j/redis/RedisEmbeddingStoreProcessor.java @@ -4,7 +4,9 @@ import org.jboss.jandex.ClassType; import org.jboss.jandex.DotName; +import org.jboss.jandex.ParameterizedType; +import dev.langchain4j.data.segment.TextSegment; import dev.langchain4j.store.embedding.EmbeddingStore; import io.quarkiverse.langchain4j.redis.runtime.RedisEmbeddingStoreConfig; import io.quarkiverse.langchain4j.redis.runtime.RedisEmbeddingStoreRecorder; @@ -42,7 +44,8 @@ public void createBean( RedisEmbeddingStoreConfig config) { beanProducer.produce(SyntheticBeanBuildItem .configure(REDIS_EMBEDDING_STORE) - .types(EmbeddingStore.class) + .types(ClassType.create(EmbeddingStore.class), + ParameterizedType.create(EmbeddingStore.class, ClassType.create(TextSegment.class))) .setRuntimeInit() .defaultBean() .scope(ApplicationScoped.class)