diff options
Diffstat (limited to 'vespajlib/src/main/java/ai/vespa/llm/test/MockLanguageModel.java')
-rw-r--r-- | vespajlib/src/main/java/ai/vespa/llm/test/MockLanguageModel.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vespajlib/src/main/java/ai/vespa/llm/test/MockLanguageModel.java b/vespajlib/src/main/java/ai/vespa/llm/test/MockLanguageModel.java index d47f43c55b2..db1b42fbbac 100644 --- a/vespajlib/src/main/java/ai/vespa/llm/test/MockLanguageModel.java +++ b/vespajlib/src/main/java/ai/vespa/llm/test/MockLanguageModel.java @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package ai.vespa.llm.test; import ai.vespa.llm.LanguageModel; @@ -7,6 +7,8 @@ import ai.vespa.llm.completion.Prompt; import com.yahoo.api.annotations.Beta; import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Consumer; import java.util.function.Function; /** @@ -26,6 +28,11 @@ public class MockLanguageModel implements LanguageModel { return completer.apply(prompt); } + @Override + public CompletableFuture<Completion.FinishReason> completeAsync(Prompt prompt, Consumer<Completion> action) { + throw new RuntimeException("Not implemented"); + } + public static class Builder { private Function<Prompt, List<Completion>> completer = prompt -> List.of(Completion.from("")); |