From c89f475c4cf20f3b61eea28c9e069c29abb880cd Mon Sep 17 00:00:00 2001 From: Brandon Hancock Date: Mon, 9 Dec 2024 15:27:36 -0500 Subject: [PATCH] Fix type issue --- src/crewai/llm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crewai/llm.py b/src/crewai/llm.py index 6d90448b9..058589056 100644 --- a/src/crewai/llm.py +++ b/src/crewai/llm.py @@ -131,7 +131,7 @@ class LLM: self.api_version = api_version self.api_key = api_key self.callbacks = callbacks - self.context_window_size = None + self.context_window_size = 0 self.kwargs = kwargs litellm.drop_params = True @@ -199,7 +199,7 @@ class LLM: def get_context_window_size(self) -> int: # Only using 75% of the context window size to avoid cutting the message in the middle - if self.context_window_size is not None: + if self.context_window_size != 0: return self.context_window_size self.context_window_size = int(