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

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

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

public class EmbeddingRequest {

    private final String model;
    private final String prompt;

    private EmbeddingRequest(Builder builder) {
        model = builder.model;
        prompt = builder.prompt;
    }

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

    public String getModel() {
        return model;
    }

    public String getPrompt() {
        return prompt;
    }

    public static final class Builder {
        private String model = "llama2";
        private String prompt;

        private Builder() {
        }

        public Builder model(String val) {
            model = val;
            return this;
        }

        public Builder prompt(String val) {
            prompt = val;
            return this;
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy