uipath-langchain 0.0.123__py3-none-any.whl → 0.0.124__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/_runtime.py +9 -6
- uipath_langchain/_cli/cli_dev.py +41 -0
- uipath_langchain/middlewares.py +2 -0
- {uipath_langchain-0.0.123.dist-info → uipath_langchain-0.0.124.dist-info}/METADATA +3 -2
- {uipath_langchain-0.0.123.dist-info → uipath_langchain-0.0.124.dist-info}/RECORD +8 -7
- {uipath_langchain-0.0.123.dist-info → uipath_langchain-0.0.124.dist-info}/WHEEL +0 -0
- {uipath_langchain-0.0.123.dist-info → uipath_langchain-0.0.124.dist-info}/entry_points.txt +0 -0
- {uipath_langchain-0.0.123.dist-info → uipath_langchain-0.0.124.dist-info}/licenses/LICENSE +0 -0
|
@@ -18,6 +18,7 @@ from uipath._cli._runtime._contracts import (
|
|
|
18
18
|
|
|
19
19
|
from ..._utils import _instrument_traceable_attributes
|
|
20
20
|
from ...tracers import AsyncUiPathTracer
|
|
21
|
+
from .._utils._graph import LangGraphConfig
|
|
21
22
|
from ._context import LangGraphRuntimeContext
|
|
22
23
|
from ._exception import LangGraphRuntimeError
|
|
23
24
|
from ._input import LangGraphInputProcessor
|
|
@@ -190,12 +191,14 @@ class LangGraphRuntime(UiPathBaseRuntime):
|
|
|
190
191
|
) from e
|
|
191
192
|
|
|
192
193
|
if self.context.langgraph_config is None:
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
194
|
+
self.context.langgraph_config = LangGraphConfig()
|
|
195
|
+
if not self.context.langgraph_config.exists:
|
|
196
|
+
raise LangGraphRuntimeError(
|
|
197
|
+
"CONFIG_MISSING",
|
|
198
|
+
"Invalid configuration",
|
|
199
|
+
"Failed to load configuration",
|
|
200
|
+
UiPathErrorCategory.DEPLOYMENT,
|
|
201
|
+
)
|
|
199
202
|
|
|
200
203
|
try:
|
|
201
204
|
self.context.langgraph_config.load_config()
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
from openinference.instrumentation.langchain import (
|
|
5
|
+
LangChainInstrumentor,
|
|
6
|
+
get_current_span,
|
|
7
|
+
)
|
|
8
|
+
from uipath._cli._dev._terminal import UiPathDevTerminal
|
|
9
|
+
from uipath._cli._runtime._contracts import UiPathRuntimeFactory
|
|
10
|
+
from uipath._cli._utils._console import ConsoleLogger
|
|
11
|
+
from uipath._cli.middlewares import MiddlewareResult
|
|
12
|
+
|
|
13
|
+
from ._runtime._context import LangGraphRuntimeContext
|
|
14
|
+
from ._runtime._runtime import LangGraphRuntime
|
|
15
|
+
|
|
16
|
+
console = ConsoleLogger()
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def langgraph_dev_middleware(interface: Optional[str]) -> MiddlewareResult:
|
|
20
|
+
"""Middleware to launch the developer terminal"""
|
|
21
|
+
|
|
22
|
+
try:
|
|
23
|
+
if interface == "terminal":
|
|
24
|
+
runtime_factory = UiPathRuntimeFactory(
|
|
25
|
+
LangGraphRuntime, LangGraphRuntimeContext
|
|
26
|
+
)
|
|
27
|
+
runtime_factory.add_instrumentor(LangChainInstrumentor, get_current_span)
|
|
28
|
+
app = UiPathDevTerminal(runtime_factory)
|
|
29
|
+
asyncio.run(app.run_async())
|
|
30
|
+
else:
|
|
31
|
+
console.error(f"Unknown interface: {interface}")
|
|
32
|
+
except KeyboardInterrupt:
|
|
33
|
+
console.info("Debug session interrupted by user")
|
|
34
|
+
except Exception as e:
|
|
35
|
+
console.error(f"Error occurred: {e}")
|
|
36
|
+
return MiddlewareResult(
|
|
37
|
+
should_continue=False,
|
|
38
|
+
should_include_stacktrace=True,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
return MiddlewareResult(should_continue=False)
|
uipath_langchain/middlewares.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from uipath._cli.middlewares import Middlewares
|
|
2
2
|
|
|
3
|
+
from ._cli.cli_dev import langgraph_dev_middleware
|
|
3
4
|
from ._cli.cli_init import langgraph_init_middleware
|
|
4
5
|
from ._cli.cli_new import langgraph_new_middleware
|
|
5
6
|
from ._cli.cli_run import langgraph_run_middleware
|
|
@@ -10,3 +11,4 @@ def register_middleware():
|
|
|
10
11
|
Middlewares.register("init", langgraph_init_middleware)
|
|
11
12
|
Middlewares.register("run", langgraph_run_middleware)
|
|
12
13
|
Middlewares.register("new", langgraph_new_middleware)
|
|
14
|
+
Middlewares.register("dev", langgraph_dev_middleware)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath-langchain
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.124
|
|
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
|
|
@@ -22,9 +22,10 @@ Requires-Dist: langchain>=0.3.4
|
|
|
22
22
|
Requires-Dist: langgraph-checkpoint-sqlite>=2.0.3
|
|
23
23
|
Requires-Dist: langgraph<0.7.0,>=0.5.0
|
|
24
24
|
Requires-Dist: openai>=1.65.5
|
|
25
|
+
Requires-Dist: openinference-instrumentation-langchain>=0.1.50
|
|
25
26
|
Requires-Dist: pydantic-settings>=2.6.0
|
|
26
27
|
Requires-Dist: python-dotenv>=1.0.1
|
|
27
|
-
Requires-Dist: uipath<2.2.0,>=2.1.
|
|
28
|
+
Requires-Dist: uipath<2.2.0,>=2.1.30
|
|
28
29
|
Provides-Extra: langchain
|
|
29
30
|
Description-Content-Type: text/markdown
|
|
30
31
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
uipath_langchain/__init__.py,sha256=VBrvQn7d3nuOdN7zEnV2_S-uhmkjgEIlXiFVeZxZakQ,80
|
|
2
|
-
uipath_langchain/middlewares.py,sha256=
|
|
2
|
+
uipath_langchain/middlewares.py,sha256=EOWVTr52SFLEf5lzGAvcDN2qbtPsy4_EsFoXlV-cqdY,618
|
|
3
3
|
uipath_langchain/_cli/__init__.py,sha256=juqd9PbXs4yg45zMJ7BHAOPQjb7sgEbWE9InBtGZhfo,24
|
|
4
|
+
uipath_langchain/_cli/cli_dev.py,sha256=VlI8qgCw-63I97tp_9lbXs-CVcNSjpd2sC13YNZAIuU,1401
|
|
4
5
|
uipath_langchain/_cli/cli_init.py,sha256=xhxJ8tuMSrVUNHvltgyPpOrvgMA-wq9shHeYYwvHILs,8199
|
|
5
6
|
uipath_langchain/_cli/cli_new.py,sha256=dL8-Rri6u67ZZdbb4nT38A5xD_Q3fVnG0UK9VSeKaqg,2563
|
|
6
7
|
uipath_langchain/_cli/cli_run.py,sha256=Jr-nxzBaSPQoVrdV1nQBSDVFElFV3N0a0uNDDrdSc8I,3375
|
|
@@ -8,7 +9,7 @@ uipath_langchain/_cli/_runtime/_context.py,sha256=yyzYJDmk2fkH4T5gm4cLGRyXtjLESr
|
|
|
8
9
|
uipath_langchain/_cli/_runtime/_exception.py,sha256=USKkLYkG-dzjX3fEiMMOHnVUpiXJs_xF0OQXCCOvbYM,546
|
|
9
10
|
uipath_langchain/_cli/_runtime/_input.py,sha256=vZ8vfVxvPSaPWmIPghvNx1VRKzbalHsKUMBPiKDvJWM,5492
|
|
10
11
|
uipath_langchain/_cli/_runtime/_output.py,sha256=yJOZPWv2FRUJWv1NRs9JmpB4QMTDXu8jrxoaKrfJvzw,9078
|
|
11
|
-
uipath_langchain/_cli/_runtime/_runtime.py,sha256=
|
|
12
|
+
uipath_langchain/_cli/_runtime/_runtime.py,sha256=E4aEX4eTjK2XymdKYD1fXNz668S4U2CwEmfL7HSNxjo,14692
|
|
12
13
|
uipath_langchain/_cli/_templates/langgraph.json.template,sha256=eeh391Gta_hoRgaNaZ58nW1LNvCVXA7hlAH6l7Veous,107
|
|
13
14
|
uipath_langchain/_cli/_templates/main.py.template,sha256=nMJQIYPlRk90iANfNVpkJ2EQX20Dxsyq92-BucEz_UM,1189
|
|
14
15
|
uipath_langchain/_cli/_utils/_graph.py,sha256=JPShHNl0UQvl4AdjLIqLpNt_JAjpWH9WWF22Gs47Xew,7445
|
|
@@ -29,8 +30,8 @@ uipath_langchain/tracers/_instrument_traceable.py,sha256=0e841zVzcPWjOGtmBx0GeHb
|
|
|
29
30
|
uipath_langchain/tracers/_utils.py,sha256=JOT1tKMdvqjMDtj2WbmbOWMeMlTXBWavxWpogX7KlRA,1543
|
|
30
31
|
uipath_langchain/vectorstores/__init__.py,sha256=w8qs1P548ud1aIcVA_QhBgf_jZDrRMK5Lono78yA8cs,114
|
|
31
32
|
uipath_langchain/vectorstores/context_grounding_vectorstore.py,sha256=TncIXG-YsUlO0R5ZYzWsM-Dj1SVCZbzmo2LraVxXelc,9559
|
|
32
|
-
uipath_langchain-0.0.
|
|
33
|
-
uipath_langchain-0.0.
|
|
34
|
-
uipath_langchain-0.0.
|
|
35
|
-
uipath_langchain-0.0.
|
|
36
|
-
uipath_langchain-0.0.
|
|
33
|
+
uipath_langchain-0.0.124.dist-info/METADATA,sha256=zIj8p28Nc1KOTVJ7wjJNCXbsyMAmbx995lA8GdAoeUs,4235
|
|
34
|
+
uipath_langchain-0.0.124.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
35
|
+
uipath_langchain-0.0.124.dist-info/entry_points.txt,sha256=FUtzqGOEntlJKMJIXhQUfT7ZTbQmGhke1iCmDWZaQZI,81
|
|
36
|
+
uipath_langchain-0.0.124.dist-info/licenses/LICENSE,sha256=JDpt-uotAkHFmxpwxi6gwx6HQ25e-lG4U_Gzcvgp7JY,1063
|
|
37
|
+
uipath_langchain-0.0.124.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|