1package io.github.ollama4j.models.response;
3import static io.github.ollama4j.utils.Utils.getObjectMapper;
5import com.fasterxml.jackson.core.JsonProcessingException;
11@SuppressWarnings(
"unused")
20 private final String response;
28 private int httpStatusCode;
36 private long responseTime = 0;
38 public OllamaResult(String response,
long responseTime,
int httpStatusCode) {
39 this.response = response;
40 this.responseTime = responseTime;
41 this.httpStatusCode = httpStatusCode;
47 return getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(
this);
48 }
catch (JsonProcessingException e) {
49 throw new RuntimeException(e);
OllamaResult(String response, long responseTime, int httpStatusCode)