Ollama4j
A Java library (wrapper/binding) for Ollama server.
Loading...
Searching...
No Matches
ModelDetail.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 java.util.Map;
16import lombok.Data;
17
18@Data
19@JsonIgnoreProperties(ignoreUnknown = true)
20public class ModelDetail {
21 private String license;
22
23 @JsonProperty("modelfile")
24 private String modelFile;
25
26 private String parameters;
27 private String template;
28 private String system;
29 private ModelMeta details;
30 private String[] capabilities;
31
37 @JsonProperty("model_info")
38 private Map<String, Object> modelInfo;
39
40 @Override
41 public String toString() {
42 try {
43 return Utils.getObjectMapper()
44 .writerWithDefaultPrettyPrinter()
45 .writeValueAsString(this);
46 } catch (JsonProcessingException e) {
47 throw new RuntimeException(e);
48 }
49 }
50}
static ObjectMapper getObjectMapper()
Definition Utils.java:32