Skip to content
Merged
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
2 changes: 1 addition & 1 deletion packages/uipath-llamaindex/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath-llamaindex"
version = "0.5.9"
version = "0.5.10"
description = "Python SDK that enables developers to build and deploy LlamaIndex agents to the UiPath Cloud Platform"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
Expand Down
12 changes: 12 additions & 0 deletions packages/uipath-llamaindex/src/uipath_llamaindex/llms/_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from typing import Any

import httpx
from llama_index.core.base.llms.types import ChatResponse
from llama_index.core.tools import ToolSelection
from llama_index.llms.azure_openai import AzureOpenAI # type: ignore
from uipath._utils._ssl_context import get_httpx_client_kwargs
from uipath.utils import EndpointManager
Expand Down Expand Up @@ -87,3 +89,13 @@ def __init__(
}
final_kwargs = {**defaults, **kwargs}
super().__init__(**final_kwargs)

def get_tool_calls_from_response(
self,
response: ChatResponse,
error_on_no_tool_call: bool = False,
**kwargs: Any,
) -> list[ToolSelection]:
return super().get_tool_calls_from_response(
response, error_on_no_tool_call=error_on_no_tool_call, **kwargs
)
11 changes: 11 additions & 0 deletions packages/uipath-llamaindex/src/uipath_llamaindex/llms/bedrock.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def _check_bedrock_dependencies() -> None:
llm_chat_callback,
llm_completion_callback,
)
from llama_index.core.tools import ToolSelection # noqa: E402
from llama_index.llms.bedrock import Bedrock # type: ignore[import-untyped]
from llama_index.llms.bedrock_converse import ( # type: ignore[import-untyped]
BedrockConverse,
Expand Down Expand Up @@ -184,6 +185,16 @@ def __init__(
**kwargs,
)

def get_tool_calls_from_response(
self,
response: ChatResponse,
error_on_no_tool_call: bool = False,
**kwargs: Any,
) -> list[ToolSelection]:
return super().get_tool_calls_from_response(
response, error_on_no_tool_call=error_on_no_tool_call, **kwargs
)


class UiPathChatBedrock(Bedrock):
def __init__(
Expand Down
11 changes: 11 additions & 0 deletions packages/uipath-llamaindex/src/uipath_llamaindex/llms/vertex.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def _check_vertex_dependencies() -> None:
llm_chat_callback,
llm_completion_callback,
)
from llama_index.core.tools import ToolSelection # noqa: E402
from llama_index.llms.google_genai import GoogleGenAI # noqa: E402


Expand Down Expand Up @@ -410,3 +411,13 @@ async def gen() -> ChatResponseAsyncGen:
)

return gen()

def get_tool_calls_from_response(
self,
response: ChatResponse,
error_on_no_tool_call: bool = False,
**kwargs: Any,
) -> list[ToolSelection]:
return super().get_tool_calls_from_response(
response, error_on_no_tool_call=error_on_no_tool_call, **kwargs
)
2 changes: 1 addition & 1 deletion packages/uipath-llamaindex/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading