io.quarkiverse.langchain4j.chroma.runtime.ChromaRecorder Maven / Gradle / Ivy
package io.quarkiverse.langchain4j.chroma.runtime;
import java.time.Duration;
import java.util.function.Supplier;
import io.quarkiverse.langchain4j.chroma.ChromaEmbeddingStore;
import io.quarkus.runtime.annotations.Recorder;
@Recorder
public class ChromaRecorder {
public Supplier chromaStoreSupplier(ChromaConfig config) {
return new Supplier<>() {
@Override
public ChromaEmbeddingStore get() {
return new ChromaEmbeddingStore(config.url(),
config.collectionName(),
config.timeout().orElse(Duration.ofSeconds(5)),
config.logRequests().orElse(false),
config.logResponses().orElse(false));
}
};
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy