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

dev.langchain4j.model.ollama.Parameters Maven / Gradle / Ivy

There is a newer version: 0.36.0
Show newest version
package dev.langchain4j.model.ollama;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;

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

import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;

@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(NON_NULL)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
class Parameters {

    private String type;
    private Map> properties;
    private List required;

    Parameters() {
    }

    Parameters(String type, Map> properties, List required) {
        this.type = type;
        this.properties = properties;
        this.required = required;
    }

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

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Map> getProperties() {
        return properties;
    }

    public void setProperties(Map> properties) {
        this.properties = properties;
    }

    public List getRequired() {
        return required;
    }

    public void setRequired(List required) {
        this.required = required;
    }

    static class Builder {

        private String type = "object";
        private Map> properties;
        private List required;

        Builder type(String type) {
            this.type = type;
            return this;
        }

        Builder properties(Map> properties) {
            this.properties = properties;
            return this;
        }

        Builder required(List required) {
            this.required = required;
            return this;
        }

        Parameters build() {
            return new Parameters(type, properties, required);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy