From 1f429ef7549da1fb1cc1c4c0db4f490521434a04 Mon Sep 17 00:00:00 2001 From: Igor Drozdov Date: Fri, 5 Jul 2024 12:22:15 +0200 Subject: [PATCH] fix(anthropic.py): add index to streaming tool use --- litellm/llms/anthropic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/litellm/llms/anthropic.py b/litellm/llms/anthropic.py index 8e4879e014..e87618f02e 100644 --- a/litellm/llms/anthropic.py +++ b/litellm/llms/anthropic.py @@ -757,6 +757,7 @@ class ModelResponseIterator: "name": None, "arguments": content_block["delta"]["partial_json"], }, + "index": content_block["index"], } elif type_chunk == "content_block_start": """ @@ -774,6 +775,7 @@ class ModelResponseIterator: "name": content_block_start["content_block"]["name"], "arguments": "", }, + "index": content_block_start["index"], } elif type_chunk == "message_delta": """