mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-05-15 11:57:12 +02:00
Fixes OllamaAPI after Renaming
This commit is contained in:
parent
0bec697a86
commit
4260fbbc32
@ -10,8 +10,8 @@ import io.github.amithkoujalgi.ollama4j.core.models.request.CustomModelFileConte
|
|||||||
import io.github.amithkoujalgi.ollama4j.core.models.request.CustomModelFilePathRequest;
|
import io.github.amithkoujalgi.ollama4j.core.models.request.CustomModelFilePathRequest;
|
||||||
import io.github.amithkoujalgi.ollama4j.core.models.request.ModelEmbeddingsRequest;
|
import io.github.amithkoujalgi.ollama4j.core.models.request.ModelEmbeddingsRequest;
|
||||||
import io.github.amithkoujalgi.ollama4j.core.models.request.ModelRequest;
|
import io.github.amithkoujalgi.ollama4j.core.models.request.ModelRequest;
|
||||||
import io.github.amithkoujalgi.ollama4j.core.models.request.OllamaChatRequestCaller;
|
import io.github.amithkoujalgi.ollama4j.core.models.request.OllamaChatEndpointCaller;
|
||||||
import io.github.amithkoujalgi.ollama4j.core.models.request.OllamaGenerateRequestCaller;
|
import io.github.amithkoujalgi.ollama4j.core.models.request.OllamaGenerateEndpointCaller;
|
||||||
import io.github.amithkoujalgi.ollama4j.core.utils.Options;
|
import io.github.amithkoujalgi.ollama4j.core.utils.Options;
|
||||||
import io.github.amithkoujalgi.ollama4j.core.utils.Utils;
|
import io.github.amithkoujalgi.ollama4j.core.utils.Utils;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
@ -450,7 +450,7 @@ public class OllamaAPI {
|
|||||||
* @throws InterruptedException in case the server is not reachable or network issues happen
|
* @throws InterruptedException in case the server is not reachable or network issues happen
|
||||||
*/
|
*/
|
||||||
public OllamaChatResult chat(OllamaChatRequestModel request) throws OllamaBaseException, IOException, InterruptedException{
|
public OllamaChatResult chat(OllamaChatRequestModel request) throws OllamaBaseException, IOException, InterruptedException{
|
||||||
OllamaChatRequestCaller requestCaller = new OllamaChatRequestCaller(host, basicAuth, requestTimeoutSeconds, verbose);
|
OllamaChatEndpointCaller requestCaller = new OllamaChatEndpointCaller(host, basicAuth, requestTimeoutSeconds, verbose);
|
||||||
//TODO: implement async way
|
//TODO: implement async way
|
||||||
if(request.isStream()){
|
if(request.isStream()){
|
||||||
throw new UnsupportedOperationException("Streamed chat responses are not implemented yet");
|
throw new UnsupportedOperationException("Streamed chat responses are not implemented yet");
|
||||||
@ -485,7 +485,7 @@ public class OllamaAPI {
|
|||||||
|
|
||||||
private OllamaResult generateSyncForOllamaRequestModel(OllamaRequestModel ollamaRequestModel)
|
private OllamaResult generateSyncForOllamaRequestModel(OllamaRequestModel ollamaRequestModel)
|
||||||
throws OllamaBaseException, IOException, InterruptedException {
|
throws OllamaBaseException, IOException, InterruptedException {
|
||||||
OllamaGenerateRequestCaller requestCaller = new OllamaGenerateRequestCaller(host, basicAuth, requestTimeoutSeconds, verbose);
|
OllamaGenerateEndpointCaller requestCaller = new OllamaGenerateEndpointCaller(host, basicAuth, requestTimeoutSeconds, verbose);
|
||||||
return requestCaller.generateSync(ollamaRequestModel);
|
return requestCaller.generateSync(ollamaRequestModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@ -19,6 +20,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
public class OllamaChatMessage {
|
public class OllamaChatMessage {
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
|
Loading…
x
Reference in New Issue
Block a user