uipath-langchain 0.0.89__py3-none-any.whl → 0.0.90__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of uipath-langchain might be problematic. Click here for more details.
- uipath_langchain/_cli/_runtime/_input.py +7 -5
- uipath_langchain/_cli/_runtime/_output.py +31 -2
- uipath_langchain/_cli/_runtime/_runtime.py +8 -0
- {uipath_langchain-0.0.89.dist-info → uipath_langchain-0.0.90.dist-info}/METADATA +2 -2
- {uipath_langchain-0.0.89.dist-info → uipath_langchain-0.0.90.dist-info}/RECORD +8 -8
- {uipath_langchain-0.0.89.dist-info → uipath_langchain-0.0.90.dist-info}/WHEEL +0 -0
- {uipath_langchain-0.0.89.dist-info → uipath_langchain-0.0.90.dist-info}/entry_points.txt +0 -0
- {uipath_langchain-0.0.89.dist-info → uipath_langchain-0.0.90.dist-info}/licenses/LICENSE +0 -0
|
@@ -58,10 +58,12 @@ class LangGraphInputProcessor:
|
|
|
58
58
|
if not trigger:
|
|
59
59
|
return Command(resume=self.context.input_json)
|
|
60
60
|
|
|
61
|
-
type, key = trigger
|
|
61
|
+
type, key, folder_path, folder_key, payload = trigger
|
|
62
62
|
logger.debug(f"ResumeTrigger: {type} {key}")
|
|
63
63
|
if type == UiPathResumeTriggerType.ACTION.value and key:
|
|
64
|
-
action = self.uipath.actions.
|
|
64
|
+
action = await self.uipath.actions.retrieve_async(
|
|
65
|
+
key, app_folder_key=folder_key, app_folder_path=folder_path
|
|
66
|
+
)
|
|
65
67
|
logger.debug(f"Action: {action}")
|
|
66
68
|
if action.data is None:
|
|
67
69
|
return Command(resume={})
|
|
@@ -95,7 +97,7 @@ class LangGraphInputProcessor:
|
|
|
95
97
|
return Command(resume=try_convert_to_json_format(job.output_arguments))
|
|
96
98
|
return Command(resume=self.context.input_json)
|
|
97
99
|
|
|
98
|
-
async def _get_latest_trigger(self) -> Optional[tuple[str, str]]:
|
|
100
|
+
async def _get_latest_trigger(self) -> Optional[tuple[str, str, str, str, str]]:
|
|
99
101
|
"""Fetch the most recent trigger from the database."""
|
|
100
102
|
if self.context.memory is None:
|
|
101
103
|
return None
|
|
@@ -106,7 +108,7 @@ class LangGraphInputProcessor:
|
|
|
106
108
|
self.context.memory.conn.cursor() as cur,
|
|
107
109
|
):
|
|
108
110
|
await cur.execute(f"""
|
|
109
|
-
SELECT type, key
|
|
111
|
+
SELECT type, key, folder_path, folder_key, payload
|
|
110
112
|
FROM {self.context.resume_triggers_table}
|
|
111
113
|
ORDER BY timestamp DESC
|
|
112
114
|
LIMIT 1
|
|
@@ -114,7 +116,7 @@ class LangGraphInputProcessor:
|
|
|
114
116
|
result = await cur.fetchone()
|
|
115
117
|
if result is None:
|
|
116
118
|
return None
|
|
117
|
-
return cast(tuple[str, str], tuple(result))
|
|
119
|
+
return cast(tuple[str, str, str, str, str], tuple(result))
|
|
118
120
|
except Exception as e:
|
|
119
121
|
raise LangGraphRuntimeError(
|
|
120
122
|
"DB_QUERY_FAILED",
|
|
@@ -232,6 +232,9 @@ class LangGraphOutputProcessor:
|
|
|
232
232
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
233
233
|
type TEXT NOT NULL,
|
|
234
234
|
key TEXT,
|
|
235
|
+
folder_key TEXT,
|
|
236
|
+
folder_path TEXT,
|
|
237
|
+
payload TEXT,
|
|
235
238
|
timestamp DATETIME DEFAULT (strftime('%Y-%m-%d %H:%M:%S', 'now', 'utc'))
|
|
236
239
|
)
|
|
237
240
|
""")
|
|
@@ -280,6 +283,12 @@ class LangGraphOutputProcessor:
|
|
|
280
283
|
app_name=self.interrupt_value.app_name
|
|
281
284
|
if self.interrupt_value.app_name
|
|
282
285
|
else "",
|
|
286
|
+
app_folder_path=self.interrupt_value.app_folder_path
|
|
287
|
+
if self.interrupt_value.app_folder_path
|
|
288
|
+
else "",
|
|
289
|
+
app_folder_key=self.interrupt_value.app_folder_key
|
|
290
|
+
if self.interrupt_value.app_folder_key
|
|
291
|
+
else "",
|
|
283
292
|
app_key=self.interrupt_value.app_key
|
|
284
293
|
if self.interrupt_value.app_key
|
|
285
294
|
else "",
|
|
@@ -295,11 +304,25 @@ class LangGraphOutputProcessor:
|
|
|
295
304
|
self._resume_trigger = UiPathResumeTrigger(
|
|
296
305
|
trigger_type=UiPathResumeTriggerType.ACTION,
|
|
297
306
|
item_key=action.key,
|
|
307
|
+
payload=self.interrupt_value.model_dump_json(),
|
|
308
|
+
folder_path=self.interrupt_value.app_folder_path
|
|
309
|
+
if self.interrupt_value.app_folder_path
|
|
310
|
+
else None,
|
|
311
|
+
folder_key=self.interrupt_value.app_folder_key
|
|
312
|
+
if self.interrupt_value.app_folder_key
|
|
313
|
+
else None,
|
|
298
314
|
)
|
|
299
315
|
elif isinstance(self.interrupt_value, WaitAction):
|
|
300
316
|
self._resume_trigger = UiPathResumeTrigger(
|
|
301
317
|
triggerType=UiPathResumeTriggerType.ACTION,
|
|
302
318
|
itemKey=self.interrupt_value.action.key,
|
|
319
|
+
payload=self.interrupt_value.model_dump_json(),
|
|
320
|
+
folder_path=self.interrupt_value.app_folder_path
|
|
321
|
+
if self.interrupt_value.app_folder_path
|
|
322
|
+
else None,
|
|
323
|
+
folder_key=self.interrupt_value.app_folder_key
|
|
324
|
+
if self.interrupt_value.app_folder_key
|
|
325
|
+
else None,
|
|
303
326
|
)
|
|
304
327
|
|
|
305
328
|
except Exception as e:
|
|
@@ -324,8 +347,14 @@ class LangGraphOutputProcessor:
|
|
|
324
347
|
try:
|
|
325
348
|
logger.debug(f"ResumeTrigger: {trigger_type} {trigger_key}")
|
|
326
349
|
await cur.execute(
|
|
327
|
-
f"INSERT INTO {self.context.resume_triggers_table} (type, key) VALUES (?, ?)",
|
|
328
|
-
(
|
|
350
|
+
f"INSERT INTO {self.context.resume_triggers_table} (type, key, payload, folder_path, folder_key) VALUES (?, ?, ?, ?, ?)",
|
|
351
|
+
(
|
|
352
|
+
trigger_type,
|
|
353
|
+
trigger_key,
|
|
354
|
+
self.resume_trigger.payload,
|
|
355
|
+
self.resume_trigger.folder_path,
|
|
356
|
+
self.resume_trigger.folder_key,
|
|
357
|
+
),
|
|
329
358
|
)
|
|
330
359
|
await self.context.memory.conn.commit()
|
|
331
360
|
except Exception as e:
|
|
@@ -94,6 +94,14 @@ class LangGraphRuntime(UiPathBaseRuntime):
|
|
|
94
94
|
"callbacks": callbacks,
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
recursion_limit = os.environ.get("LANGCHAIN_RECURSION_LIMIT", None)
|
|
98
|
+
max_concurrency = os.environ.get("LANGCHAIN_MAX_CONCURRENCY", None)
|
|
99
|
+
|
|
100
|
+
if recursion_limit is not None:
|
|
101
|
+
graph_config["recursion_limit"] = int(recursion_limit)
|
|
102
|
+
if max_concurrency is not None:
|
|
103
|
+
graph_config["max_concurrency"] = int(max_concurrency)
|
|
104
|
+
|
|
97
105
|
# Stream the output at debug time
|
|
98
106
|
if self.context.job_id is None:
|
|
99
107
|
# Get final chunk while streaming
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath-langchain
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.90
|
|
4
4
|
Summary: UiPath Langchain
|
|
5
5
|
Project-URL: Homepage, https://uipath.com
|
|
6
6
|
Project-URL: Repository, https://github.com/UiPath/uipath-langchain-python
|
|
@@ -25,7 +25,7 @@ Requires-Dist: pydantic-settings>=2.6.0
|
|
|
25
25
|
Requires-Dist: python-dotenv>=1.0.1
|
|
26
26
|
Requires-Dist: requests>=2.23.3
|
|
27
27
|
Requires-Dist: types-requests>=2.32.0.20241016
|
|
28
|
-
Requires-Dist: uipath<2.1.0,>=2.0.
|
|
28
|
+
Requires-Dist: uipath<2.1.0,>=2.0.9
|
|
29
29
|
Provides-Extra: langchain
|
|
30
30
|
Description-Content-Type: text/markdown
|
|
31
31
|
|
|
@@ -6,9 +6,9 @@ uipath_langchain/_cli/cli_run.py,sha256=zMn2P1gB1ogM8_EmZsIhqNpeI9Oc02Z5Gj-oni7e
|
|
|
6
6
|
uipath_langchain/_cli/_runtime/_context.py,sha256=wr4aNn06ReIXmetEZ6b6AnpAt64p13anQ2trZ5Bzgio,807
|
|
7
7
|
uipath_langchain/_cli/_runtime/_escalation.py,sha256=oA5NvZvCo8ngELFJRyhZNM69DxVHrshhMY6CUk_cukQ,8055
|
|
8
8
|
uipath_langchain/_cli/_runtime/_exception.py,sha256=USKkLYkG-dzjX3fEiMMOHnVUpiXJs_xF0OQXCCOvbYM,546
|
|
9
|
-
uipath_langchain/_cli/_runtime/_input.py,sha256=
|
|
10
|
-
uipath_langchain/_cli/_runtime/_output.py,sha256=
|
|
11
|
-
uipath_langchain/_cli/_runtime/_runtime.py,sha256=
|
|
9
|
+
uipath_langchain/_cli/_runtime/_input.py,sha256=gKzPaGW-EzgeAskWJjbCWnfZRLu_BM7lCXkq0XkVGLU,5614
|
|
10
|
+
uipath_langchain/_cli/_runtime/_output.py,sha256=WQSrsvGaaclZ6GLWEh6Nk1Mz1iGaIB45PgIX3DS3AN4,16130
|
|
11
|
+
uipath_langchain/_cli/_runtime/_runtime.py,sha256=M82qhxU6OVrobiaqoktPYEN9HQyK4NjuW9VgrTAxfWs,11803
|
|
12
12
|
uipath_langchain/_cli/_utils/_graph.py,sha256=WLBSJfPc3_C07SqJhePRe17JIc5wcBvEqLviMcNOdTA,6950
|
|
13
13
|
uipath_langchain/_utils/__init__.py,sha256=Sp2qnEXLAp9ftQ09x7CZMenYnpXIIGFJNv8zNN7vAsw,172
|
|
14
14
|
uipath_langchain/_utils/_request_mixin.py,sha256=t_1HWBxqEl-wsSk9ubmIM-8vs9BlNy4ZVBxtDxktn6U,18489
|
|
@@ -33,8 +33,8 @@ uipath_langchain/utils/_request_mixin.py,sha256=WFyTDyAthSci1DRwUwS21I3hLntD7HdV
|
|
|
33
33
|
uipath_langchain/utils/_settings.py,sha256=MhwEVj4gVRSar0RBf2w2hTjO-5Qm-HpCuufqN3gSWjA,3390
|
|
34
34
|
uipath_langchain/utils/_sleep_policy.py,sha256=e9pHdjmcCj4CVoFM1jMyZFelH11YatsgWfpyrfXzKBQ,1251
|
|
35
35
|
uipath_langchain/vectorstores/context_grounding_vectorstore.py,sha256=eTa5sX43-ydB1pj9VNHUPbB-hC36fZK_CGrNe5U2Nrw,9393
|
|
36
|
-
uipath_langchain-0.0.
|
|
37
|
-
uipath_langchain-0.0.
|
|
38
|
-
uipath_langchain-0.0.
|
|
39
|
-
uipath_langchain-0.0.
|
|
40
|
-
uipath_langchain-0.0.
|
|
36
|
+
uipath_langchain-0.0.90.dist-info/METADATA,sha256=BVn0Hp0FpVC3BrXtGBfMNwixP9VapW8dxRyWCJvnutI,3818
|
|
37
|
+
uipath_langchain-0.0.90.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
38
|
+
uipath_langchain-0.0.90.dist-info/entry_points.txt,sha256=FUtzqGOEntlJKMJIXhQUfT7ZTbQmGhke1iCmDWZaQZI,81
|
|
39
|
+
uipath_langchain-0.0.90.dist-info/licenses/LICENSE,sha256=JDpt-uotAkHFmxpwxi6gwx6HQ25e-lG4U_Gzcvgp7JY,1063
|
|
40
|
+
uipath_langchain-0.0.90.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|