Skip to content

Commit 2d10cc6

Browse files
committed
chore: move to uipath 2.0.1
1 parent aa36cdb commit 2d10cc6

File tree

16 files changed

+860
-790
lines changed

16 files changed

+860
-790
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -34,36 +34,8 @@ See `just --list` for linting, formatting and build commands.
3434
### Use SDK Locally
3535
1. Create a folder on your own device `mkdir project; cd project`
3636
2. Initialize the python project `uv` `uv init . --python 3.9`
37-
3. Obtain the project path `PATH_TO_SDK=/Users/YOU_USER/platform-sdk/sdk/core`
37+
3. Obtain the project path `PATH_TO_SDK=/Users/YOU_USER/uipath-langchain/`
3838
4. Install the sdk in editable mode `uv add --editable ${PATH_TO_SDK}`
3939

40-
:information_source: Instead of cloning the project into `.venv/lib/python3.9/site-packages/uipath_sdk`, this mode creates a file named `_uipath_sdk.pth` inside `.venv/lib/python3.9/site-packages`. This file contains the value of `PATH_TO_SDK`, which is added to `sys.path`—the list of directories where python searches for packages. (Run `python -c 'import sys; print(sys.path)'` to see the entries.)
40+
:information_source: Instead of cloning the project into `.venv/lib/python3.9/site-packages/uipath_langchain`, this mode creates a file named `_uipath_langchain.pth` inside `.venv/lib/python3.9/site-packages`. This file contains the value of `PATH_TO_SDK`, which is added to `sys.path`—the list of directories where python searches for packages. (Run `python -c 'import sys; print(sys.path)'` to see the entries.)
4141

