|
32 | 32 | ) |
33 | 33 |
|
34 | 34 | if TYPE_CHECKING: |
35 | | - from .resources import convert, projects, templates, workspaces |
| 35 | + from .resources import ai, convert, projects, templates, workspaces |
| 36 | + from .resources.ai.ai import AIResource, AsyncAIResource |
36 | 37 | from .resources.projects import ProjectsResource, AsyncProjectsResource |
37 | 38 | from .resources.templates import TemplatesResource, AsyncTemplatesResource |
38 | 39 | from .resources.workspaces import WorkspacesResource, AsyncWorkspacesResource |
@@ -107,6 +108,12 @@ def __init__( |
107 | 108 | _strict_response_validation=_strict_response_validation, |
108 | 109 | ) |
109 | 110 |
|
| 111 | + @cached_property |
| 112 | + def ai(self) -> AIResource: |
| 113 | + from .resources.ai import AIResource |
| 114 | + |
| 115 | + return AIResource(self) |
| 116 | + |
110 | 117 | @cached_property |
111 | 118 | def convert(self) -> ConvertResource: |
112 | 119 | from .resources.convert import ConvertResource |
@@ -340,6 +347,12 @@ def __init__( |
340 | 347 | _strict_response_validation=_strict_response_validation, |
341 | 348 | ) |
342 | 349 |
|
| 350 | + @cached_property |
| 351 | + def ai(self) -> AsyncAIResource: |
| 352 | + from .resources.ai import AsyncAIResource |
| 353 | + |
| 354 | + return AsyncAIResource(self) |
| 355 | + |
343 | 356 | @cached_property |
344 | 357 | def convert(self) -> AsyncConvertResource: |
345 | 358 | from .resources.convert import AsyncConvertResource |
@@ -513,6 +526,12 @@ class UnlayerWithRawResponse: |
513 | 526 | def __init__(self, client: Unlayer) -> None: |
514 | 527 | self._client = client |
515 | 528 |
|
| 529 | + @cached_property |
| 530 | + def ai(self) -> ai.AIResourceWithRawResponse: |
| 531 | + from .resources.ai import AIResourceWithRawResponse |
| 532 | + |
| 533 | + return AIResourceWithRawResponse(self._client.ai) |
| 534 | + |
516 | 535 | @cached_property |
517 | 536 | def convert(self) -> convert.ConvertResourceWithRawResponse: |
518 | 537 | from .resources.convert import ConvertResourceWithRawResponse |
@@ -547,6 +566,12 @@ class AsyncUnlayerWithRawResponse: |
547 | 566 | def __init__(self, client: AsyncUnlayer) -> None: |
548 | 567 | self._client = client |
549 | 568 |
|
| 569 | + @cached_property |
| 570 | + def ai(self) -> ai.AsyncAIResourceWithRawResponse: |
| 571 | + from .resources.ai import AsyncAIResourceWithRawResponse |
| 572 | + |
| 573 | + return AsyncAIResourceWithRawResponse(self._client.ai) |
| 574 | + |
550 | 575 | @cached_property |
551 | 576 | def convert(self) -> convert.AsyncConvertResourceWithRawResponse: |
552 | 577 | from .resources.convert import AsyncConvertResourceWithRawResponse |
@@ -581,6 +606,12 @@ class UnlayerWithStreamedResponse: |
581 | 606 | def __init__(self, client: Unlayer) -> None: |
582 | 607 | self._client = client |
583 | 608 |
|
| 609 | + @cached_property |
| 610 | + def ai(self) -> ai.AIResourceWithStreamingResponse: |
| 611 | + from .resources.ai import AIResourceWithStreamingResponse |
| 612 | + |
| 613 | + return AIResourceWithStreamingResponse(self._client.ai) |
| 614 | + |
584 | 615 | @cached_property |
585 | 616 | def convert(self) -> convert.ConvertResourceWithStreamingResponse: |
586 | 617 | from .resources.convert import ConvertResourceWithStreamingResponse |
@@ -615,6 +646,12 @@ class AsyncUnlayerWithStreamedResponse: |
615 | 646 | def __init__(self, client: AsyncUnlayer) -> None: |
616 | 647 | self._client = client |
617 | 648 |
|
| 649 | + @cached_property |
| 650 | + def ai(self) -> ai.AsyncAIResourceWithStreamingResponse: |
| 651 | + from .resources.ai import AsyncAIResourceWithStreamingResponse |
| 652 | + |
| 653 | + return AsyncAIResourceWithStreamingResponse(self._client.ai) |
| 654 | + |
618 | 655 | @cached_property |
619 | 656 | def convert(self) -> convert.AsyncConvertResourceWithStreamingResponse: |
620 | 657 | from .resources.convert import AsyncConvertResourceWithStreamingResponse |
|
0 commit comments