aws-amplify / amplify-backend

Home to all tools related to Amplify's code-first DX (Gen 2) for building fullstack apps on AWS
Apache License 2.0
185 stars 62 forks source link

Fix case where tool use does not have input while streaming #2226

Closed sobolk closed 1 week ago

sobolk commented 1 week ago

Problem

Bedrock Tools might be parameterless.

In that case bedrock either returns undefined input or blank.

Changes

Conditionally parse tool input.

Validation

added tests

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

changeset-bot[bot] commented 1 week ago

🦋 Changeset detected

Latest commit: 44455af4c8407179ccb4e76e00119028a3d67e88

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | -------------------------- | ----- | | @aws-amplify/ai-constructs | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR