-
Notifications
You must be signed in to change notification settings - Fork 867
BugFix Issue #3731 json schema input schema #3845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BugFix Issue #3731 json schema input schema #3845
Conversation
extensions/src/AWSSDK.Extensions.Bedrock.MEAI/BedrockChatClient.cs
Outdated
Show resolved
Hide resolved
extensions/src/AWSSDK.Extensions.Bedrock.MEAI/BedrockChatClient.cs
Outdated
Show resolved
Hide resolved
I miss a place to add integration tests in this repo, if we can hook up any with the support of the team would be very helpful to ensure the functionality. Currently I had to create a test on my local side and only this way was capable of replicating the problem and solving it. |
Thank you for the contribution, this will be included in the next release of the SDK (which will happen tomorrow). For your question on integration tests, we currently don't run them for Bedrock during our release process (since it requires an internal setup to be completed first). I know it doesn't really apply here, but if you're working on a fix that doesn't need interacting with the actual service, the unit tests project can be used (https://github.com/aws/aws-sdk-net/tree/main/extensions/test/BedrockMEAITests). |
This pull request introduces changes to improve the handling of
Document
objects and schema generation in theBedrockChatClient
class within theAWSSDK.Extensions.Bedrock.MEAI
extension. The updates streamline the creation of input schemas and ensure consistency inDocument
initialization.Fix to
Document
default:This change prevents an error while advertising the function result back to the API, as it says the toolInput cannot be
null
, by setting the default as empty dictionary sorts the error.Enhancements to schema generation:
type
,properties
, andrequired
fields in a more structured manner, this avoid advertising those properties when they are not present. Any execution of a function that has no arguments were failing before this fix.Reproduction Bug