Ollama4j
A Java library (wrapper/binding) for Ollama server.
Loading...
Searching...
No Matches
CustomModelFileContentsRequest.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
*/
9
package
io.github.ollama4j.models.request;
10
11
import
static
io.github.ollama4j.utils.Utils.getObjectMapper;
12
13
import
com.fasterxml.jackson.core.JsonProcessingException;
14
import
lombok.AllArgsConstructor;
15
import
lombok.Data;
16
17
@SuppressWarnings(
"SpellCheckingInspection"
)
18
@Data
19
@AllArgsConstructor
20
public
class
CustomModelFileContentsRequest
{
21
private
String name;
22
private
String modelfile;
23
24
@Override
25
public
String
toString
() {
26
try
{
27
return
getObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(
this
);
28
}
catch
(JsonProcessingException e) {
29
throw
new
RuntimeException(e);
30
}
31
}
32
}
io.github.ollama4j.models.request.CustomModelFileContentsRequest
Definition
CustomModelFileContentsRequest.java:20
io.github.ollama4j.models.request.CustomModelFileContentsRequest.toString
String toString()
Definition
CustomModelFileContentsRequest.java:25
src
main
java
io
github
ollama4j
models
request
CustomModelFileContentsRequest.java
Generated by
1.12.0