Skip to content

Commit 04b9237

Browse files
fix: add timeout to bedrock boto client
1 parent fa54293 commit 04b9237

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/uipath_langchain/chat/bedrock.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def __init__(
7272
self._vendor = "awsbedrock"
7373
self._url: Optional[str] = None
7474
self.header_capture = header_capture
75+
self._read_timeout = float(os.getenv("UIPATH_TIMEOUT_SECONDS", "120"))
7576

7677
@property
7778
def endpoint(self) -> str:
@@ -108,7 +109,8 @@ def get_client(self):
108109
config=botocore.config.Config(
109110
retries={
110111
"total_max_attempts": 1,
111-
}
112+
},
113+
read_timeout=self._read_timeout,
112114
),
113115
)
114116
client.meta.events.register(

0 commit comments

Comments
 (0)