Class InMemoryEmbeddingStoreFactory

java.lang.Object
io.micronaut.langchain4j.embedding.InMemoryEmbeddingStoreFactory

@Factory public class InMemoryEmbeddingStoreFactory extends Object
Factory for in-memory stores.
  • Constructor Details

    • InMemoryEmbeddingStoreFactory

      public InMemoryEmbeddingStoreFactory(io.micronaut.context.env.Environment environment)
      Default constructor.
      Parameters:
      environment - The environment.
  • Method Details

    • primaryStore

      @Requires(missingBeans=dev.langchain4j.store.embedding.EmbeddingStore.class) @Singleton protected <T> dev.langchain4j.store.embedding.EmbeddingStore<T> primaryStore()
      The primary store.
      Type Parameters:
      T - The store type
      Returns:
      The primary store
    • embeddingStore

      @EachBean(InMemoryEmbeddingStoreConfig.class) protected <T> dev.langchain4j.store.embedding.EmbeddingStore<T> embeddingStore(InMemoryEmbeddingStoreConfig config)
      Named stores.
      Type Parameters:
      T - The store generic type
      Parameters:
      config - The configuration
      Returns:
      The store