aboutsummaryrefslogtreecommitdiffstats
path: root/model-integration/src/main/java/ai/vespa/llm/generation/GeneratorOptions.java
blob: 79b466e5a7414b4db1af8e73045d74d72ff53b74 (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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package ai.vespa.llm.generation;

import com.yahoo.api.annotations.Beta;

@Beta
public class GeneratorOptions {

    public enum SearchMethod {
        GREEDY,
        CONTRASTIVE,
        BEAM,
        SAMPLE,
    }

    private SearchMethod searchMethod = SearchMethod.GREEDY;
    private int maxLength = 20;

    public SearchMethod getSearchMethod() {
        return searchMethod;
    }

    public GeneratorOptions setSearchMethod(SearchMethod searchMethod) {
        this.searchMethod = searchMethod;
        return this;
    }

    public int getMaxLength() {
        return maxLength;
    }

    public GeneratorOptions setMaxLength(int maxLength) {
        this.maxLength = maxLength;
        return this;
    }


}