Skip to content

Commit cc3d1b6

Browse files
breaking change
1 parent 4cede98 commit cc3d1b6

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

examples/event_handler_bedrock_agents/cdk/bedrock_agent_stack.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
)
44
from aws_cdk.aws_lambda import Runtime
55
from aws_cdk.aws_lambda_python_alpha import PythonFunction
6-
from cdklabs.generative_ai_cdk_constructs.bedrock import Agent, AgentActionGroup, ApiSchema, BedrockFoundationModel
6+
from cdklabs.generative_ai_cdk_constructs.bedrock import (
7+
ActionGroupExecutor,
8+
Agent,
9+
AgentActionGroup,
10+
ApiSchema,
11+
BedrockFoundationModel,
12+
)
713
from constructs import Construct
814

915

@@ -28,12 +34,14 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
2834
instruction="You are a helpful and friendly agent that answers questions about insurance claims.",
2935
)
3036

37+
executor_group = ActionGroupExecutor(lambda_=action_group_function)
38+
3139
action_group = AgentActionGroup(
3240
self,
3341
"ActionGroup",
3442
action_group_name="InsureClaimsSupport",
3543
description="Use these functions for insurance claims support",
36-
action_group_executor=action_group_function,
44+
action_group_executor=executor_group,
3745
action_group_state="ENABLED",
3846
api_schema=ApiSchema.from_asset("./lambda/openapi.json"), # (2)!
3947
)

0 commit comments

Comments
 (0)