blob: 30a139745e42f4fa48d91933ba3886ef6666cf4c (
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
38
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
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;
}
}
|