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

io.quarkiverse.langchain4j.ollama.EmbeddingResponse Maven / Gradle / Ivy

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

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;

@JsonDeserialize(builder = EmbeddingResponse.Builder.class)
public class EmbeddingResponse {

    private float[] embedding;

    private EmbeddingResponse(Builder builder) {
        embedding = builder.embedding;
    }

    public float[] getEmbedding() {
        return embedding;
    }

    public void setEmbedding(float[] embedding) {
        this.embedding = embedding;
    }

    @JsonPOJOBuilder(withPrefix = "")
    public static final class Builder {
        private float[] embedding;

        private Builder() {
        }

        public Builder embedding(float[] val) {
            embedding = val;
            return this;
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy