Skip to content

Made some properties of Bedrock's Event optional. #748

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

Merged

Conversation

KUrushi
Copy link
Contributor

@KUrushi KUrushi commented Dec 6, 2023

Description of changes

When I actually created an Event and started it from a Lambda function, I noticed that some parameters were Nullable.

Agents for Amazon Bedrock takes into account the HTTP Method of the configured schema and sets values for the properties.
So I noticed that, for example, if the GET method is configured in the schema, there is usually no Request body.

I don't know if this is correct because the schema page of the document does not specify whether it is Nullable or not, but I think it is safest to set parameters and request_body to Optional.

If anyone knows the details, I would appreciate it if you could let me know.

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

@KUrushi KUrushi changed the title change some properties to optional value Made some properties of Bedrock's Event optional. Dec 6, 2023
Copy link
Contributor

@calavera calavera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left you a couple of suggestions.

KUrushi and others added 2 commits December 7, 2023 01:23
add default value to parameters

Co-authored-by: David Calavera <david.calavera@gmail.com>
add default to request_body

Co-authored-by: David Calavera <david.calavera@gmail.com>
@KUrushi
Copy link
Contributor Author

KUrushi commented Dec 6, 2023

Thank you for your code suggestion! I have applied your suggestion.

@KUrushi KUrushi requested a review from calavera December 6, 2023 16:27
@calavera calavera merged commit d513b13 into awslabs:main Dec 6, 2023
@KUrushi KUrushi deleted the fix/bedrock-agent-optional-properties branch December 7, 2023 00:14
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