From afad40b4f829290cbe877c041aaf4c614de5e40c Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 12 Feb 2024 22:36:32 -0800 Subject: [PATCH] fix(utils.py): fix streaming rule calling --- litellm/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/utils.py b/litellm/utils.py index 916f0c793..e238b84d7 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -8765,8 +8765,8 @@ class CustomStreamWrapper: ) ) - self.response_uptil_now += processed_chunk.choices[0].delta.get( - "content", "" + self.response_uptil_now += ( + processed_chunk.choices[0].delta.get("content", "") or "" ) self.rules.post_call_rules( input=self.response_uptil_now, model=self.model