llama-index-llms-openai 0.2.11__tar.gz → 0.2.12__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.2.11 → llama_index_llms_openai-0.2.12}/PKG-INFO +1 -1
- {llama_index_llms_openai-0.2.11 → llama_index_llms_openai-0.2.12}/llama_index/llms/openai/base.py +4 -2
- {llama_index_llms_openai-0.2.11 → llama_index_llms_openai-0.2.12}/llama_index/llms/openai/utils.py +1 -1
- {llama_index_llms_openai-0.2.11 → llama_index_llms_openai-0.2.12}/pyproject.toml +1 -1
- {llama_index_llms_openai-0.2.11 → llama_index_llms_openai-0.2.12}/README.md +0 -0
- {llama_index_llms_openai-0.2.11 → llama_index_llms_openai-0.2.12}/llama_index/llms/openai/__init__.py +0 -0
{llama_index_llms_openai-0.2.11 → llama_index_llms_openai-0.2.12}/llama_index/llms/openai/base.py
RENAMED
|
@@ -488,7 +488,8 @@ class OpenAI(FunctionCallingLLM):
|
|
|
488
488
|
additional_kwargs = {}
|
|
489
489
|
if is_function:
|
|
490
490
|
tool_calls = update_tool_calls(tool_calls, delta.tool_calls)
|
|
491
|
-
|
|
491
|
+
if tool_calls:
|
|
492
|
+
additional_kwargs["tool_calls"] = tool_calls
|
|
492
493
|
|
|
493
494
|
yield ChatResponse(
|
|
494
495
|
message=ChatMessage(
|
|
@@ -738,7 +739,8 @@ class OpenAI(FunctionCallingLLM):
|
|
|
738
739
|
additional_kwargs = {}
|
|
739
740
|
if is_function:
|
|
740
741
|
tool_calls = update_tool_calls(tool_calls, delta.tool_calls)
|
|
741
|
-
|
|
742
|
+
if tool_calls:
|
|
743
|
+
additional_kwargs["tool_calls"] = tool_calls
|
|
742
744
|
|
|
743
745
|
yield ChatResponse(
|
|
744
746
|
message=ChatMessage(
|
{llama_index_llms_openai-0.2.11 → llama_index_llms_openai-0.2.12}/llama_index/llms/openai/utils.py
RENAMED
|
@@ -285,7 +285,7 @@ def from_openai_message(openai_message: ChatCompletionMessage) -> ChatMessage:
|
|
|
285
285
|
# function_call = None # deprecated in OpenAI v 1.1.0
|
|
286
286
|
|
|
287
287
|
additional_kwargs: Dict[str, Any] = {}
|
|
288
|
-
if openai_message.tool_calls
|
|
288
|
+
if openai_message.tool_calls:
|
|
289
289
|
tool_calls: List[ChatCompletionMessageToolCall] = openai_message.tool_calls
|
|
290
290
|
additional_kwargs.update(tool_calls=tool_calls)
|
|
291
291
|
|
|
File without changes
|
|
File without changes
|