Skip to content

fix: Correct array parameter parsing in process_roc.py#108

Open
aws-banjo wants to merge 2 commits intoawslabs:mainfrom
aws-banjo:inline_agent_fix
Open

fix: Correct array parameter parsing in process_roc.py#108
aws-banjo wants to merge 2 commits intoawslabs:mainfrom
aws-banjo:inline_agent_fix

Conversation

@aws-banjo
Copy link

Amazon Bedrock Agent Samples Pull Request

Instructions

  • Do not erase any parts of this template that are not applicable to your pull request.
  • If a section is not applicable, explicitly state the reason.
    • Tick the checkboxes for the items you have completed.
  • These are mandatory requirements, not mere suggestions.

Describe your changes

  • Concise description of the PR
Changes to array parameter handling in InlineAgent's process_roc.py, because the previous implementation was not properly parsing array parameters from ROC events, causing validation errors when array inputs were passed to tools. The fix adds proper JSON parsing with a fallback to string splitting for array parameters.

Issue ticket number and link

  • Issue # (if applicable)

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Are you uploading a dataset? No
  • Have you added contributions to RELEASE NOTES? No

New Example Submissions:

  • [] Have you tested your code, and made sure the functionality runs successfully? Provide screenshots.
  • [] Have you linted your Python code with black?
  • Does this implementation use the shared tools src/utils/*. List them here:
Not applicable - this is a bug fix to existing code, not a new example.
  • Does this implementation use the helper functions src/utils/*. List them here:
Not applicable - this change is to the InlineAgent implementation, not the utils folder.

src/utils Submissions:

Changes to the utils folder won't be accepted. Instead, open a new issue.


src/shared tool Submissions:

Changes to existing tools won't be accepted. Instead, open a new issue.

  • Business justification for including a new tool
Not applicable - this change is not adding or modifying shared tools.
  • How is this tool implemented?
      • AWS CDK
      • AWS CloudFormation (recommended)

@EashanKaushik EashanKaushik self-assigned this Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants