Interface CodeBasedOptions
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CodeBasedOptions.Jsii$Proxy
@Generated(value="jsii-pacmak/1.130.0 (build 048a5ee)",
date="2026-05-20T12:39:41.734Z")
@Stability(Stable)
public interface CodeBasedOptions
extends software.amazon.jsii.JsiiSerializable
Options for configuring a code-based custom evaluator using a Lambda function.
Uses a Lambda function to implement custom evaluation logic.
Example:
IFunction evalFunction;
Evaluator codeEvaluator = Evaluator.Builder.create(this, "CodeEvaluator")
.evaluatorName("custom_code_evaluator")
.level(EvaluationLevel.TOOL_CALL)
.description("Evaluates tool call accuracy using custom logic")
.evaluatorConfig(EvaluatorConfig.codeBased(CodeBasedOptions.builder()
.lambdaFunction(evalFunction)
.timeout(Duration.seconds(30))
.build()))
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCodeBasedOptionsstatic final classAn implementation forCodeBasedOptions -
Method Summary
Modifier and TypeMethodDescriptionstatic CodeBasedOptions.Builderbuilder()The Lambda function used for evaluation.default DurationThe timeout for the Lambda function invocation during evaluation.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getLambdaFunction
The Lambda function used for evaluation.The function will be granted invoke permissions for the
bedrock-agentcore.amazonaws.com.rproxy.goskope.comservice principal, scoped to this specific evaluator resource. -
getTimeout
The timeout for the Lambda function invocation during evaluation.When not specified, the AgentCore evaluation service uses its default timeout for Lambda-based evaluators.
Default: - The AgentCore evaluation service's default Lambda timeout is used
- See Also:
-
builder
- Returns:
- a
CodeBasedOptions.BuilderofCodeBasedOptions
-