Ollama4j
A Java library (wrapper/binding) for Ollama server.
Loading...
Searching...
No Matches
ModelMeta.java
Go to the documentation of this file.
1/*
2 * Ollama4j - Java library for interacting with Ollama server.
3 * Copyright (c) 2025 Amith Koujalgi and contributors.
4 *
5 * Licensed under the MIT License (the "License");
6 * you may not use this file except in compliance with the License.
7 *
8*/
9package io.github.ollama4j.models.response;
10
11import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
12import com.fasterxml.jackson.annotation.JsonProperty;
13import com.fasterxml.jackson.core.JsonProcessingException;
14import io.github.ollama4j.utils.Utils;
15import lombok.Data;
16
17@Data
18@JsonIgnoreProperties(ignoreUnknown = true)
19public class ModelMeta {
20 @JsonProperty("format")
21 private String format;
22
23 @JsonProperty("family")
24 private String family;
25
26 @JsonProperty("families")
27 private String[] families;
28
29 @JsonProperty("parameter_size")
30 private String parameterSize;
31
32 @JsonProperty("quantization_level")
33 private String quantizationLevel;
34
35 @Override
36 public String toString() {
37 try {
38 return Utils.getObjectMapper()
39 .writerWithDefaultPrettyPrinter()
40 .writeValueAsString(this);
41 } catch (JsonProcessingException e) {
42 throw new RuntimeException(e);
43 }
44 }
45}
static ObjectMapper getObjectMapper()
Definition Utils.java:32