Use total_seconds instead of seconds on timeout (#896)
This commit is contained in:
parent
7123556a34
commit
b0b44c2fe4
1 changed files with 5 additions and 3 deletions
|
|
@ -195,7 +195,8 @@ class StreamableHTTPTransport:
|
|||
self.url,
|
||||
headers=headers,
|
||||
timeout=httpx.Timeout(
|
||||
self.timeout.seconds, read=self.sse_read_timeout.seconds
|
||||
self.timeout.total_seconds(),
|
||||
read=self.sse_read_timeout.total_seconds(),
|
||||
),
|
||||
) as event_source:
|
||||
event_source.response.raise_for_status()
|
||||
|
|
@ -226,7 +227,7 @@ class StreamableHTTPTransport:
|
|||
self.url,
|
||||
headers=headers,
|
||||
timeout=httpx.Timeout(
|
||||
self.timeout.seconds, read=ctx.sse_read_timeout.seconds
|
||||
self.timeout.total_seconds(), read=ctx.sse_read_timeout.total_seconds()
|
||||
),
|
||||
) as event_source:
|
||||
event_source.response.raise_for_status()
|
||||
|
|
@ -468,7 +469,8 @@ async def streamablehttp_client(
|
|||
async with httpx_client_factory(
|
||||
headers=transport.request_headers,
|
||||
timeout=httpx.Timeout(
|
||||
transport.timeout.seconds, read=transport.sse_read_timeout.seconds
|
||||
transport.timeout.total_seconds(),
|
||||
read=transport.sse_read_timeout.total_seconds(),
|
||||
),
|
||||
auth=transport.auth,
|
||||
) as client:
|
||||
|
|
|
|||
Loading…
Reference in a new issue