llama-index-llms-openai 0.3.17__tar.gz → 0.3.18__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.17
3
+ Version: 0.3.18
4
4
  Summary: llama-index llms openai integration
5
5
  License: MIT
6
6
  Author: llama-index
@@ -218,8 +218,8 @@ class OpenAI(FunctionCallingLLM):
218
218
  default=False,
219
219
  description="Whether to use strict mode for invoking tools/using schemas.",
220
220
  )
221
- reasoning_effort: Literal["low", "medium", "high"] = Field(
222
- default="medium",
221
+ reasoning_effort: Optional[Literal["low", "medium", "high"]] = Field(
222
+ default=None,
223
223
  description="The effort to use for reasoning models.",
224
224
  )
225
225
 
@@ -253,7 +253,7 @@ class OpenAI(FunctionCallingLLM):
253
253
  pydantic_program_mode: PydanticProgramMode = PydanticProgramMode.DEFAULT,
254
254
  output_parser: Optional[BaseOutputParser] = None,
255
255
  strict: bool = False,
256
- reasoning_effort: Literal["low", "medium", "high"] = "medium",
256
+ reasoning_effort: Optional[Literal["low", "medium", "high"]] = None,
257
257
  **kwargs: Any,
258
258
  ) -> None:
259
259
  additional_kwargs = additional_kwargs or {}
@@ -430,7 +430,7 @@ class OpenAI(FunctionCallingLLM):
430
430
  "max_completion_tokens", all_kwargs["max_tokens"]
431
431
  )
432
432
  all_kwargs.pop("max_tokens", None)
433
- if self.model in O1_MODELS:
433
+ if self.model in O1_MODELS and self.reasoning_effort is not None:
434
434
  # O1 models support reasoning_effort of low, medium, high
435
435
  all_kwargs["reasoning_effort"] = self.reasoning_effort
436
436
 
@@ -29,7 +29,7 @@ exclude = ["**/BUILD"]
29
29
  license = "MIT"
30
30
  name = "llama-index-llms-openai"
31
31
  readme = "README.md"
32
- version = "0.3.17"
32
+ version = "0.3.18"
33
33
 
34
34
  [tool.poetry.dependencies]
35
35
  python = ">=3.9,<4.0"