From ef8507a9df7a2e608d584e2884d5d8fc443edbf2 Mon Sep 17 00:00:00 2001 From: Daniel Chalef <131175+danielchalef@users.noreply.github.com> Date: Thu, 30 Oct 2025 17:30:36 -0700 Subject: [PATCH] conductor-checkpoint-msg_01AVxUgejEA9piS6narw4omz --- graphiti_core/llm_client/anthropic_client.py | 25 +++++++------------- graphiti_core/llm_client/config.py | 2 +- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/graphiti_core/llm_client/anthropic_client.py b/graphiti_core/llm_client/anthropic_client.py index 179e035a..1f2916b3 100644 --- a/graphiti_core/llm_client/anthropic_client.py +++ b/graphiti_core/llm_client/anthropic_client.py @@ -214,22 +214,15 @@ class AnthropicClient(LLMClient): try: # Create the appropriate tool based on whether response_model is provided tools, tool_choice = self._create_tool(response_model) - - # Build the message creation parameters - create_params: dict[str, typing.Any] = { - 'system': system_message.content, - 'max_tokens': max_creation_tokens, - 'messages': user_messages_cast, - 'model': self.model, - 'tools': tools, - 'tool_choice': tool_choice, - } - - # Only include temperature if it's not None - if self.temperature is not None: - create_params['temperature'] = self.temperature - - result = await self.client.messages.create(**create_params) + result = await self.client.messages.create( + system=system_message.content, + max_tokens=max_creation_tokens, + temperature=self.temperature, + messages=user_messages_cast, + model=self.model, + tools=tools, + tool_choice=tool_choice, + ) # Extract the tool output from the response for content_item in result.content: diff --git a/graphiti_core/llm_client/config.py b/graphiti_core/llm_client/config.py index 17a6d5a6..dec7a293 100644 --- a/graphiti_core/llm_client/config.py +++ b/graphiti_core/llm_client/config.py @@ -39,7 +39,7 @@ class LLMConfig: api_key: str | None = None, model: str | None = None, base_url: str | None = None, - temperature: float | None = None, + temperature: float = DEFAULT_TEMPERATURE, max_tokens: int = DEFAULT_MAX_TOKENS, small_model: str | None = None, ):