We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37c886b commit 94366dfCopy full SHA for 94366df
src/openlayer/lib/integrations/bedrock_tracer.py
@@ -156,8 +156,11 @@ def handle_non_streaming_invoke(
156
)
157
158
# Reset response body for return (since we read it)
159
+ response_bytes = json.dumps(response_data).encode("utf-8")
160
response["body"] = type(
- "MockBody", (), {"read": lambda: json.dumps(response_data).encode("utf-8")}
161
+ "MockBody",
162
+ (),
163
+ {"read": lambda size=-1: response_bytes[:size] if size > 0 else response_bytes},
164
)()
165
return response
166
0 commit comments