feature
fun <Input, Output, TContext : AIAgentContext, TFeature : Any> AIAgentRunSession<Input, Output, TContext>.feature(featureClass: KClass<TFeature>, feature: AIAgentFeature<*, TFeature>): TFeature?(source)
Retrieves a feature from the AIAgentRunSession.pipeline associated with this session using the specified key.
Return
The feature associated with the provided key, or null if no matching feature is found.
Parameters
TFeature
A feature implementation type.
feature
A feature to fetch.
featureClass
The KClass of the feature to be retrieved.
Throws
if the specified featureClass does not correspond to a registered feature.
inline fun <Input, Output, TContext : AIAgentContext, TFeature : Any> AIAgentRunSession<Input, Output, TContext>.feature(feature: AIAgentFeature<*, TFeature>): TFeature?(source)
Retrieves a feature from the AIAgentRunSession.pipeline associated with this session using the specified key.
Return
The feature associated with the provided key, or null if no matching feature is found.
Parameters
feature
A feature to fetch.
Throws
if the specified feature does not correspond to a registered feature.