uipath-langchain 0.0.114__py3-none-any.whl → 0.0.116__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/_context.py +1 -1
- uipath_langchain/_cli/_runtime/_runtime.py +3 -1
- uipath_langchain/_cli/_utils/_graph.py +6 -2
- uipath_langchain/_cli/cli_init.py +3 -1
- uipath_langchain/_utils/_request_mixin.py +9 -4
- uipath_langchain/embeddings/embeddings.py +2 -1
- {uipath_langchain-0.0.114.dist-info → uipath_langchain-0.0.116.dist-info}/METADATA +2 -2
- {uipath_langchain-0.0.114.dist-info → uipath_langchain-0.0.116.dist-info}/RECORD +11 -11
- {uipath_langchain-0.0.114.dist-info → uipath_langchain-0.0.116.dist-info}/WHEEL +0 -0
- {uipath_langchain-0.0.114.dist-info → uipath_langchain-0.0.116.dist-info}/entry_points.txt +0 -0
- {uipath_langchain-0.0.114.dist-info → uipath_langchain-0.0.116.dist-info}/licenses/LICENSE +0 -0
|
@@ -11,7 +11,7 @@ class LangGraphRuntimeContext(UiPathRuntimeContext):
|
|
|
11
11
|
"""Context information passed throughout the runtime execution."""
|
|
12
12
|
|
|
13
13
|
langgraph_config: Optional[LangGraphConfig] = None
|
|
14
|
-
state_graph: Optional[StateGraph] = None
|
|
14
|
+
state_graph: Optional[StateGraph[Any, Any]] = None
|
|
15
15
|
output: Optional[Any] = None
|
|
16
16
|
state: Optional[Any] = (
|
|
17
17
|
None # TypedDict issue, the actual type is: Optional[langgraph.types.StateSnapshot]
|
|
@@ -271,7 +271,9 @@ class LangGraphRuntime(UiPathBaseRuntime):
|
|
|
271
271
|
if hasattr(self, "graph_config") and self.graph_config:
|
|
272
272
|
await self.graph_config.cleanup()
|
|
273
273
|
|
|
274
|
-
def _extract_graph_result(
|
|
274
|
+
def _extract_graph_result(
|
|
275
|
+
self, final_chunk, graph: CompiledStateGraph[Any, Any, Any]
|
|
276
|
+
):
|
|
275
277
|
"""
|
|
276
278
|
Extract the result from a LangGraph output chunk according to the graph's output channels.
|
|
277
279
|
|
|
@@ -21,14 +21,18 @@ class GraphConfig:
|
|
|
21
21
|
path: str
|
|
22
22
|
file_path: str
|
|
23
23
|
graph_var: str
|
|
24
|
-
_graph: Optional[Union[StateGraph, CompiledStateGraph]] =
|
|
24
|
+
_graph: Optional[Union[StateGraph[Any, Any], CompiledStateGraph[Any, Any, Any]]] = (
|
|
25
|
+
None
|
|
26
|
+
)
|
|
25
27
|
|
|
26
28
|
@classmethod
|
|
27
29
|
def from_config(cls, name: str, path: str) -> "GraphConfig":
|
|
28
30
|
file_path, graph_var = path.split(":")
|
|
29
31
|
return cls(name=name, path=path, file_path=file_path, graph_var=graph_var)
|
|
30
32
|
|
|
31
|
-
async def load_graph(
|
|
33
|
+
async def load_graph(
|
|
34
|
+
self,
|
|
35
|
+
) -> Union[StateGraph[Any, Any], CompiledStateGraph[Any, Any, Any]]:
|
|
32
36
|
"""Load graph from the specified path"""
|
|
33
37
|
try:
|
|
34
38
|
cwd = os.path.abspath(os.getcwd())
|
|
@@ -54,7 +54,9 @@ def process_nullable_types(
|
|
|
54
54
|
return schema
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
def generate_schema_from_graph(
|
|
57
|
+
def generate_schema_from_graph(
|
|
58
|
+
graph: CompiledStateGraph[Any, Any, Any],
|
|
59
|
+
) -> Dict[str, Any]:
|
|
58
60
|
"""Extract input/output schema from a LangGraph graph"""
|
|
59
61
|
schema = {
|
|
60
62
|
"input": {"type": "object", "properties": {}, "required": []},
|
|
@@ -17,6 +17,7 @@ from tenacity import (
|
|
|
17
17
|
stop_after_attempt,
|
|
18
18
|
wait_exponential_jitter,
|
|
19
19
|
)
|
|
20
|
+
from uipath._utils._ssl_context import get_httpx_client_kwargs
|
|
20
21
|
|
|
21
22
|
from uipath_langchain._utils._settings import (
|
|
22
23
|
UiPathClientFactorySettings,
|
|
@@ -83,13 +84,13 @@ class UiPathRequestMixin(BaseModel):
|
|
|
83
84
|
default_factory=lambda data: getattr(
|
|
84
85
|
data["settings"], "requesting_product", None
|
|
85
86
|
)
|
|
86
|
-
or os.getenv("UIPATH_REQUESTING_PRODUCT", "")
|
|
87
|
+
or os.getenv("UIPATH_REQUESTING_PRODUCT", "uipath-python-sdk")
|
|
87
88
|
)
|
|
88
89
|
requesting_feature: Any = Field(
|
|
89
90
|
default_factory=lambda data: getattr(
|
|
90
91
|
data["settings"], "requesting_feature", None
|
|
91
92
|
)
|
|
92
|
-
or os.getenv("UIPATH_REQUESTING_FEATURE", "")
|
|
93
|
+
or os.getenv("UIPATH_REQUESTING_FEATURE", "langgraph-agent")
|
|
93
94
|
)
|
|
94
95
|
default_request_timeout: Any = Field(
|
|
95
96
|
default_factory=lambda data: float(
|
|
@@ -135,11 +136,13 @@ class UiPathRequestMixin(BaseModel):
|
|
|
135
136
|
"""Run an asynchronous call to the LLM."""
|
|
136
137
|
# if self.logger:
|
|
137
138
|
# self.logger.info(f"Completion request: {request_body['messages'][:2]}")
|
|
139
|
+
client_kwargs = get_httpx_client_kwargs()
|
|
138
140
|
with httpx.Client(
|
|
141
|
+
**client_kwargs, # Apply SSL configuration
|
|
139
142
|
event_hooks={
|
|
140
143
|
"request": [self._log_request_duration],
|
|
141
144
|
"response": [self._log_response_duration],
|
|
142
|
-
}
|
|
145
|
+
},
|
|
143
146
|
) as client:
|
|
144
147
|
response = client.post(
|
|
145
148
|
url,
|
|
@@ -212,11 +215,13 @@ class UiPathRequestMixin(BaseModel):
|
|
|
212
215
|
) -> Dict[str, Any]:
|
|
213
216
|
# if self.logger:
|
|
214
217
|
# self.logger.info(f"Completion request: {request_body['messages'][:2]}")
|
|
218
|
+
client_kwargs = get_httpx_client_kwargs()
|
|
215
219
|
async with httpx.AsyncClient(
|
|
220
|
+
**client_kwargs, # Apply SSL configuration
|
|
216
221
|
event_hooks={
|
|
217
222
|
"request": [self._alog_request_duration],
|
|
218
223
|
"response": [self._alog_response_duration],
|
|
219
|
-
}
|
|
224
|
+
},
|
|
220
225
|
) as client:
|
|
221
226
|
response = await client.post(
|
|
222
227
|
url,
|
|
@@ -59,7 +59,7 @@ class UiPathOpenAIEmbeddings(UiPathRequestMixin, OpenAIEmbeddings):
|
|
|
59
59
|
)
|
|
60
60
|
|
|
61
61
|
def embed_documents(
|
|
62
|
-
self, texts: List[str], chunk_size: Optional[int] = None
|
|
62
|
+
self, texts: List[str], chunk_size: Optional[int] = None, **kwargs
|
|
63
63
|
) -> List[List[float]]:
|
|
64
64
|
"""Embed a list of documents using the UiPath."""
|
|
65
65
|
embeddings = []
|
|
@@ -83,6 +83,7 @@ class UiPathOpenAIEmbeddings(UiPathRequestMixin, OpenAIEmbeddings):
|
|
|
83
83
|
self,
|
|
84
84
|
texts: List[str],
|
|
85
85
|
chunk_size: Optional[int] = None,
|
|
86
|
+
**kwargs,
|
|
86
87
|
) -> List[List[float]]:
|
|
87
88
|
"""Async version of embed_documents."""
|
|
88
89
|
embeddings = []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath-langchain
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.116
|
|
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
|
|
@@ -24,7 +24,7 @@ Requires-Dist: langgraph>=0.2.70
|
|
|
24
24
|
Requires-Dist: openai>=1.65.5
|
|
25
25
|
Requires-Dist: pydantic-settings>=2.6.0
|
|
26
26
|
Requires-Dist: python-dotenv>=1.0.1
|
|
27
|
-
Requires-Dist: uipath<2.1.0,>=2.0.
|
|
27
|
+
Requires-Dist: uipath<2.1.0,>=2.0.77
|
|
28
28
|
Provides-Extra: langchain
|
|
29
29
|
Description-Content-Type: text/markdown
|
|
30
30
|
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
uipath_langchain/__init__.py,sha256=VBrvQn7d3nuOdN7zEnV2_S-uhmkjgEIlXiFVeZxZakQ,80
|
|
2
2
|
uipath_langchain/middlewares.py,sha256=tre7o9DFMgWk1DJiEEUmT6_wiP-PPkWtKmG0iOyvr9c,509
|
|
3
3
|
uipath_langchain/_cli/__init__.py,sha256=juqd9PbXs4yg45zMJ7BHAOPQjb7sgEbWE9InBtGZhfo,24
|
|
4
|
-
uipath_langchain/_cli/cli_init.py,sha256=
|
|
4
|
+
uipath_langchain/_cli/cli_init.py,sha256=xhxJ8tuMSrVUNHvltgyPpOrvgMA-wq9shHeYYwvHILs,8199
|
|
5
5
|
uipath_langchain/_cli/cli_new.py,sha256=dL8-Rri6u67ZZdbb4nT38A5xD_Q3fVnG0UK9VSeKaqg,2563
|
|
6
6
|
uipath_langchain/_cli/cli_run.py,sha256=rGuYp9AEJdhHclOCFPX100Mo0kaDYt6e6pIKBgbS6ek,3023
|
|
7
|
-
uipath_langchain/_cli/_runtime/_context.py,sha256=
|
|
7
|
+
uipath_langchain/_cli/_runtime/_context.py,sha256=yyzYJDmk2fkH4T5gm4cLGRyXtjLESrpzHBT9euqluTA,817
|
|
8
8
|
uipath_langchain/_cli/_runtime/_exception.py,sha256=USKkLYkG-dzjX3fEiMMOHnVUpiXJs_xF0OQXCCOvbYM,546
|
|
9
9
|
uipath_langchain/_cli/_runtime/_input.py,sha256=vZ8vfVxvPSaPWmIPghvNx1VRKzbalHsKUMBPiKDvJWM,5492
|
|
10
10
|
uipath_langchain/_cli/_runtime/_output.py,sha256=yJOZPWv2FRUJWv1NRs9JmpB4QMTDXu8jrxoaKrfJvzw,9078
|
|
11
|
-
uipath_langchain/_cli/_runtime/_runtime.py,sha256=
|
|
11
|
+
uipath_langchain/_cli/_runtime/_runtime.py,sha256=y12VlDl6wC53458acFvI9zikGV5epEfOm2YEW9ezSQg,13910
|
|
12
12
|
uipath_langchain/_cli/_templates/langgraph.json.template,sha256=eeh391Gta_hoRgaNaZ58nW1LNvCVXA7hlAH6l7Veous,107
|
|
13
13
|
uipath_langchain/_cli/_templates/main.py.template,sha256=nMJQIYPlRk90iANfNVpkJ2EQX20Dxsyq92-BucEz_UM,1189
|
|
14
|
-
uipath_langchain/_cli/_utils/_graph.py,sha256=
|
|
14
|
+
uipath_langchain/_cli/_utils/_graph.py,sha256=2FrlU4bMuEzcHglXzIC54IB8jw55SlENF-SVcpwWsS0,7167
|
|
15
15
|
uipath_langchain/_utils/__init__.py,sha256=WoY66enCygRXTh6v5B1UrRcFCnQYuPJ8oqDkwomXzLc,194
|
|
16
|
-
uipath_langchain/_utils/_request_mixin.py,sha256=
|
|
16
|
+
uipath_langchain/_utils/_request_mixin.py,sha256=ivibguFxM5y-Nlm_mg5UBx4gL0DBq03iKLpWf0THCw4,18798
|
|
17
17
|
uipath_langchain/_utils/_settings.py,sha256=mCJ2-XXfpedjxT7DSXINPITHrXzQJCESgNo-nz3irDk,3450
|
|
18
18
|
uipath_langchain/_utils/_sleep_policy.py,sha256=e9pHdjmcCj4CVoFM1jMyZFelH11YatsgWfpyrfXzKBQ,1251
|
|
19
19
|
uipath_langchain/chat/__init__.py,sha256=WDcvy91ixvZ3Mq7Ae94g5CjyQwXovDBnEv1NlD5SXBE,116
|
|
20
20
|
uipath_langchain/chat/models.py,sha256=sLz8yzEMUMSNsCFyywRxFwe2JisR3TP-n1vbeRKl9H8,10225
|
|
21
21
|
uipath_langchain/embeddings/__init__.py,sha256=QICtYB58ZyqFfDQrEaO8lTEgAU5NuEKlR7iIrS0OBtc,156
|
|
22
|
-
uipath_langchain/embeddings/embeddings.py,sha256=
|
|
22
|
+
uipath_langchain/embeddings/embeddings.py,sha256=3xyb7voPwBFrn--iaW2fuuRb7Q7JyHR8WU906a5SMUU,4302
|
|
23
23
|
uipath_langchain/retrievers/__init__.py,sha256=rOn7PyyHgZ4pMnXWPkGqmuBmx8eGuo-Oyndo7Wm9IUU,108
|
|
24
24
|
uipath_langchain/retrievers/context_grounding_retriever.py,sha256=YLCIwy89LhLnNqcM0YJ5mZoeNyCs5UiKD3Wly8gnW1E,2239
|
|
25
25
|
uipath_langchain/tracers/AsyncUiPathTracer.py,sha256=SgFLVU8ZtRaUjIiiM5jjYqlKc-4ec3tAXwZVceDM2ng,9147
|
|
@@ -29,8 +29,8 @@ uipath_langchain/tracers/_instrument_traceable.py,sha256=0e841zVzcPWjOGtmBx0GeHb
|
|
|
29
29
|
uipath_langchain/tracers/_utils.py,sha256=JOT1tKMdvqjMDtj2WbmbOWMeMlTXBWavxWpogX7KlRA,1543
|
|
30
30
|
uipath_langchain/vectorstores/__init__.py,sha256=w8qs1P548ud1aIcVA_QhBgf_jZDrRMK5Lono78yA8cs,114
|
|
31
31
|
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.
|
|
32
|
+
uipath_langchain-0.0.116.dist-info/METADATA,sha256=mbBeJN843ea0JEI0LpY1UjQYk7HWBqXo1RsEOn-2K3I,4166
|
|
33
|
+
uipath_langchain-0.0.116.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
34
|
+
uipath_langchain-0.0.116.dist-info/entry_points.txt,sha256=FUtzqGOEntlJKMJIXhQUfT7ZTbQmGhke1iCmDWZaQZI,81
|
|
35
|
+
uipath_langchain-0.0.116.dist-info/licenses/LICENSE,sha256=JDpt-uotAkHFmxpwxi6gwx6HQ25e-lG4U_Gzcvgp7JY,1063
|
|
36
|
+
uipath_langchain-0.0.116.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|