From fa9298d5882fd8459fcffdecbb2314f26a47b783 Mon Sep 17 00:00:00 2001 From: Joe Cheng Date: Sat, 3 Aug 2024 11:58:46 -0700 Subject: [PATCH] Use correct key name --- litellm/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/main.py b/litellm/main.py index 36267aec1d..f6a43023a3 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -5151,8 +5151,8 @@ def stream_chunk_builder( function_call_chunks = [ chunk for chunk in chunks - if "function_calls" in chunk["choices"][0]["delta"] - and chunk["choices"][0]["delta"]["function_calls"] is not None + if "function_call" in chunk["choices"][0]["delta"] + and chunk["choices"][0]["delta"]["function_call"] is not None ] if len(function_call_chunks) > 0: