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 lombok.Data;
16
17@Data
18@JsonIgnoreProperties(ignoreUnknown = true)
19public class ModelDetail {
20 private String license;
21
22 @JsonProperty("modelfile")
23 private String modelFile;
24
25 private String parameters;
26 private String template;
27 private String system;
28 private ModelMeta details;
29
30 @Override
31 public String toString() {
32 try {
33 return Utils.getObjectMapper()
34 .writerWithDefaultPrettyPrinter()
35 .writeValueAsString(this);
36 } catch (JsonProcessingException e) {
37 throw new RuntimeException(e);
38 }
39 }
40}
static ObjectMapper getObjectMapper()
Definition Utils.java:32