Ollama4j
A Java library (wrapper/binding) for Ollama server.
Loading...
Searching...
No Matches
CustomModelFilePathRequest.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
12 private String name;
13 private String path;
14
15 @Override
16 public String toString() {
17 try {
18 return getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(this);
19 } catch (JsonProcessingException e) {
20 throw new RuntimeException(e);
21 }
22 }
23}