diff --git a/graphiti_core/llm_client/anthropic_client.py b/graphiti_core/llm_client/anthropic_client.py index 548569e..3dc8710 100644 --- a/graphiti_core/llm_client/anthropic_client.py +++ b/graphiti_core/llm_client/anthropic_client.py @@ -40,7 +40,8 @@ def __init__(self, config: LLMConfig | None = None, cache: bool = False): super().__init__(config, cache) # Override the default max tokens for Anthropic - self.max_tokens = DEFAULT_MAX_TOKENS + if self.max_tokens is None: + self.max_tokens = DEFAULT_MAX_TOKENS self.client = AsyncAnthropic( api_key=config.api_key, diff --git a/graphiti_core/llm_client/groq_client.py b/graphiti_core/llm_client/groq_client.py index 0fa3d76..adbcbd8 100644 --- a/graphiti_core/llm_client/groq_client.py +++ b/graphiti_core/llm_client/groq_client.py @@ -41,7 +41,8 @@ def __init__(self, config: LLMConfig | None = None, cache: bool = False): super().__init__(config, cache) # Override the default max tokens for Groq - self.max_tokens = DEFAULT_MAX_TOKENS + if self.max_tokens is None: + self.max_tokens = DEFAULT_MAX_TOKENS self.client = AsyncGroq(api_key=config.api_key)