aws-powertools / powertools-lambda-python

A developer toolkit to implement Serverless best practices and increase developer velocity.
https://docs.powertools.aws.dev/lambda/python/latest/
MIT No Attribution
2.87k stars 394 forks source link

Feature request: [Bedrock Agent Event Handler] Add (prompt) session attributes and knowledgeBasesConfiguration to the response #5042

Open isunli opened 2 months ago

isunli commented 2 months ago

Use case

We are using bedrock event handler and we want to add session attributes and prompt session attributes in our response. In the current event handler there is no way to do that unless we build the json object manually. code.

We want to have a proper why to inject those attributes into response.

In the doc there is one more attribute called knowledgeBasesConfiguration which should also included in the solution.

Solution/User Experience

Maybe we have a bedrock response object like API Gateway (https://docs.powertools.aws.dev/lambda/python/latest/core/event_handler/api_gateway/#fine-grained-responses) to allow user to inject additional attributes.

Alternative solutions

No response

Acknowledgment

boring-cyborg[bot] commented 2 months ago

Thanks for opening your first issue here! We'll come back to you as soon as we can. In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

leandrodamascena commented 2 months ago

Hi @isunli! Thanks for opening this issue! I'm adding it to the backlog and will return to this issue once we release v3.