@@ -57,10 +57,14 @@ class OllamaClientIntegrationTest {
57
57
user(" What is the capital of France?" )
58
58
}
59
59
60
- val response = executor.execute(prompt = prompt, model = model)
60
+ val firstResponse = executor.execute(prompt = prompt, model = model)
61
61
62
- assertTrue(response.content.isNotEmpty(), " Response should not be empty" )
63
- assertEquals(" The capital of France is Paris." , response.content)
62
+ assertTrue(firstResponse.content.isNotEmpty(), " Response should not be empty" )
63
+ assertTrue(firstResponse.content.contains(" Paris" ), " Response should contain 'Paris'" )
64
+
65
+ val secondResponse = executor.execute(prompt = prompt, model = model)
66
+
67
+ assertEquals(firstResponse.content, secondResponse.content)
64
68
}
65
69
66
70
@Test
@@ -268,7 +272,10 @@ class OllamaClientIntegrationTest {
268
272
269
273
@Serializable
270
274
enum class CalculatorOperation {
271
- ADD , SUBTRACT , MULTIPLY , DIVIDE
275
+ ADD ,
276
+ SUBTRACT ,
277
+ MULTIPLY ,
278
+ DIVIDE
272
279
}
273
280
274
281
@Test
@@ -459,7 +466,7 @@ class OllamaClientIntegrationTest {
459
466
val name : String ,
460
467
val capital : String ,
461
468
val population : String ,
462
- val language : String
469
+ val language : String ,
463
470
)
464
471
465
472
fun markdownCountryDefinition (): String {
@@ -501,7 +508,7 @@ class OllamaClientIntegrationTest {
501
508
class MarkdownParser (
502
509
private val headerHandler : ((String ) -> Unit )? ,
503
510
private val bulletHandler : ((String ) -> Unit )? ,
504
- private val finishHandler : (() -> Unit )?
511
+ private val finishHandler : (() -> Unit )? ,
505
512
) {
506
513
suspend fun parseStream (stream : Flow <String >) {
507
514
val buffer = kotlin.text.StringBuilder ()
0 commit comments