77
88import httpx
99
10- from ..types import invocation_create_params , invocation_update_params
10+ from ..types import invocation_create_params , invocation_follow_params , invocation_update_params
1111from .._types import Body , Omit , Query , Headers , NoneType , NotGiven , omit , not_given
1212from .._utils import maybe_transform , async_maybe_transform
1313from .._compat import cached_property
@@ -223,6 +223,7 @@ def follow(
223223 self ,
224224 id : str ,
225225 * ,
226+ since : str | Omit = omit ,
226227 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
227228 # The extra values given here take precedence over values defined on the client or passed to this method.
228229 extra_headers : Headers | None = None ,
@@ -236,6 +237,8 @@ def follow(
236237 invocation reaches a terminal state.
237238
238239 Args:
240+ since: Show logs since the given time (RFC timestamps or durations like 5m).
241+
239242 extra_headers: Send extra headers
240243
241244 extra_query: Add additional query parameters to the request
@@ -250,7 +253,11 @@ def follow(
250253 return self ._get (
251254 f"/invocations/{ id } /events" ,
252255 options = make_request_options (
253- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
256+ extra_headers = extra_headers ,
257+ extra_query = extra_query ,
258+ extra_body = extra_body ,
259+ timeout = timeout ,
260+ query = maybe_transform ({"since" : since }, invocation_follow_params .InvocationFollowParams ),
254261 ),
255262 cast_to = cast (
256263 Any , InvocationFollowResponse
@@ -455,6 +462,7 @@ async def follow(
455462 self ,
456463 id : str ,
457464 * ,
465+ since : str | Omit = omit ,
458466 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
459467 # The extra values given here take precedence over values defined on the client or passed to this method.
460468 extra_headers : Headers | None = None ,
@@ -468,6 +476,8 @@ async def follow(
468476 invocation reaches a terminal state.
469477
470478 Args:
479+ since: Show logs since the given time (RFC timestamps or durations like 5m).
480+
471481 extra_headers: Send extra headers
472482
473483 extra_query: Add additional query parameters to the request
@@ -482,7 +492,11 @@ async def follow(
482492 return await self ._get (
483493 f"/invocations/{ id } /events" ,
484494 options = make_request_options (
485- extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
495+ extra_headers = extra_headers ,
496+ extra_query = extra_query ,
497+ extra_body = extra_body ,
498+ timeout = timeout ,
499+ query = await async_maybe_transform ({"since" : since }, invocation_follow_params .InvocationFollowParams ),
486500 ),
487501 cast_to = cast (
488502 Any , InvocationFollowResponse
0 commit comments