From 4c31ee342dc22f3c63dc5fb2f38c713f43d20b90 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Tue, 8 Aug 2023 16:07:53 -0700 Subject: [PATCH] fix anthropic streaming --- litellm/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/main.py b/litellm/main.py index 8d8c78e256d..0eac8772477 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -239,7 +239,7 @@ def completion( max_tokens_to_sample=max_tokens_to_sample, **optional_params ) - if optional_params['stream'] == True: + if 'stream' in optional_params and optional_params['stream'] == True: # don't try to access stream object, response = CustomStreamWrapper(completion) return response