llama-index-llms-openai 0.3.5__tar.gz → 0.3.6__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.5
3
+ Version: 0.3.6
4
4
  Summary: llama-index llms openai integration
5
5
  License: MIT
6
6
  Author: llama-index
@@ -263,7 +263,7 @@ def to_openai_message_dict(
263
263
  content_txt = ""
264
264
  for block in message.blocks:
265
265
  if isinstance(block, TextBlock):
266
- if message.role.value in ("assistant", "tool", "system"):
266
+ if message.role.value in ("assistant", "tool", "system") or not supports_content_blocks:
267
267
  # Despite the docs say otherwise, when role is ASSISTANT, SYSTEM
268
268
  # or TOOL, 'content' cannot be a list and must be string instead.
269
269
  content_txt += block.text
@@ -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.5"
32
+ version = "0.3.6"
33
33
 
34
34
  [tool.poetry.dependencies]
35
35
  python = ">=3.9,<4.0"