llama-index-llms-openai 0.3.25__tar.gz → 0.3.27__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.25
3
+ Version: 0.3.27
4
4
  Summary: llama-index llms openai integration
5
5
  License: MIT
6
6
  Author: llama-index
@@ -38,6 +38,8 @@ DEFAULT_OPENAI_API_VERSION = ""
38
38
  O1_MODELS: Dict[str, int] = {
39
39
  "o1": 200000,
40
40
  "o1-2024-12-17": 200000,
41
+ "o1-pro": 200000,
42
+ "o1-pro-2025-03-19": 200000,
41
43
  "o1-preview": 128000,
42
44
  "o1-preview-2024-09-12": 128000,
43
45
  "o1-mini": 128000,
@@ -294,7 +296,13 @@ def to_openai_message_dict(
294
296
  elif isinstance(block, ImageBlock):
295
297
  if block.url:
296
298
  content.append(
297
- {"type": "image_url", "image_url": {"url": str(block.url)}}
299
+ {
300
+ "type": "image_url",
301
+ "image_url": {
302
+ "url": str(block.url),
303
+ "detail": block.detail or "auto",
304
+ },
305
+ }
298
306
  )
299
307
  else:
300
308
  img_bytes = block.resolve_image(as_base64=True).read()
@@ -304,7 +312,7 @@ def to_openai_message_dict(
304
312
  "type": "image_url",
305
313
  "image_url": {
306
314
  "url": f"data:{block.image_mimetype};base64,{img_str}",
307
- "detail": block.detail or "low",
315
+ "detail": block.detail or "auto",
308
316
  },
309
317
  }
310
318
  )
@@ -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.25"
32
+ version = "0.3.27"
33
33
 
34
34
  [tool.poetry.dependencies]
35
35
  python = ">=3.9,<4.0"