llama-index-llms-openai 0.3.5__py3-none-any.whl → 0.3.6__py3-none-any.whl
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.
- llama_index/llms/openai/utils.py +1 -1
- {llama_index_llms_openai-0.3.5.dist-info → llama_index_llms_openai-0.3.6.dist-info}/METADATA +1 -1
- llama_index_llms_openai-0.3.6.dist-info/RECORD +6 -0
- llama_index_llms_openai-0.3.5.dist-info/RECORD +0 -6
- {llama_index_llms_openai-0.3.5.dist-info → llama_index_llms_openai-0.3.6.dist-info}/WHEEL +0 -0
llama_index/llms/openai/utils.py
CHANGED
|
@@ -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
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
llama_index/llms/openai/__init__.py,sha256=vm3cIBSGkBFlE77GyfyN0EhpJcnJZN95QMhPN53EkbE,148
|
|
2
|
+
llama_index/llms/openai/base.py,sha256=oyXczVpX-IF9MvTZ1xDY7OpiEmlywwiG1eTsyUGFrns,36195
|
|
3
|
+
llama_index/llms/openai/utils.py,sha256=aF2gP-Aef7rMUIYp9bG2Ke45pNszl_Jagga781Hul-A,18335
|
|
4
|
+
llama_index_llms_openai-0.3.6.dist-info/METADATA,sha256=ZzJAPLc3-rJCZG76WUO9uJuCLYlU14dLUQqNTWcnvAg,3320
|
|
5
|
+
llama_index_llms_openai-0.3.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
6
|
+
llama_index_llms_openai-0.3.6.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
llama_index/llms/openai/__init__.py,sha256=vm3cIBSGkBFlE77GyfyN0EhpJcnJZN95QMhPN53EkbE,148
|
|
2
|
-
llama_index/llms/openai/base.py,sha256=oyXczVpX-IF9MvTZ1xDY7OpiEmlywwiG1eTsyUGFrns,36195
|
|
3
|
-
llama_index/llms/openai/utils.py,sha256=C8k07gjCCIZg428jG4YVZudN2dw7PLPXOcZO7wBm8qk,18304
|
|
4
|
-
llama_index_llms_openai-0.3.5.dist-info/METADATA,sha256=YIa5Pusvi7e7Eb8nT2oHEnZYv8LLl8GEb6vLngQgZe4,3320
|
|
5
|
-
llama_index_llms_openai-0.3.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
6
|
-
llama_index_llms_openai-0.3.5.dist-info/RECORD,,
|
|
File without changes
|