blob: d5d0247d6b00227351ebb9d3019d9e188ae2aab0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.llm.completion;
import com.yahoo.api.annotations.Beta;
/**
* A prompt that can be given to a large language model to generate a completion.
*
* @author bratseth
*/
@Beta
public abstract class Prompt {
public abstract String asString();
/** Returns a new prompt with the text of the given completion appended. */
public Prompt append(Completion completion) {
return append(completion.text());
}
public abstract Prompt append(String text);
}
|