setters for http clients

This commit is contained in:
Chester Curme 2025-02-21 23:32:31 -05:00
parent e19fed1fcc
commit b07bb53f5b

View File

@ -611,6 +611,10 @@ class BaseChatOpenAI(BaseChatModel):
)
return self._http_client
@http_client.setter
def http_client(self, value: Optional[httpx.Client]) -> None:
self._http_client = value
@property
def http_async_client(self) -> Optional[httpx.AsyncClient]:
"""Optional httpx.AsyncClient. Only used for async invocations.
@ -633,6 +637,10 @@ class BaseChatOpenAI(BaseChatModel):
)
return self._http_async_client
@http_async_client.setter
def http_async_client(self, value: Optional[httpx.AsyncClient]) -> None:
self._http_async_client = value
@property
def root_client(self) -> Any:
if self._root_client is None: