Enum ContextBehavior
- All Implemented Interfaces:
Serializable, Comparable<ContextBehavior>, java.lang.constant.Constable
Defines how the output of an
AIToolMethod should be treated within
the conversation context.
This allows for declarative, intelligent context management, ensuring that the model always has the most relevant and up-to-date information without unnecessary bloat.
- Author:
- Anahata
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe result is ephemeral and does not represent a lasting state.The result represents a stateful resource (like a file's content) that should replace any previous version of the same resource in the context. -
Method Summary
Modifier and TypeMethodDescriptionstatic ContextBehaviorReturns the enum constant of this type with the specified name.static ContextBehavior[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
EPHEMERAL
The result is ephemeral and does not represent a lasting state.It is useful for one-off actions or queries (e.g., running a shell command). The system automatically prunes these results after 5 user turns to keep the context clean.
-
STATEFUL_REPLACE
The result represents a stateful resource (like a file's content) that should replace any previous version of the same resource in the context.The system uses this to maintain an "Active Workspace" view, ensuring only the latest version of a resource is considered and automatically pruning older versions.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
