Skip to content

Commit 4a98662

Browse files
v0.12.7 (run-llama#17320)
1 parent 6019481 commit 4a98662

File tree

8 files changed

+302
-220
lines changed

8 files changed

+302
-220
lines changed

CHANGELOG.md

+39
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
# ChangeLog
22

3+
## [2024-12-18]
4+
5+
### `llama-index-core` [0.12.7]
6+
7+
- fix: add a timeout to langchain callback handler (#17296)
8+
- fix: make Document serialization event more backward compatible (#17312)
9+
10+
### `llama-index-embeddings-voyageai` [0.3.4]
11+
12+
- Exposing additional keyword arguments for VoyageAI's embedding model (#17315)
13+
14+
### `llama-index-llms-keywordsai` [0.1.0]
15+
16+
- Added KeywordsAI LLM (#16860)
17+
18+
### `llama-index-llms-oci-genai` [0.4.0]
19+
20+
- Add OCI Generative AI tool calling support (#16888)
21+
22+
### `llama-index-llms-openai` [0.3.11]
23+
24+
- support new o1 models (#17307)
25+
26+
### `llama-index-postprocessor-voyageai-rerank` [0.3.1]
27+
28+
- VoyageAI Reranker optional API Key (#17310)
29+
30+
### `llama-index-vector-stores-azureaisearch` [0.3.1]
31+
32+
- improve async search client handling (#17319)
33+
34+
### `llama-index-vector-stores-azurecosmosmongo` [0.4.0]
35+
36+
- CosmosDB insertion timestamp bugfix (#17290)
37+
38+
### `llama-index-vector-stores-azurecosmosnosql` [1.3.0]
39+
40+
- CosmosDB insertion timestamp bugfix (#17290)
41+
342
## [2024-12-17]
443

544
### `llama-index-core` [0.12.6]

docs/docs/CHANGELOG.md

+40-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,49 @@
11
# ChangeLog
22

3+
## [2024-12-18]
4+
5+
### `llama-index-core` [0.12.7]
6+
7+
- fix: add a timeout to langchain callback handler (#17296)
8+
- fix: make Document serialization event more backward compatible (#17312)
9+
10+
### `llama-index-embeddings-voyageai` [0.3.4]
11+
12+
- Exposing additional keyword arguments for VoyageAI's embedding model (#17315)
13+
14+
### `llama-index-llms-keywordsai` [0.1.0]
15+
16+
- Added KeywordsAI LLM (#16860)
17+
18+
### `llama-index-llms-oci-genai` [0.4.0]
19+
20+
- Add OCI Generative AI tool calling support (#16888)
21+
22+
### `llama-index-llms-openai` [0.3.11]
23+
24+
- support new o1 models (#17307)
25+
26+
### `llama-index-postprocessor-voyageai-rerank` [0.3.1]
27+
28+
- VoyageAI Reranker optional API Key (#17310)
29+
30+
### `llama-index-vector-stores-azureaisearch` [0.3.1]
31+
32+
- improve async search client handling (#17319)
33+
34+
### `llama-index-vector-stores-azurecosmosmongo` [0.4.0]
35+
36+
- CosmosDB insertion timestamp bugfix (#17290)
37+
38+
### `llama-index-vector-stores-azurecosmosnosql` [1.3.0]
39+
40+
- CosmosDB insertion timestamp bugfix (#17290)
41+
342
## [2024-12-17]
443

544
### `llama-index-core` [0.12.6]
645

7-
- [bug fix] Ensure that StopEvent gets cleared from Context._in_progress["_done"] after a Workflow run (#17300)
46+
- [bug fix] Ensure that StopEvent gets cleared from Context.\_in_progress["_done"] after a Workflow run (#17300)
847
- fix: add a timeout to langchain callback handler (#17296)
948
- tweak User vs tool in react prompts (#17273)
1049
- refact: Refactor Document to be natively multimodal (#17204)

llama-index-core/llama_index/core/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Init file of LlamaIndex."""
22

3-
__version__ = "0.12.6"
3+
__version__ = "0.12.7"
44

55
import logging
66
from logging import NullHandler

llama-index-core/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ name = "llama-index-core"
4646
packages = [{include = "llama_index"}]
4747
readme = "README.md"
4848
repository = "https://github.com/run-llama/llama_index"
49-
version = "0.12.6"
49+
version = "0.12.7"
5050

5151
[tool.poetry.dependencies]
5252
SQLAlchemy = {extras = ["asyncio"], version = ">=1.4.49"}

llama-index-integrations/agent/llama-index-agent-openai/llama_index/agent/openai/step.py

+19-15
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,6 @@ async def _arun_step(
661661
step, task.extra_state["new_memory"], verbose=self._verbose
662662
)
663663

664-
# TODO: see if we want to do step-based inputs
665664
tools = self.get_tools(task.input)
666665
openai_tools = [tool.metadata.to_openai_tool() for tool in tools]
667666

@@ -670,40 +669,46 @@ async def _arun_step(
670669
task, mode=mode, **llm_chat_kwargs
671670
)
672671

673-
# TODO: implement _should_continue
674672
latest_tool_calls = self.get_latest_tool_calls(task) or []
675673
latest_tool_outputs: List[ToolOutput] = []
676674

677675
if not self._should_continue(
678676
latest_tool_calls, task.extra_state["n_function_calls"]
679677
):
680678
is_done = True
681-
682679
else:
683680
is_done = False
681+
682+
# Validate all tool calls first
684683
for tool_call in latest_tool_calls:
685-
# Some validation
686684
if not isinstance(tool_call, get_args(OpenAIToolCall)):
687685
raise ValueError("Invalid tool_call object")
688-
689686
if tool_call.type != "function":
690687
raise ValueError("Invalid tool type. Unsupported by OpenAI")
691688

692-
# TODO: maybe execute this with multi-threading
693-
return_direct = await self._acall_function(
694-
tools,
695-
tool_call,
696-
task.extra_state["new_memory"],
697-
latest_tool_outputs,
698-
)
689+
# Execute all tool calls in parallel using asyncio.gather
690+
tool_results = await asyncio.gather(
691+
*[
692+
self._acall_function(
693+
tools,
694+
tool_call,
695+
task.extra_state["new_memory"],
696+
latest_tool_outputs,
697+
)
698+
for tool_call in latest_tool_calls
699+
]
700+
)
701+
702+
# Process results
703+
for return_direct in tool_results:
699704
task.extra_state["sources"].append(latest_tool_outputs[-1])
700705

701-
# change function call to the default value, if a custom function was given
702-
# as an argument (none and auto are predefined by OpenAI)
706+
# change function call to the default value if a custom function was given
703707
if tool_choice not in ("auto", "none"):
704708
tool_choice = "auto"
705709
task.extra_state["n_function_calls"] += 1
706710

711+
# If any tool call requests direct return and it's the only call
707712
if return_direct and len(latest_tool_calls) == 1:
708713
is_done = True
709714
response_str = latest_tool_outputs[-1].content
@@ -723,7 +728,6 @@ async def _arun_step(
723728
[
724729
step.get_next_step(
725730
step_id=str(uuid.uuid4()),
726-
# NOTE: input is unused
727731
input=None,
728732
)
729733
]

llama-index-integrations/agent/llama-index-agent-openai/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ exclude = ["**/BUILD"]
2828
license = "MIT"
2929
name = "llama-index-agent-openai"
3030
readme = "README.md"
31-
version = "0.4.0"
31+
version = "0.4.1"
3232

3333
[tool.poetry.dependencies]
3434
python = ">=3.9,<4.0"

0 commit comments

Comments
 (0)