Skip to content

Commit baf3baf

Browse files
chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.289 to 0.1.290 (#5917)
* chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs Bumps [cdklabs-generative-ai-cdk-constructs](https://github.com/awslabs/generative-ai-cdk-constructs) from 0.1.289 to 0.1.290. - [Release notes](https://github.com/awslabs/generative-ai-cdk-constructs/releases) - [Changelog](https://github.com/awslabs/generative-ai-cdk-constructs/blob/main/CHANGELOG.md) - [Commits](awslabs/generative-ai-cdk-constructs@v0.1.289...v0.1.290) --- updated-dependencies: - dependency-name: cdklabs-generative-ai-cdk-constructs dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Fix mypy --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Leandro Damascena <[email protected]>
1 parent 50b0098 commit baf3baf

File tree

2 files changed

+18
-26
lines changed

2 files changed

+18
-26
lines changed

examples/event_handler_bedrock_agents/cdk/bedrock_agent_stack.py

+10-18
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@
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 (
7-
ActionGroupExecutor,
8-
Agent,
9-
AgentActionGroup,
10-
ApiSchema,
11-
BedrockFoundationModel,
12-
)
6+
from cdklabs.generative_ai_cdk_constructs import bedrock
137
from constructs import Construct
148

159

@@ -27,22 +21,20 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
2721
handler="lambda_handler",
2822
)
2923

30-
agent = Agent(
24+
agent = bedrock.Agent(
3125
self,
3226
"Agent",
33-
foundation_model=BedrockFoundationModel.ANTHROPIC_CLAUDE_INSTANT_V1_2,
27+
foundation_model=bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_INSTANT_V1_2,
3428
instruction="You are a helpful and friendly agent that answers questions about insurance claims.",
3529
)
3630

37-
executor_group = ActionGroupExecutor(lambda_=action_group_function)
38-
39-
action_group = AgentActionGroup(
40-
self,
41-
"ActionGroup",
42-
action_group_name="InsureClaimsSupport",
31+
action_group: bedrock.AgentActionGroup = bedrock.AgentActionGroup(
32+
name="InsureClaimsSupport",
4333
description="Use these functions for insurance claims support",
44-
action_group_executor=executor_group,
45-
action_group_state="ENABLED",
46-
api_schema=ApiSchema.from_asset("./lambda/openapi.json"), # (2)!
34+
executor=bedrock.ActionGroupExecutor.fromlambda_function(
35+
lambda_function=action_group_function,
36+
),
37+
enabled=True,
38+
api_schema=bedrock.ApiSchema.from_local_asset("./lambda/openapi.json"), # (2)!
4739
)
4840
agent.add_action_group(action_group)

poetry.lock

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)