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 sdk/langchain/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[project]
name = "uipath-langchain"
version = "0.0.81"
version = "0.0.82"
description = "UiPath Langchain"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.9"
dependencies = [
"uipath-sdk==0.0.110",
"uipath-sdk==0.0.112",
"langgraph>=0.2.70",
"langchain-core>=0.3.34",
"langgraph-checkpoint-sqlite>=2.0.3",
Expand Down
12 changes: 7 additions & 5 deletions sdk/langchain/uipath_langchain/_cli/_runtime/_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,23 @@ async def process(self) -> Any:
elif type == UiPathResumeTriggerType.JOB.value and key:
job = await self.uipath.jobs.retrieve_async(key)
if (
job.State
and not job.State.lower()
job.state
and not job.state.lower()
== UiPathRuntimeStatus.SUCCESSFUL.value.lower()
):
error_code = "INVOKED_PROCESS_FAILURE"
error_title = "Invoked process did not finish successfully."
error_detail = try_convert_to_json_format(str(job.JobError or job.Info))
error_detail = try_convert_to_json_format(
str(job.job_error or job.info)
)
raise LangGraphRuntimeError(
error_code,
error_title,
error_detail,
UiPathErrorCategory.USER,
)
if job.OutputArguments:
return Command(resume=try_convert_to_json_format(job.OutputArguments))
if job.output_arguments:
return Command(resume=try_convert_to_json_format(job.output_arguments))
return Command(resume=self.context.input_json)

async def _get_latest_trigger(self) -> Optional[tuple[str, str]]:
Expand Down
2 changes: 1 addition & 1 deletion sdk/langchain/uipath_langchain/_cli/_runtime/_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ async def _save_resume_trigger(self) -> None:
elif isinstance(self.interrupt_value, WaitJob):
self._resume_trigger = UiPathResumeTrigger(
triggerType=UiPathResumeTriggerType.JOB,
itemKey=self.interrupt_value.job.Key,
itemKey=self.interrupt_value.job.key,
)
elif self.interrupt_info.type is UiPathResumeTriggerType.ACTION:
if isinstance(self.interrupt_value, CreateAction):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ def _get_relevant_documents(

return [
Document(
page_content=x["content"],
page_content=x.content,
metadata={
"source": x["source"],
"page_number": x["page_number"],
"source": x.source,
"page_number": x.page_number,
},
)
for x in results
Expand Down
Loading
Loading