llama-index-llms-openai 0.3.9__tar.gz → 0.3.10__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.
- {llama_index_llms_openai-0.3.9 → llama_index_llms_openai-0.3.10}/PKG-INFO +1 -1
- {llama_index_llms_openai-0.3.9 → llama_index_llms_openai-0.3.10}/llama_index/llms/openai/utils.py +4 -0
- {llama_index_llms_openai-0.3.9 → llama_index_llms_openai-0.3.10}/pyproject.toml +1 -1
- {llama_index_llms_openai-0.3.9 → llama_index_llms_openai-0.3.10}/README.md +0 -0
- {llama_index_llms_openai-0.3.9 → llama_index_llms_openai-0.3.10}/llama_index/llms/openai/__init__.py +0 -0
- {llama_index_llms_openai-0.3.9 → llama_index_llms_openai-0.3.10}/llama_index/llms/openai/base.py +0 -0
{llama_index_llms_openai-0.3.9 → llama_index_llms_openai-0.3.10}/llama_index/llms/openai/utils.py
RENAMED
|
@@ -285,6 +285,10 @@ def to_openai_message_dict(
|
|
|
285
285
|
msg = f"Unsupported content block type: {type(block).__name__}"
|
|
286
286
|
raise ValueError(msg)
|
|
287
287
|
|
|
288
|
+
# NOTE: Sending a blank string to openai will cause an error.
|
|
289
|
+
# This will commonly happen with tool calls.
|
|
290
|
+
content_txt = None if content_txt == "" else content_txt
|
|
291
|
+
|
|
288
292
|
# NOTE: Despite what the openai docs say, if the role is ASSISTANT, SYSTEM
|
|
289
293
|
# or TOOL, 'content' cannot be a list and must be string instead.
|
|
290
294
|
# Furthermore, if all blocks are text blocks, we can use the content_txt
|
|
File without changes
|
{llama_index_llms_openai-0.3.9 → llama_index_llms_openai-0.3.10}/llama_index/llms/openai/__init__.py
RENAMED
|
File without changes
|
{llama_index_llms_openai-0.3.9 → llama_index_llms_openai-0.3.10}/llama_index/llms/openai/base.py
RENAMED
|
File without changes
|