Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.12.7 #17320

Merged
merged 2 commits into from
Dec 19, 2024
Merged

v0.12.7 #17320

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# ChangeLog

## [2024-12-18]

### `llama-index-core` [0.12.7]

- fix: add a timeout to langchain callback handler (#17296)
- fix: make Document serialization event more backward compatible (#17312)

### `llama-index-embeddings-voyageai` [0.3.4]

- Exposing additional keyword arguments for VoyageAI's embedding model (#17315)

### `llama-index-llms-keywordsai` [0.1.0]

- Added KeywordsAI LLM (#16860)

### `llama-index-llms-oci-genai` [0.4.0]

- Add OCI Generative AI tool calling support (#16888)

### `llama-index-llms-openai` [0.3.11]

- support new o1 models (#17307)

### `llama-index-postprocessor-voyageai-rerank` [0.3.1]

- VoyageAI Reranker optional API Key (#17310)

### `llama-index-vector-stores-azureaisearch` [0.3.1]

- improve async search client handling (#17319)

### `llama-index-vector-stores-azurecosmosmongo` [0.4.0]

- CosmosDB insertion timestamp bugfix (#17290)

### `llama-index-vector-stores-azurecosmosnosql` [1.3.0]

- CosmosDB insertion timestamp bugfix (#17290)

## [2024-12-17]

### `llama-index-core` [0.12.6]
Expand Down
41 changes: 40 additions & 1 deletion docs/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,49 @@
# ChangeLog

## [2024-12-18]

### `llama-index-core` [0.12.7]

- fix: add a timeout to langchain callback handler (#17296)
- fix: make Document serialization event more backward compatible (#17312)

### `llama-index-embeddings-voyageai` [0.3.4]

- Exposing additional keyword arguments for VoyageAI's embedding model (#17315)

### `llama-index-llms-keywordsai` [0.1.0]

- Added KeywordsAI LLM (#16860)

### `llama-index-llms-oci-genai` [0.4.0]

- Add OCI Generative AI tool calling support (#16888)

### `llama-index-llms-openai` [0.3.11]

- support new o1 models (#17307)

### `llama-index-postprocessor-voyageai-rerank` [0.3.1]

- VoyageAI Reranker optional API Key (#17310)

### `llama-index-vector-stores-azureaisearch` [0.3.1]

- improve async search client handling (#17319)

### `llama-index-vector-stores-azurecosmosmongo` [0.4.0]

- CosmosDB insertion timestamp bugfix (#17290)

### `llama-index-vector-stores-azurecosmosnosql` [1.3.0]

- CosmosDB insertion timestamp bugfix (#17290)

## [2024-12-17]

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

- [bug fix] Ensure that StopEvent gets cleared from Context._in_progress["_done"] after a Workflow run (#17300)
- [bug fix] Ensure that StopEvent gets cleared from Context.\_in_progress["_done"] after a Workflow run (#17300)
- fix: add a timeout to langchain callback handler (#17296)
- tweak User vs tool in react prompts (#17273)
- refact: Refactor Document to be natively multimodal (#17204)
Expand Down
2 changes: 1 addition & 1 deletion llama-index-core/llama_index/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Init file of LlamaIndex."""

__version__ = "0.12.6"
__version__ = "0.12.7"

import logging
from logging import NullHandler
Expand Down
2 changes: 1 addition & 1 deletion llama-index-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ name = "llama-index-core"
packages = [{include = "llama_index"}]
readme = "README.md"
repository = "https://github.com/run-llama/llama_index"
version = "0.12.6"
version = "0.12.7"

[tool.poetry.dependencies]
SQLAlchemy = {extras = ["asyncio"], version = ">=1.4.49"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,6 @@ async def _arun_step(
step, task.extra_state["new_memory"], verbose=self._verbose
)

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

Expand All @@ -670,40 +669,46 @@ async def _arun_step(
task, mode=mode, **llm_chat_kwargs
)

# TODO: implement _should_continue
latest_tool_calls = self.get_latest_tool_calls(task) or []
latest_tool_outputs: List[ToolOutput] = []

if not self._should_continue(
latest_tool_calls, task.extra_state["n_function_calls"]
):
is_done = True

else:
is_done = False

# Validate all tool calls first
for tool_call in latest_tool_calls:
# Some validation
if not isinstance(tool_call, get_args(OpenAIToolCall)):
raise ValueError("Invalid tool_call object")

if tool_call.type != "function":
raise ValueError("Invalid tool type. Unsupported by OpenAI")

# TODO: maybe execute this with multi-threading
return_direct = await self._acall_function(
tools,
tool_call,
task.extra_state["new_memory"],
latest_tool_outputs,
)
# Execute all tool calls in parallel using asyncio.gather
tool_results = await asyncio.gather(
*[
self._acall_function(
tools,
tool_call,
task.extra_state["new_memory"],
latest_tool_outputs,
)
for tool_call in latest_tool_calls
]
)

# Process results
for return_direct in tool_results:
task.extra_state["sources"].append(latest_tool_outputs[-1])

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

# If any tool call requests direct return and it's the only call
if return_direct and len(latest_tool_calls) == 1:
is_done = True
response_str = latest_tool_outputs[-1].content
Expand All @@ -723,7 +728,6 @@ async def _arun_step(
[
step.get_next_step(
step_id=str(uuid.uuid4()),
# NOTE: input is unused
input=None,
)
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exclude = ["**/BUILD"]
license = "MIT"
name = "llama-index-agent-openai"
readme = "README.md"
version = "0.4.0"
version = "0.4.1"

[tool.poetry.dependencies]
python = ">=3.9,<4.0"
Expand Down
Loading
Loading