Skip to content

Commit 8685c72

Browse files
committed
feat: configurable recursion_limit and max_concurrency
1 parent 86343b7 commit 8685c72

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/uipath_langchain/_cli/_runtime/_runtime.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import json
22
import logging
3+
import os
34
from typing import List, Optional
45

56
from langchain_core.callbacks.base import BaseCallbackHandler
@@ -88,6 +89,14 @@ async def execute(self) -> Optional[UiPathRuntimeResult]:
8889
"callbacks": callbacks,
8990
}
9091

92+
recursion_limit = os.environ.get("LANGCHAIN_RECURSION_LIMIT", None)
93+
max_concurrency = os.environ.get("LANGCHAIN_MAX_CONCURRENCY", None)
94+
95+
if recursion_limit is not None:
96+
graph_config["recursion_limit"] = int(recursion_limit)
97+
if max_concurrency is not None:
98+
graph_config["max_concurrency"] = int(max_concurrency)
99+
91100
# Stream the output at debug time
92101
if self.context.job_id is None:
93102
# Get final chunk while streaming

0 commit comments

Comments
 (0)