llama-index-llms-openai 0.3.32__tar.gz → 0.3.34__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: llama-index-llms-openai
3
- Version: 0.3.32
3
+ Version: 0.3.34
4
4
  Summary: llama-index llms openai integration
5
5
  License: MIT
6
6
  Author: llama-index
@@ -387,6 +387,7 @@ class OpenAIResponses(FunctionCallingLLM):
387
387
  }
388
388
 
389
389
  def _get_model_kwargs(self, **kwargs: Any) -> Dict[str, Any]:
390
+ initial_tools = self.built_in_tools or []
390
391
  model_kwargs = {
391
392
  "model": self.model,
392
393
  "include": self.include,
@@ -396,7 +397,7 @@ class OpenAIResponses(FunctionCallingLLM):
396
397
  "previous_response_id": self._previous_response_id,
397
398
  "store": self.store,
398
399
  "temperature": self.temperature,
399
- "tools": self.built_in_tools,
400
+ "tools": [*initial_tools, *kwargs.pop("tools", [])],
400
401
  "top_p": self.top_p,
401
402
  "truncation": self.truncation,
402
403
  "user": self.user,
@@ -406,13 +407,6 @@ class OpenAIResponses(FunctionCallingLLM):
406
407
  # O1 models support reasoning_effort of low, medium, high
407
408
  model_kwargs["reasoning_effort"] = {"effort": self.reasoning_effort}
408
409
 
409
- # add tools or extend openai tools
410
- if "tools" in kwargs:
411
- if isinstance(model_kwargs["tools"], list):
412
- model_kwargs["tools"].extend(kwargs.pop("tools"))
413
- else:
414
- model_kwargs["tools"] = kwargs.pop("tools")
415
-
416
410
  # priority is class args > additional_kwargs > runtime args
417
411
  model_kwargs.update(self.additional_kwargs)
418
412
 
@@ -28,7 +28,7 @@ exclude = ["**/BUILD"]
28
28
  license = "MIT"
29
29
  name = "llama-index-llms-openai"
30
30
  readme = "README.md"
31
- version = "0.3.32"
31
+ version = "0.3.34"
32
32
 
33
33
  [tool.poetry.dependencies]
34
34
  python = ">=3.9,<4.0"