Skip to content

Commit 0e070e4

Browse files
committed
Cleanup
1 parent fa3fe2a commit 0e070e4

File tree

1 file changed

+6
-4
lines changed
  • instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions

1 file changed

+6
-4
lines changed

instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions/bedrock_utils.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,12 @@ def _process_amazon_nova_chunk(self, chunk):
227227
# {'contentBlockStart': {'start': {'toolUse': {'toolUseId': 'id', 'name': 'name'}}, 'contentBlockIndex': 31}}
228228
if self._record_message:
229229
self._message["content"].append(self._content_block)
230-
self._content_block = {}
231-
start = chunk["contentBlockStart"].get("start", {})
232-
if "toolUse" in start:
233-
self._content_block = start
230+
231+
start = chunk["contentBlockStart"].get("start", {})
232+
if "toolUse" in start:
233+
self._content_block = start
234+
else:
235+
self._content_block = {}
234236
return
235237

236238
if "contentBlockDelta" in chunk:

0 commit comments

Comments
 (0)