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
#269 indicates issues with implementing Serialize/Deserialize for all types; but since there is code in shape_api_result.rs that serializes this (and other) type(s), could they be made public so that applications can use the same logic, instead of duplicating the types just to enable serialization?
Use Case
Hi! I'm writing a bedrock agent lambda handler, and I'd like to return an ApiResult, as that (looks like) the documented return shape -- I may be wrong here, so please correct me if I am!
However, since it doesn't implement Serialize/Deserialize, which is a requirement of the lambda return type, I need another way of serializing it.
pub(crate)asyncfnfunction_handler(event:LambdaEvent<AgentEvent>)
-> Result<ApiResult,Error>{// ^^^^^^^^^ the type here needs to impl Serialize;// a different type can be used as long as// it serializes to the bedrock-agent accepted// response// ..}
Proposed Solution
Probably a larger conversation, since allowing consumers to access the protocol_serde module logic may be too wide a net to cast and support as API.
Other Information
Currently InvokeInlineAgent uses that under the hood (so, client.invoke_inline_agent()..`), but I didn't want to misuse that call as a way to reach the serialization code.
Acknowledgements
I may be able to implement this feature request
This feature might incur a breaking change
A note for the community
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue, please leave a comment
The text was updated successfully, but these errors were encountered:
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the feature
#269 indicates issues with implementing
Serialize
/Deserialize
for all types; but since there is code in shape_api_result.rs that serializes this (and other) type(s), could they be made public so that applications can use the same logic, instead of duplicating the types just to enable serialization?Use Case
Hi! I'm writing a bedrock agent lambda handler, and I'd like to return an
ApiResult
, as that (looks like) the documented return shape -- I may be wrong here, so please correct me if I am!However, since it doesn't implement Serialize/Deserialize, which is a requirement of the lambda return type, I need another way of serializing it.
Proposed Solution
Probably a larger conversation, since allowing consumers to access the
protocol_serde
module logic may be too wide a net to cast and support as API.Other Information
Currently
InvokeInlineAgent
uses that under the hood (so, client.invoke_inline_agent()..`), but I didn't want to misuse that call as a way to reach the serialization code.Acknowledgements
A note for the community
Community Note
The text was updated successfully, but these errors were encountered: