Ollama4j
A Java library (wrapper/binding) for Ollama server.
Loading...
Searching...
No Matches
ModelRequest.java
Go to the documentation of this file.
1package io.github.ollama4j.models.request;
2
3import static io.github.ollama4j.utils.Utils.getObjectMapper;
4
5import com.fasterxml.jackson.core.JsonProcessingException;
6import lombok.AllArgsConstructor;
7import lombok.Data;
8
9@Data
10@AllArgsConstructor
11public class ModelRequest {
12 private String name;
13
14 @Override
15 public String toString() {
16 try {
17 return getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(this);
18 } catch (JsonProcessingException e) {
19 throw new RuntimeException(e);
20 }
21 }
22}