Ollama4j
A Java library (wrapper/binding) for Ollama server.
Loading...
Searching...
No Matches
ModelMeta.java
Go to the documentation of this file.
1package io.github.ollama4j.models.response;
2
3import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4import com.fasterxml.jackson.annotation.JsonProperty;
5import com.fasterxml.jackson.core.JsonProcessingException;
6import io.github.ollama4j.utils.Utils;
7import lombok.Data;
8
9@Data
10@JsonIgnoreProperties(ignoreUnknown = true)
11public class ModelMeta {
12 @JsonProperty("format")
13 private String format;
14
15 @JsonProperty("family")
16 private String family;
17
18 @JsonProperty("families")
19 private String[] families;
20
21 @JsonProperty("parameter_size")
22 private String parameterSize;
23
24 @JsonProperty("quantization_level")
25 private String quantizationLevel;
26
27 @Override
28 public String toString() {
29 try {
30 return Utils.getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(this);
31 } catch (JsonProcessingException e) {
32 throw new RuntimeException(e);
33 }
34 }
35}
static ObjectMapper getObjectMapper()
Definition Utils.java:17