|
11 | 11 | from replicate.lib._files import FileEncodingStrategy, encode_json, async_encode_json |
12 | 12 |
|
13 | 13 | from ..types import prediction_list_params, prediction_create_params |
14 | | -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven |
| 14 | +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given |
15 | 15 | from .._utils import maybe_transform, strip_not_given, async_maybe_transform |
16 | 16 | from .._compat import cached_property |
17 | 17 | from .._resource import SyncAPIResource, AsyncAPIResource |
@@ -63,17 +63,17 @@ def create( |
63 | 63 | *, |
64 | 64 | input: object, |
65 | 65 | version: str, |
66 | | - stream: bool | NotGiven = NOT_GIVEN, |
67 | | - webhook: str | NotGiven = NOT_GIVEN, |
68 | | - webhook_events_filter: List[Literal["start", "output", "logs", "completed"]] | NotGiven = NOT_GIVEN, |
69 | | - prefer: str | NotGiven = NOT_GIVEN, |
| 66 | + stream: bool | Omit = omit, |
| 67 | + webhook: str | Omit = omit, |
| 68 | + webhook_events_filter: List[Literal["start", "output", "logs", "completed"]] | Omit = omit, |
| 69 | + prefer: str | Omit = omit, |
70 | 70 | file_encoding_strategy: Optional["FileEncodingStrategy"] = None, |
71 | 71 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
72 | 72 | # The extra values given here take precedence over values defined on the client or passed to this method. |
73 | 73 | extra_headers: Headers | None = None, |
74 | 74 | extra_query: Query | None = None, |
75 | 75 | extra_body: Body | None = None, |
76 | | - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 76 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
77 | 77 | ) -> Prediction: |
78 | 78 | """ |
79 | 79 | Create a prediction for the model version and inputs you provide. |
@@ -208,14 +208,14 @@ def create( |
208 | 208 | def list( |
209 | 209 | self, |
210 | 210 | *, |
211 | | - created_after: Union[str, datetime] | NotGiven = NOT_GIVEN, |
212 | | - created_before: Union[str, datetime] | NotGiven = NOT_GIVEN, |
| 211 | + created_after: Union[str, datetime] | Omit = omit, |
| 212 | + created_before: Union[str, datetime] | Omit = omit, |
213 | 213 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
214 | 214 | # The extra values given here take precedence over values defined on the client or passed to this method. |
215 | 215 | extra_headers: Headers | None = None, |
216 | 216 | extra_query: Query | None = None, |
217 | 217 | extra_body: Body | None = None, |
218 | | - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 218 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
219 | 219 | ) -> SyncCursorURLPageWithCreatedFilters[Prediction]: |
220 | 220 | """ |
221 | 221 | Get a paginated list of all predictions created by the user or organization |
@@ -330,7 +330,7 @@ def cancel( |
330 | 330 | extra_headers: Headers | None = None, |
331 | 331 | extra_query: Query | None = None, |
332 | 332 | extra_body: Body | None = None, |
333 | | - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 333 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
334 | 334 | ) -> Prediction: |
335 | 335 | """ |
336 | 336 | Cancel a prediction that is currently running. |
@@ -386,7 +386,7 @@ def get( |
386 | 386 | extra_headers: Headers | None = None, |
387 | 387 | extra_query: Query | None = None, |
388 | 388 | extra_body: Body | None = None, |
389 | | - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 389 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
390 | 390 | ) -> Prediction: |
391 | 391 | """ |
392 | 392 | Get the current state of a prediction. |
@@ -514,17 +514,17 @@ async def create( |
514 | 514 | *, |
515 | 515 | input: object, |
516 | 516 | version: str, |
517 | | - stream: bool | NotGiven = NOT_GIVEN, |
518 | | - webhook: str | NotGiven = NOT_GIVEN, |
519 | | - webhook_events_filter: List[Literal["start", "output", "logs", "completed"]] | NotGiven = NOT_GIVEN, |
520 | | - prefer: str | NotGiven = NOT_GIVEN, |
| 517 | + stream: bool | Omit = omit, |
| 518 | + webhook: str | Omit = omit, |
| 519 | + webhook_events_filter: List[Literal["start", "output", "logs", "completed"]] | Omit = omit, |
| 520 | + prefer: str | Omit = omit, |
521 | 521 | file_encoding_strategy: Optional["FileEncodingStrategy"] = None, |
522 | 522 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
523 | 523 | # The extra values given here take precedence over values defined on the client or passed to this method. |
524 | 524 | extra_headers: Headers | None = None, |
525 | 525 | extra_query: Query | None = None, |
526 | 526 | extra_body: Body | None = None, |
527 | | - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 527 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
528 | 528 | ) -> Prediction: |
529 | 529 | """ |
530 | 530 | Create a prediction for the model version and inputs you provide. |
@@ -661,14 +661,14 @@ async def create( |
661 | 661 | def list( |
662 | 662 | self, |
663 | 663 | *, |
664 | | - created_after: Union[str, datetime] | NotGiven = NOT_GIVEN, |
665 | | - created_before: Union[str, datetime] | NotGiven = NOT_GIVEN, |
| 664 | + created_after: Union[str, datetime] | Omit = omit, |
| 665 | + created_before: Union[str, datetime] | Omit = omit, |
666 | 666 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
667 | 667 | # The extra values given here take precedence over values defined on the client or passed to this method. |
668 | 668 | extra_headers: Headers | None = None, |
669 | 669 | extra_query: Query | None = None, |
670 | 670 | extra_body: Body | None = None, |
671 | | - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 671 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
672 | 672 | ) -> AsyncPaginator[Prediction, AsyncCursorURLPageWithCreatedFilters[Prediction]]: |
673 | 673 | """ |
674 | 674 | Get a paginated list of all predictions created by the user or organization |
@@ -783,7 +783,7 @@ async def cancel( |
783 | 783 | extra_headers: Headers | None = None, |
784 | 784 | extra_query: Query | None = None, |
785 | 785 | extra_body: Body | None = None, |
786 | | - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 786 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
787 | 787 | ) -> Prediction: |
788 | 788 | """ |
789 | 789 | Cancel a prediction that is currently running. |
@@ -839,7 +839,7 @@ async def get( |
839 | 839 | extra_headers: Headers | None = None, |
840 | 840 | extra_query: Query | None = None, |
841 | 841 | extra_body: Body | None = None, |
842 | | - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, |
| 842 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
843 | 843 | ) -> Prediction: |
844 | 844 | """ |
845 | 845 | Get the current state of a prediction. |
|
0 commit comments