- updated Java version to 11.

- replaced Apache HTTP client code with `Java.net.http.HttpClient`
This commit is contained in:
Amith Koujalgi
2023-11-13 11:32:53 +05:30
parent d2f405dc64
commit 7da4a7ffd4
12 changed files with 269 additions and 309 deletions

View File

@@ -3,11 +3,11 @@ package io.github.amithkoujalgi.ollama4j;
import io.github.amithkoujalgi.ollama4j.core.OllamaAPI;
import io.github.amithkoujalgi.ollama4j.core.exceptions.OllamaBaseException;
import io.github.amithkoujalgi.ollama4j.core.types.OllamaModelType;
import org.apache.hc.core5.http.ParseException;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import java.io.IOException;
import java.net.URISyntaxException;
import static org.mockito.Mockito.*;
@@ -20,7 +20,7 @@ public class TestMockedAPIs {
doNothing().when(ollamaAPI).pullModel(model);
ollamaAPI.pullModel(model);
verify(ollamaAPI, times(1)).pullModel(model);
} catch (IOException | ParseException | OllamaBaseException e) {
} catch (IOException | OllamaBaseException | InterruptedException | URISyntaxException e) {
throw new RuntimeException(e);
}
}

View File

@@ -9,7 +9,7 @@
<root level="info">
<appender-ref ref="STDOUT"/>
</root>
<logger name="org.apache" level="WARN"/>
<logger name="httpclient" level="WARN"/>
</configuration>