fix vertex httpx client

This commit is contained in:
Ishaan Jaff
2024-05-20 13:43:54 -07:00
parent 518db13982
commit f3eb832593
+3
View File
@@ -135,6 +135,9 @@ class VertexLLM(BaseLLM):
if isinstance(timeout, float) or isinstance(timeout, int):
_httpx_timeout = httpx.Timeout(timeout)
_params["timeout"] = _httpx_timeout
else:
_params["timeout"] = httpx.Timeout(timeout=600.0, connect=5.0)
self.async_handler = AsyncHTTPHandler(**_params) # type: ignore
else:
self.async_handler = client # type: ignore