9package io.github.ollama4j.models.chat;
11import static io.github.ollama4j.utils.Utils.getObjectMapper;
13import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
14import com.fasterxml.jackson.annotation.JsonProperty;
15import com.fasterxml.jackson.core.JsonProcessingException;
16import com.fasterxml.jackson.databind.annotation.JsonSerialize;
17import io.github.ollama4j.utils.FileToBase64Serializer;
28@SuppressWarnings(
"NullableProblems")
31@RequiredArgsConstructor
33@JsonIgnoreProperties(ignoreUnknown =
true)
38 @JsonProperty(
"content")
40 private String response;
42 private String thinking;
44 private @JsonProperty(
"tool_calls") List<OllamaChatToolCalls> toolCalls;
47 private List<byte[]> images;
52 return getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(
this);
53 }
catch (JsonProcessingException e) {
54 throw new RuntimeException(e);