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

io.quarkiverse.langchain4j.chroma.runtime.AddEmbeddingsRequest Maven / Gradle / Ivy

There is a newer version: 0.21.0
Show newest version
package io.quarkiverse.langchain4j.chroma.runtime;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import io.quarkus.runtime.annotations.RegisterForReflection;

@RegisterForReflection
public class AddEmbeddingsRequest {

    private final List ids;
    private final List embeddings;
    private final List documents;
    private final List> metadatas;

    public AddEmbeddingsRequest(Builder builder) {
        this.ids = builder.ids;
        this.embeddings = builder.embeddings;
        this.documents = builder.documents;
        this.metadatas = builder.metadatas;
    }

    public List getIds() {
        return ids;
    }

    public List getEmbeddings() {
        return embeddings;
    }

    public List getDocuments() {
        return documents;
    }

    public List> getMetadatas() {
        return metadatas;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {

        private List ids = new ArrayList<>();
        private List embeddings = new ArrayList<>();
        private List documents = new ArrayList<>();
        private List> metadatas = new ArrayList<>();

        public Builder ids(List ids) {
            if (ids != null) {
                this.ids = ids;
            }
            return this;
        }

        public Builder embeddings(List embeddings) {
            if (embeddings != null) {
                this.embeddings = embeddings;
            }
            return this;
        }

        public Builder documents(List documents) {
            if (documents != null) {
                this.documents = documents;
            }
            return this;
        }

        public Builder metadatas(List> metadatas) {
            if (metadatas != null) {
                this.metadatas = metadatas;
            }
            return this;
        }

        public AddEmbeddingsRequest build() {
            return new AddEmbeddingsRequest(this);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy