You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I started using the AgentCore SDK recently and I understood that in the BedrockAgentCoreApp's entrypoint, the request is always either a JSON object or array (Python Dictionary or List).
But I expected the request to be in a Pydantic Model compatible request.
Currently, I am achieving this by manually adding a middleware to verify the Pydantic Model request and giving the necessary Bad Request Respinse back to the client. Also, this still has me the condition of getting the JSON type in the entrypoint function where I am again converting the request to the valid Pydantic Model since I have already validated using the custom middleware.
I encourage this feature enhancement as most of the industry is already using Python Web Frameworks which support Pydantic Models.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Team,
I started using the AgentCore SDK recently and I understood that in the BedrockAgentCoreApp's entrypoint, the request is always either a JSON object or array (Python Dictionary or List).
But I expected the request to be in a Pydantic Model compatible request.
Currently, I am achieving this by manually adding a middleware to verify the Pydantic Model request and giving the necessary Bad Request Respinse back to the client. Also, this still has me the condition of getting the JSON type in the entrypoint function where I am again converting the request to the valid Pydantic Model since I have already validated using the custom middleware.
I encourage this feature enhancement as most of the industry is already using Python Web Frameworks which support Pydantic Models.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions