mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-11-02 17:40:41 +01:00
Removes unneccessary override of OllamaRequestBody method
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user