mirror of
https://github.com/hwchase17/langchain.git
synced 2025-04-28 11:55:21 +00:00
setters for http clients
This commit is contained in:
parent
e19fed1fcc
commit
b07bb53f5b
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user