diff --git a/README.md b/README.md index 3229aa78..639d2622 100644 --- a/README.md +++ b/README.md @@ -205,7 +205,7 @@ client.with_options(max_retries=5).hris.directory.list_individuals() ### Timeouts -Requests time out after 60 seconds by default. You can configure this with a `timeout` option, +Requests time out after 1 minute by default. You can configure this with a `timeout` option, which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration): ```python diff --git a/src/finch/_base_client.py b/src/finch/_base_client.py index d646f53a..cf1d62b4 100644 --- a/src/finch/_base_client.py +++ b/src/finch/_base_client.py @@ -82,6 +82,7 @@ _AsyncStreamT = TypeVar("_AsyncStreamT", bound=AsyncStream[Any]) +# default timeout is 1 minute DEFAULT_TIMEOUT = Timeout(timeout=60.0, connect=5.0) DEFAULT_MAX_RETRIES = 2 DEFAULT_LIMITS = Limits(max_connections=100, max_keepalive_connections=20)