uipath-langchain 0.0.133__py3-none-any.whl → 0.0.134__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.

@@ -1,16 +1,19 @@
1
1
  import asyncio
2
+ import uuid
2
3
  from typing import List, Optional
3
4
 
4
5
  from openinference.instrumentation.langchain import (
5
6
  LangChainInstrumentor,
6
7
  get_current_span,
7
8
  )
9
+ from uipath._cli._evals._progress_reporter import StudioWebProgressReporter
8
10
  from uipath._cli._evals._runtime import UiPathEvalContext, UiPathEvalRuntime
9
11
  from uipath._cli._runtime._contracts import (
10
12
  UiPathRuntimeFactory,
11
13
  )
12
14
  from uipath._cli._utils._eval_set import EvalHelpers
13
15
  from uipath._cli.middlewares import MiddlewareResult
16
+ from uipath._events._event_bus import EventBus
14
17
  from uipath.eval._helpers import auto_discover_entrypoint
15
18
 
16
19
  from uipath_langchain._cli._runtime._context import LangGraphRuntimeContext
@@ -31,14 +34,16 @@ def langgraph_eval_middleware(
31
34
  should_continue=True
32
35
  ) # Continue with normal flow if no langgraph.json
33
36
 
34
- eval_context = UiPathEvalContext.with_defaults(**kwargs)
35
- eval_context.eval_set = eval_set or EvalHelpers.auto_discover_eval_set()
36
- eval_context.eval_ids = eval_ids
37
-
38
37
  try:
39
38
  _instrument_traceable_attributes()
40
39
 
41
- runtime_entrypoint = entrypoint or auto_discover_entrypoint()
40
+ event_bus = EventBus()
41
+
42
+ if not kwargs.get("no_report", False):
43
+ progress_reporter = StudioWebProgressReporter(
44
+ spans_exporter=LangChainExporter()
45
+ )
46
+ asyncio.run(progress_reporter.subscribe_to_eval_runtime_events(event_bus))
42
47
 
