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
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[project]
name = "uipath-langchain"
version = "0.5.10"
version = "0.5.11"
description = "Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
dependencies = [
"uipath>=2.6.11,<2.7.0",
"uipath>=2.6.22,<2.7.0",
"uipath-runtime>=0.6.0, <0.7.0",
"langgraph>=1.0.0, <2.0.0",
"langchain-core>=1.2.5, <2.0.0",
Expand Down
3 changes: 3 additions & 0 deletions src/uipath_langchain/agent/tools/process_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from uipath.eval.mocks import mockable
from uipath.platform.common import InvokeProcess

from uipath_langchain.agent.react.job_attachments import get_job_attachments
from uipath_langchain.agent.react.jsonschema_pydantic_converter import create_model
from uipath_langchain.agent.react.types import AgentGraphState
from uipath_langchain.agent.tools.static_args import handle_static_args
Expand Down Expand Up @@ -43,12 +44,14 @@ def create_process_tool(resource: AgentProcessToolResourceConfig) -> StructuredT
example_calls=resource.properties.example_calls,
)
async def process_tool_fn(**kwargs: Any):
attachments = get_job_attachments(input_model, kwargs)
return interrupt(
InvokeProcess(
name=process_name,
input_arguments=kwargs,
process_folder_path=folder_path,
process_folder_key=None,
attachments=attachments,
)
)

Expand Down
12 changes: 5 additions & 7 deletions src/uipath_langchain/runtime/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from langgraph.checkpoint.sqlite.aio import AsyncSqliteSaver
from pydantic import BaseModel
from uipath.core.serialization import serialize_json
from uipath.runtime import UiPathResumeTrigger


Expand Down Expand Up @@ -82,7 +83,6 @@ async def save_triggers(
(runtime_id,),
)

# Insert new triggers
for trigger in triggers:
trigger_data = trigger.model_dump()
trigger_data["payload"] = trigger.payload
Expand All @@ -97,7 +97,7 @@ async def save_triggers(
(
runtime_id,
trigger.interrupt_id,
json.dumps(trigger_data),
serialize_json(trigger_data),
),
)
await self.memory.conn.commit()
Expand Down Expand Up @@ -206,11 +206,9 @@ async def get_value(self, runtime_id: str, namespace: str, key: str) -> Any:
def _dump_value(self, value: str | dict[str, Any] | BaseModel | None) -> str | None:
if value is None:
return None
if isinstance(value, BaseModel):
return "j:" + json.dumps(value.model_dump())
if isinstance(value, dict):
return "j:" + json.dumps(value)
return "s:" + value
if isinstance(value, str):
return "s:" + value
return "j:" + serialize_json(value)

def _load_value(self, raw: str | None) -> Any:
if raw is None:
Expand Down
22 changes: 11 additions & 11 deletions uv.lock

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