From 5040d08f79edaf1cfbeac1e92d26ed3cdaa5918b 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 8d8c78e256..0eac877247 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