All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkiverse.langchain4j.qdrant.runtime.QdrantRecorder Maven / Gradle / Ivy

There is a newer version: 0.23.0.CR2
Show newest version
package io.quarkiverse.langchain4j.qdrant.runtime;

import java.util.function.Supplier;

import dev.langchain4j.store.embedding.qdrant.QdrantEmbeddingStore;
import io.quarkus.runtime.annotations.Recorder;

@Recorder
public class QdrantRecorder {

    public Supplier qdrantStoreSupplier(QdrantRuntimeConfig config) {
        return new Supplier<>() {
            @Override
            public QdrantEmbeddingStore get() {
                return new QdrantEmbeddingStore.Builder()
                        .host(config.host())
                        .port(config.port())
                        .apiKey(config.apiKey().orElse(null))
                        .collectionName(config.collection().name())
                        .useTls(config.useTls())
                        .payloadTextKey(config.payloadTextKey())
                        .build();
            }
        };
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy