Package com.tnsai.annotations
Enum Class Knowledge.Use
- All Implemented Interfaces:
Serializable,Comparable<Knowledge.Use>,Constable
- Enclosing class:
Knowledge
How a source's content reaches the model.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe whole source enters the context.Ranked retrieval per request, configured byKnowledge.search().One unit per request, in order: each call contributes the source's next unit. -
Method Summary
Modifier and TypeMethodDescriptionstatic Knowledge.UseReturns the enum constant of this class with the specified name.static Knowledge.Use[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
SEARCH
Ranked retrieval per request, configured byKnowledge.search(). The default whenuseis unset. -
DIRECT
The whole source enters the context. Its estimated size, summed over the DIRECT sources in scope, must fitKnowledge.maxTokens()— or, when that is unset, a quarter of the model's input window. A source that does not fit fails; it never falls back toSEARCH. -
SEQUENTIAL
One unit per request, in order: each call contributes the source's next unit.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-