43
48
  def generate_runtime_context(
44
49
  context_entrypoint: str, langgraph_config: LangGraphConfig, **context_kwargs
@@ -48,6 +53,14 @@ def langgraph_eval_middleware(
48
53
  context.entrypoint = context_entrypoint
49
54
  return context
50
55
 
56
+ runtime_entrypoint = entrypoint or auto_discover_entrypoint()
57
+
58
+ eval_context = UiPathEvalContext.with_defaults(
59
+ entrypoint=runtime_entrypoint, execution_id=str(uuid.uuid4()), **kwargs
60
+ )
61
+ eval_context.eval_set = eval_set or EvalHelpers.auto_discover_eval_set()
62
+ eval_context.eval_ids = eval_ids
63
+
51
64
  runtime_factory = UiPathRuntimeFactory(
52
65
  LangGraphRuntime,
53
66
  LangGraphRuntimeContext,
@@ -65,9 +78,10 @@ def langgraph_eval_middleware(
65
78
 
66
79
  async def execute():
67
80
  async with UiPathEvalRuntime.from_eval_context(
68
- factory=runtime_factory, context=eval_context
81
+ factory=runtime_factory, context=eval_context, event_bus=event_bus
69
82
  ) as eval_runtime:
70
83
  await eval_runtime.execute()
84
+ await event_bus.wait_for_all()
71
85
 
72
86
  asyncio.run(execute())
73
87
  return MiddlewareResult(should_continue=False)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath-langchain
3
- Version: 0.0.133
3
+ Version: 0.0.134
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
@@ -26,7 +26,7 @@ Requires-Dist: openai>=1.65.5
26
26
  Requires-Dist: openinference-instrumentation-langchain>=0.1.50
27
27
  Requires-Dist: pydantic-settings>=2.6.0
28
28
  Requires-Dist: python-dotenv>=1.0.1
29
- Requires-Dist: uipath<2.2.0,>=2.1.60
29
+ Requires-Dist: uipath<2.2.0,>=2.1.64
30
30
  Provides-Extra: langchain
31
31
  Description-Content-Type: text/markdown
32
32
 
@@ -2,7 +2,7 @@ uipath_langchain/__init__.py,sha256=VBrvQn7d3nuOdN7zEnV2_S-uhmkjgEIlXiFVeZxZakQ,
2
2
  uipath_langchain/middlewares.py,sha256=6ljfbtWekrYc5G9KWDLSaViJ1DVIaNM-4qeB1BfHywE,731
3
3
  uipath_langchain/_cli/__init__.py,sha256=juqd9PbXs4yg45zMJ7BHAOPQjb7sgEbWE9InBtGZhfo,24
4
4
  uipath_langchain/_cli/cli_dev.py,sha256=3e9RldNGirIk9184NdLK6kDuGeeqZjekTxbSZRtXjBE,1505
5
- uipath_langchain/_cli/cli_eval.py,sha256=mvaKRF-pvxdNa2mk_ude9SYSd_kmMBo-hChlXokXOcw,2795
5
+ uipath_langchain/_cli/cli_eval.py,sha256=OBU8ADax8eF6KKOC8vxqdDR8YbuXiIe_r632p7SzveA,3386
6
6
  uipath_langchain/_cli/cli_init.py,sha256=xhxJ8tuMSrVUNHvltgyPpOrvgMA-wq9shHeYYwvHILs,8199
7
7
  uipath_langchain/_cli/cli_new.py,sha256=KKLxCzz7cDQ__rRr_a496IHWlSQXhmrBNgmKHnXAnTY,2336
8
8
  uipath_langchain/_cli/cli_run.py,sha256=hRcoXJgOIFceCswzTfZKyzqVee3j-oSh-13EfuQmmE8,2614
@@ -34,8 +34,8 @@ uipath_langchain/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
34
34
  uipath_langchain/tools/preconfigured.py,sha256=Ucl9mta_su66j-5uOC-vZzyc3V2-Em6q9WO1qsmQv48,6291
35
35
  uipath_langchain/vectorstores/__init__.py,sha256=w8qs1P548ud1aIcVA_QhBgf_jZDrRMK5Lono78yA8cs,114
36
36
  uipath_langchain/vectorstores/context_grounding_vectorstore.py,sha256=TncIXG-YsUlO0R5ZYzWsM-Dj1SVCZbzmo2LraVxXelc,9559
37
- uipath_langchain-0.0.133.dist-info/METADATA,sha256=zcSdl4I5iJsBi0jOf7IUUprBv39KfQZyrM1EzVH1OCQ,4275
38
- uipath_langchain-0.0.133.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
39
- uipath_langchain-0.0.133.dist-info/entry_points.txt,sha256=FUtzqGOEntlJKMJIXhQUfT7ZTbQmGhke1iCmDWZaQZI,81
40
- uipath_langchain-0.0.133.dist-info/licenses/LICENSE,sha256=JDpt-uotAkHFmxpwxi6gwx6HQ25e-lG4U_Gzcvgp7JY,1063
41
- uipath_langchain-0.0.133.dist-info/RECORD,,
37
+ uipath_langchain-0.0.134.dist-info/METADATA,sha256=jqUMjAKUcTSiZQNCXpW2OF5jhoSzvkziuuG2nE7Vtu4,4275
38
+ uipath_langchain-0.0.134.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
39
+ uipath_langchain-0.0.134.dist-info/entry_points.txt,sha256=FUtzqGOEntlJKMJIXhQUfT7ZTbQmGhke1iCmDWZaQZI,81
40
+ uipath_langchain-0.0.134.dist-info/licenses/LICENSE,sha256=JDpt-uotAkHFmxpwxi6gwx6HQ25e-lG4U_Gzcvgp7JY,1063
41
+ uipath_langchain-0.0.134.dist-info/RECORD,,