From 6f2ab8e0391b2b53c6737fa9fab9ce2b31fcda80 Mon Sep 17 00:00:00 2001 From: Martin Evans Date: Tue, 22 Aug 2023 00:32:36 +0100 Subject: [PATCH] Not asserting the answer, just that it didn't change --- LLama.Unittest/StatelessExecutorTest.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/LLama.Unittest/StatelessExecutorTest.cs b/LLama.Unittest/StatelessExecutorTest.cs index 1c69a4e6..b9f89cd6 100644 --- a/LLama.Unittest/StatelessExecutorTest.cs +++ b/LLama.Unittest/StatelessExecutorTest.cs @@ -30,15 +30,12 @@ namespace LLama.Unittest var executor = new StatelessExecutor(_weights.CreateContext(_params, Encoding.UTF8)); const string question = "Question. what is a cat?\nAnswer: "; - const string expected = " a domestic or wild animal that is typically small to medium-sized, has fur, four legs, and sharp retractable claws."; var @params = new InferenceParams { MaxTokens = 32, AntiPrompts = new[] { "." } }; var result1 = string.Join("", executor.Infer(question, @params)); - Assert.Equal(expected, result1); - var result2 = string.Join("", executor.Infer(question, @params)); - Assert.Equal(expected, result2); + // Check that it produced the exact same result both times Assert.Equal(result1, result2); }