42-
## API Style Guide
43-
44-
### General Rule:
45-
- use key instead of ID
46-
47-
### Standard Methods & Naming Conventions
48-
49-
#### Retrieve a Single Resource
50-
- **Method Name:** `retrieve` instead of get
51-
- **Usage:** To obtain a specific resource instance using its unique identifier (using *key* instead of ID).
52-
- **Extended:**
53-
- `retrieve_by_[field_name]` (for fields other than key)
54-
55-
#### List Multiple Resources
56-
- **Method Name:** `list`
57-
- **Usage:** To fetch a collection of resources, optionally filtered by query parameters.
58-
- **Example:**
59-
```python
60-
resources = Resource.list(filters={})
61-
```
62-
63-
#### Create a Resource
64-
- **Method Name:** `create`
65-
- **Usage:** To add a new resource to the system.
66-
67-
#### Update a Resource
68-
- **Method Name:** `update`
69-
- **Usage:** To modify an existing resource.

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[project]
22
name = "uipath-langchain"
3-
version = "0.0.86"
3+
version = "0.0.87"
44
description = "UiPath Langchain"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.10"
77
dependencies = [
8-
"uipath-sdk==0.0.112",
8+
"uipath==2.0.1",
99
"langgraph>=0.2.70",
1010
"langchain-core>=0.3.34",
1111
"langgraph-checkpoint-sqlite>=2.0.3",
12-
"langchain-community>=0.3.18",
12+
"langchain-community>=0.3.21",
1313
"langchain-openai>=0.3.3",
1414
"langchain>=0.3.4",
1515
"requests>=2.23.3",
@@ -33,7 +33,7 @@ maintainers = [
3333
{ name = "Cristian Pufu", email = "cristian.pufu@uipath.com" }
3434
]
3535

36-
[project.entry-points."uipath_sdk.middlewares"]
36+
[project.entry-points."uipath.middlewares"]
3737
register = "uipath_langchain.middlewares:register_middleware"
3838

3939
[project.urls]

samples/multi-agent-planner-researcher-coder-distributed/src/multi-agent-distributed/planner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from langgraph.types import Command, interrupt
99
from pydantic import BaseModel, Field
1010
from typing_extensions import TypedDict
11-
from uipath_sdk._models import InvokeProcess
11+
from uipath._models import InvokeProcess
1212

1313
worker_agents = {"researcher": "researcher-agent", "coder": "coder-agent"}
1414
agent_names = list(worker_agents.values())

src/uipath_langchain/_cli/_runtime/_context.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from langgraph.checkpoint.sqlite.aio import AsyncSqliteSaver
44
from langgraph.graph import StateGraph
5-
from uipath_sdk._cli._runtime._contracts import UiPathRuntimeContext
5+
from uipath._cli._runtime._contracts import UiPathRuntimeContext
66

77
from .._utils._graph import LangGraphConfig
88

src/uipath_langchain/_cli/_runtime/_escalation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from pathlib import Path
44
from typing import Any, Dict, Optional, Union
55

6-
from uipath_sdk import UiPathSDK
7-
from uipath_sdk._models.actions import Action
6+
from uipath import UiPath
7+
from uipath._models.actions import Action
88

99
logger = logging.getLogger(__name__)
1010

@@ -230,7 +230,7 @@ async def create(self, value: Any) -> Optional[Action]:
230230
return None
231231

232232
try:
233-
uipath = UiPathSDK()
233+
uipath = UiPath()
234234
action = uipath.actions.create(
235235
title=self._config.get("title", "Default escalation"),
236236
app_name=self._config.get("appName"),

src/uipath_langchain/_cli/_runtime/_exception.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Optional
22

3-
from uipath_sdk._cli._runtime._contracts import UiPathErrorCategory, UiPathRuntimeError
3+
from uipath._cli._runtime._contracts import UiPathErrorCategory, UiPathRuntimeError
44

55

66
class LangGraphRuntimeError(UiPathRuntimeError):

src/uipath_langchain/_cli/_runtime/_input.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from typing import Any, Optional, cast
44

55
from langgraph.types import Command
6-
from uipath_sdk import UiPathSDK
7-
from uipath_sdk._cli._runtime._contracts import (
6+
from uipath import UiPath
7+
from uipath._cli._runtime._contracts import (
88
UiPathErrorCategory,
99
UiPathResumeTriggerType,
1010
UiPathRuntimeStatus,
@@ -39,7 +39,7 @@ def __init__(self, context: LangGraphRuntimeContext):
3939
"""
4040
self.context = context
4141
self.escalation = Escalation(self.context.config_path)
42-
self.uipath = UiPathSDK()
42+
self.uipath = UiPath()
4343

4444
async def process(self) -> Any:
4545
"""

src/uipath_langchain/_cli/_runtime/_output.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
from typing import Any, Dict, Optional, Union, cast
77

88
from langgraph.types import Interrupt, StateSnapshot
9-
from uipath_sdk import UiPathSDK
10-
from uipath_sdk._cli._runtime._contracts import (
9+
from uipath import UiPath
10+
from uipath._cli._runtime._contracts import (
1111
UiPathApiTrigger,
1212
UiPathErrorCategory,
1313
UiPathResumeTrigger,
1414
UiPathResumeTriggerType,
1515
UiPathRuntimeResult,
1616
UiPathRuntimeStatus,
1717
)
18-
from uipath_sdk._models import CreateAction, InvokeProcess, WaitAction, WaitJob
19-
from uipath_sdk._models.actions import Action
18+
from uipath._models import CreateAction, InvokeProcess, WaitAction, WaitJob
19+
from uipath._models.actions import Action
2020

2121
from ._context import LangGraphRuntimeContext
2222
from ._escalation import Escalation
@@ -256,7 +256,7 @@ async def _save_resume_trigger(self) -> None:
256256
)
257257
return
258258
if isinstance(self.interrupt_info, InterruptInfo):
259-
uipath_sdk = UiPathSDK()
259+
uipath_sdk = UiPath()
260260
if self.interrupt_info.type is UiPathResumeTriggerType.JOB:
261261
if isinstance(self.interrupt_value, InvokeProcess):
262262
job = await uipath_sdk.processes.invoke_async(

src/uipath_langchain/_cli/_runtime/_runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from langgraph.checkpoint.sqlite.aio import AsyncSqliteSaver
99
from langgraph.errors import EmptyInputError, GraphRecursionError, InvalidUpdateError
1010
from langgraph.graph.state import CompiledStateGraph
11-
from uipath_sdk._cli._runtime._contracts import (
11+
from uipath._cli._runtime._contracts import (
1212
UiPathBaseRuntime,
1313
UiPathErrorCategory,
1414
UiPathRuntimeResult,

src/uipath_langchain/_cli/cli_init.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from typing import Any, Dict
66

77
from langgraph.graph.state import CompiledStateGraph
8-
from uipath_sdk._cli._utils._parse_ast import generate_bindings_json # type: ignore
9-
from uipath_sdk._cli.middlewares import MiddlewareResult
8+
from uipath._cli._utils._parse_ast import generate_bindings_json # type: ignore
9+
from uipath._cli.middlewares import MiddlewareResult
1010

1111
from ._utils._graph import LangGraphConfig
1212

0 commit comments

Comments
 (0)