mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-05-15 03:47:13 +02:00
Removes unneccessary override of OllamaRequestBody method
This commit is contained in:
parent
5c5cdba4cd
commit
273b1e47ca
@ -1,14 +1,11 @@
|
||||
package io.github.amithkoujalgi.ollama4j.core.models.chat;
|
||||
|
||||
import java.net.http.HttpRequest;
|
||||
import java.net.http.HttpRequest.BodyPublisher;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
||||
import io.github.amithkoujalgi.ollama4j.core.utils.OllamaRequestBody;
|
||||
import io.github.amithkoujalgi.ollama4j.core.utils.Options;
|
||||
import io.github.amithkoujalgi.ollama4j.core.utils.Utils;
|
||||
|
||||
import static io.github.amithkoujalgi.ollama4j.core.utils.Utils.getObjectMapper;
|
||||
|
||||
@ -48,14 +45,4 @@ public class OllamaChatRequestModel implements OllamaRequestBody{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BodyPublisher getBodyPublisher() {
|
||||
try {
|
||||
return HttpRequest.BodyPublishers.ofString(
|
||||
Utils.getObjectMapper().writeValueAsString(this));
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new IllegalArgumentException("Request not Body convertible.",e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user