Skip to content

Commit

Permalink
chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs from 0.1.2…
Browse files Browse the repository at this point in the history
…89 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]>
  • Loading branch information
dependabot[bot] and leandrodamascena authored Jan 28, 2025
1 parent 50b0098 commit baf3baf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 26 deletions.
28 changes: 10 additions & 18 deletions examples/event_handler_bedrock_agents/cdk/bedrock_agent_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
)
from aws_cdk.aws_lambda import Runtime
from aws_cdk.aws_lambda_python_alpha import PythonFunction
from cdklabs.generative_ai_cdk_constructs.bedrock import (
ActionGroupExecutor,
Agent,
AgentActionGroup,
ApiSchema,
BedrockFoundationModel,
)
from cdklabs.generative_ai_cdk_constructs import bedrock
from constructs import Construct


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

agent = Agent(
agent = bedrock.Agent(
self,
"Agent",
foundation_model=BedrockFoundationModel.ANTHROPIC_CLAUDE_INSTANT_V1_2,
foundation_model=bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_INSTANT_V1_2,
instruction="You are a helpful and friendly agent that answers questions about insurance claims.",
)

executor_group = ActionGroupExecutor(lambda_=action_group_function)

action_group = AgentActionGroup(
self,
"ActionGroup",
action_group_name="InsureClaimsSupport",
action_group: bedrock.AgentActionGroup = bedrock.AgentActionGroup(
name="InsureClaimsSupport",
description="Use these functions for insurance claims support",
action_group_executor=executor_group,
action_group_state="ENABLED",
api_schema=ApiSchema.from_asset("./lambda/openapi.json"), # (2)!
executor=bedrock.ActionGroupExecutor.fromlambda_function(
lambda_function=action_group_function,
),
enabled=True,
api_schema=bedrock.ApiSchema.from_local_asset("./lambda/openapi.json"), # (2)!
)
agent.add_action_group(action_group)
16 changes: 8 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit baf3baf

Please sign in to comment.