mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-05-15 03:47:13 +02:00
Added surefire and failsafe plugins
This commit is contained in:
parent
f6af7025a8
commit
b2d76970dc
3
Makefile
3
Makefile
@ -3,3 +3,6 @@ ut:
|
||||
|
||||
it:
|
||||
mvn clean verify -Pintegration-tests
|
||||
|
||||
build:
|
||||
mvn clean test install -Punit-tests
|
21
README.md
21
README.md
@ -37,6 +37,7 @@ A Java library (wrapper/binding) for [Ollama](https://github.com/jmorganca/ollam
|
||||
- [Installation](#installation)
|
||||
- [Demo APIs](#try-out-the-apis)
|
||||
- [API Spec](#api-spec)
|
||||
- [Development](#development)
|
||||
- [Contributions](#get-involved)
|
||||
|
||||
#### Requirements
|
||||
@ -340,6 +341,26 @@ public class Main {
|
||||
|
||||
Find the full `Javadoc` (API specifications) [here](https://amithkoujalgi.github.io/ollama4j/).
|
||||
|
||||
#### Development
|
||||
|
||||
Build:
|
||||
|
||||
```shell
|
||||
make ut
|
||||
```
|
||||
|
||||
Run unit tests:
|
||||
|
||||
```shell
|
||||
make ut
|
||||
```
|
||||
|
||||
Run integration tests:
|
||||
|
||||
```shell
|
||||
make it
|
||||
```
|
||||
|
||||
#### Areas of improvement
|
||||
|
||||
- [x] Use Java-naming conventions for attributes in the request/response models instead of the snake-case conventions. (
|
||||
|
3
pom.xml
3
pom.xml
@ -127,6 +127,7 @@
|
||||
<excludes>
|
||||
<exclude>**/unittests/*.java</exclude>
|
||||
</excludes>
|
||||
<skipTests>${skipIntegrationTests}</skipTests>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
@ -189,6 +190,7 @@
|
||||
<properties>
|
||||
<test.env>unit</test.env>
|
||||
<skipUnitTests>false</skipUnitTests>
|
||||
<skipIntegrationTests>true</skipIntegrationTests>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
@ -196,6 +198,7 @@
|
||||
<properties>
|
||||
<test.env>integration</test.env>
|
||||
<skipUnitTests>true</skipUnitTests>
|
||||
<skipIntegrationTests>false</skipIntegrationTests>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
@ -101,7 +101,7 @@ public class TestRealAPIs {
|
||||
String model = OllamaModelType.LLAMA2;
|
||||
String prompt = "some prompt text";
|
||||
try {
|
||||
when(ollamaAPI.ask(model, prompt)).thenReturn(new OllamaResult("", 0));
|
||||
when(ollamaAPI.ask(model, prompt)).thenReturn(new OllamaResult("", 0,200));
|
||||
ollamaAPI.ask(model, prompt);
|
||||
verify(ollamaAPI, times(1)).ask(model, prompt);
|
||||
} catch (IOException | OllamaBaseException | InterruptedException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user