Skip to content

Commit 7ba9ed4

Browse files
authored
Merge pull request #48 from UiPath/fix/add_agenthub
feat(llm): add agenthub
2 parents cbcbc4b + 6cc0c59 commit 7ba9ed4

6 files changed

Lines changed: 1837 additions & 1642 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-llamaindex"
3-
version = "0.0.28"
3+
version = "0.0.29"
44
description = "UiPath LlamaIndex SDK"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.10"
@@ -9,7 +9,7 @@ dependencies = [
99
"llama-index-embeddings-azure-openai>=0.3.8",
1010
"llama-index-llms-azure-openai>=0.3.2",
1111
"openinference-instrumentation-llama-index>=4.3.0",
12-
"uipath>=2.0.71, <2.1.0",
12+
"uipath>=2.0.75, <2.1.0",
1313
]
1414
classifiers = [
1515
"Development Status :: 3 - Alpha",

src/uipath_llamaindex/_cli/_runtime/_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ class UiPathLlamaIndexRuntimeContext(UiPathRuntimeContext):
1111

1212
config: Optional[LlamaIndexConfig] = None
1313
workflow: Optional[Workflow] = None
14-
workflow_context: Optional[Context] = None
14+
workflow_context: Optional[Context] = None # type: ignore[type-arg]
1515
resumed_trigger: Optional[UiPathResumeTrigger] = None

src/uipath_llamaindex/_cli/_runtime/_runtime.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
HumanResponseEvent,
1111
InputRequiredEvent,
1212
JsonPickleSerializer,
13+
WorkflowTimeoutError,
1314
)
14-
from llama_index.core.workflow.errors import WorkflowTimeoutError
15-
from llama_index.core.workflow.handler import WorkflowHandler
15+
from llama_index.core.workflow.handler import WorkflowHandler # type: ignore
1616
from openinference.instrumentation.llama_index import (
1717
LlamaIndexInstrumentor,
1818
get_current_span,

src/uipath_llamaindex/_cli/cli_init.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
import uuid
55
from typing import Any, Callable, Dict, overload
66

7-
from llama_index.core.workflow import StopEvent, Workflow
8-
from llama_index.core.workflow.drawing import StepConfig # type: ignore
9-
from llama_index.core.workflow.events import (
7+
from llama_index.core.workflow import (
108
HumanResponseEvent,
119
InputRequiredEvent,
10+
StopEvent,
11+
Workflow,
1212
)
13-
from llama_index.core.workflow.utils import (
13+
from llama_index.core.workflow.drawing import StepConfig # type: ignore
14+
from llama_index.core.workflow.utils import ( # type: ignore
1415
get_steps_from_class,
1516
get_steps_from_instance,
1617
)

src/uipath_llamaindex/llms/_openai_llms.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import Any, Union
44

55
from llama_index.llms.azure_openai import AzureOpenAI # type: ignore
6+
from uipath.utils import EndpointManager
67

78

89
class OpenAIModel(Enum):
@@ -42,7 +43,7 @@ def __init__(
4243
defaults = {
4344
"model": model_value,
4445
"deployment_name": model_value,
45-
"azure_endpoint": f"{base_url}/llmgateway_/",
46+
"azure_endpoint": f"{base_url}/{EndpointManager.get_passthrough_endpoint().format(model=model, api_version=api_version)}",
4647
"api_key": os.environ.get("UIPATH_ACCESS_TOKEN"),
4748
"api_version": api_version,
4849
"is_chat_model": True,

0 commit comments

Comments
 (0)