Skip to content

Commit c24c5b0

Browse files
authored
Merge pull request #123 from UiPath/fix/httpx_default_kwargs
fix: use core default kwargs for httpx client
2 parents 924d160 + 8c98303 commit c24c5b0

File tree

3 files changed

+46
-27
lines changed

3 files changed

+46
-27
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[project]
22
name = "uipath-langchain"
3-
version = "0.0.115"
3+
version = "0.0.116"
44
description = "UiPath Langchain"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.10"
77
dependencies = [
8-
"uipath>=2.0.71, <2.1.0",
8+
"uipath>=2.0.77, <2.1.0",
99
"langgraph>=0.2.70",
1010
"langchain-core>=0.3.34",
1111
"langgraph-checkpoint-sqlite>=2.0.3",

src/uipath_langchain/_utils/_request_mixin.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
stop_after_attempt,
1818
wait_exponential_jitter,
1919
)
20+
from uipath._utils._ssl_context import get_httpx_client_kwargs
2021

2122
from uipath_langchain._utils._settings import (
2223
UiPathClientFactorySettings,
@@ -135,11 +136,13 @@ def _request(
135136
"""Run an asynchronous call to the LLM."""
136137
# if self.logger:
137138
# self.logger.info(f"Completion request: {request_body['messages'][:2]}")
139+
client_kwargs = get_httpx_client_kwargs()
138140
with httpx.Client(
141+
**client_kwargs, # Apply SSL configuration
139142
event_hooks={
140143
"request": [self._log_request_duration],
141144
"response": [self._log_response_duration],
142-
}
145+
},
143146
) as client:
144147
response = client.post(
145148
url,
@@ -212,11 +215,13 @@ async def _arequest(
212215
) -> Dict[str, Any]:
213216
# if self.logger:
214217
# self.logger.info(f"Completion request: {request_body['messages'][:2]}")
218+
client_kwargs = get_httpx_client_kwargs()
215219
async with httpx.AsyncClient(
220+
**client_kwargs, # Apply SSL configuration
216221
event_hooks={
217222
"request": [self._alog_request_duration],
218223
"response": [self._alog_response_duration],
219-
}
224+
},
220225
) as client:
221226
response = await client.post(
222227
url,

uv.lock

Lines changed: 37 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)