|
35 | 35 | ) |
36 | 36 |
|
37 | 37 | if TYPE_CHECKING: |
38 | | - from .resources import models, account, hardware, webhooks, trainings, collections, deployments, predictions |
| 38 | + from .resources import files, models, account, hardware, webhooks, trainings, collections, deployments, predictions |
| 39 | + from .resources.files import FilesResource, AsyncFilesResource |
39 | 40 | from .resources.account import AccountResource, AsyncAccountResource |
40 | 41 | from .resources.hardware import HardwareResource, AsyncHardwareResource |
41 | 42 | from .resources.trainings import TrainingsResource, AsyncTrainingsResource |
@@ -160,6 +161,12 @@ def webhooks(self) -> WebhooksResource: |
160 | 161 |
|
161 | 162 | return WebhooksResource(self) |
162 | 163 |
|
| 164 | + @cached_property |
| 165 | + def files(self) -> FilesResource: |
| 166 | + from .resources.files import FilesResource |
| 167 | + |
| 168 | + return FilesResource(self) |
| 169 | + |
163 | 170 | @cached_property |
164 | 171 | def with_raw_response(self) -> ReplicateWithRawResponse: |
165 | 172 | return ReplicateWithRawResponse(self) |
@@ -428,6 +435,12 @@ def webhooks(self) -> AsyncWebhooksResource: |
428 | 435 |
|
429 | 436 | return AsyncWebhooksResource(self) |
430 | 437 |
|
| 438 | + @cached_property |
| 439 | + def files(self) -> AsyncFilesResource: |
| 440 | + from .resources.files import AsyncFilesResource |
| 441 | + |
| 442 | + return AsyncFilesResource(self) |
| 443 | + |
431 | 444 | @cached_property |
432 | 445 | def with_raw_response(self) -> AsyncReplicateWithRawResponse: |
433 | 446 | return AsyncReplicateWithRawResponse(self) |
@@ -647,6 +660,12 @@ def webhooks(self) -> webhooks.WebhooksResourceWithRawResponse: |
647 | 660 |
|
648 | 661 | return WebhooksResourceWithRawResponse(self._client.webhooks) |
649 | 662 |
|
| 663 | + @cached_property |
| 664 | + def files(self) -> files.FilesResourceWithRawResponse: |
| 665 | + from .resources.files import FilesResourceWithRawResponse |
| 666 | + |
| 667 | + return FilesResourceWithRawResponse(self._client.files) |
| 668 | + |
650 | 669 |
|
651 | 670 | class AsyncReplicateWithRawResponse: |
652 | 671 | _client: AsyncReplicate |
@@ -702,6 +721,12 @@ def webhooks(self) -> webhooks.AsyncWebhooksResourceWithRawResponse: |
702 | 721 |
|
703 | 722 | return AsyncWebhooksResourceWithRawResponse(self._client.webhooks) |
704 | 723 |
|
| 724 | + @cached_property |
| 725 | + def files(self) -> files.AsyncFilesResourceWithRawResponse: |
| 726 | + from .resources.files import AsyncFilesResourceWithRawResponse |
| 727 | + |
| 728 | + return AsyncFilesResourceWithRawResponse(self._client.files) |
| 729 | + |
705 | 730 |
|
706 | 731 | class ReplicateWithStreamedResponse: |
707 | 732 | _client: Replicate |
@@ -757,6 +782,12 @@ def webhooks(self) -> webhooks.WebhooksResourceWithStreamingResponse: |
757 | 782 |
|
758 | 783 | return WebhooksResourceWithStreamingResponse(self._client.webhooks) |
759 | 784 |
|
| 785 | + @cached_property |
| 786 | + def files(self) -> files.FilesResourceWithStreamingResponse: |
| 787 | + from .resources.files import FilesResourceWithStreamingResponse |
| 788 | + |
| 789 | + return FilesResourceWithStreamingResponse(self._client.files) |
| 790 | + |
760 | 791 |
|
761 | 792 | class AsyncReplicateWithStreamedResponse: |
762 | 793 | _client: AsyncReplicate |
@@ -812,6 +843,12 @@ def webhooks(self) -> webhooks.AsyncWebhooksResourceWithStreamingResponse: |
812 | 843 |
|
813 | 844 | return AsyncWebhooksResourceWithStreamingResponse(self._client.webhooks) |
814 | 845 |
|
| 846 | + @cached_property |
| 847 | + def files(self) -> files.AsyncFilesResourceWithStreamingResponse: |
| 848 | + from .resources.files import AsyncFilesResourceWithStreamingResponse |
| 849 | + |
| 850 | + return AsyncFilesResourceWithStreamingResponse(self._client.files) |
| 851 | + |
815 | 852 |
|
816 | 853 | Client = Replicate |
817 | 854 |
|
|
0 commit comments