Open
Description
Which component is this bug for?
Bedrock Instrumentation
📜 Description
Currently, the instrumentation of bedrock, the responses are not being handled properly, for example the response from amazon.titan-embed-image-v1 when not returning the 'results' field returns the error sum(int(result.get("tokenCount")) for result in response_body.get("results")), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'NoneType' object is not iterable
👟 Reproduction steps
- Execute the model invocation: amazon.titan-embed-image-v1
👍 Expected behavior
It should correctly return the information in the trace spans and metrics
👎 Actual Behavior with Screenshots
It currently returns an exception
🤖 Python Version
3.11
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
- I checked and didn't find similar issue
Are you willing to submit PR?
Yes I am willing to submit a PR!