From c3b0a3620ef2a621f6a5767d1ff36d8ba4e12065 Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Sun, 13 Aug 2023 22:15:02 +0000 Subject: [PATCH] feat: allow a default timeout to be set for clients --- src/anthropic/_base_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/anthropic/_base_client.py b/src/anthropic/_base_client.py index 6e7ae440..e092ca52 100644 --- a/src/anthropic/_base_client.py +++ b/src/anthropic/_base_client.py @@ -82,7 +82,8 @@ _AsyncStreamT = TypeVar("_AsyncStreamT", bound=AsyncStream[Any]) -DEFAULT_TIMEOUT = Timeout(timeout=60.0, connect=5.0) +# default timeout is 10 minutes +DEFAULT_TIMEOUT = Timeout(timeout=600.0, connect=5.0) DEFAULT_MAX_RETRIES = 2 DEFAULT_LIMITS = Limits(max_connections=100, max_keepalive_connections=20)