7
7
8
8
import httpx
9
9
10
+ from .tasks import (
11
+ TasksResource ,
12
+ AsyncTasksResource ,
13
+ TasksResourceWithRawResponse ,
14
+ AsyncTasksResourceWithRawResponse ,
15
+ TasksResourceWithStreamingResponse ,
16
+ AsyncTasksResourceWithStreamingResponse ,
17
+ )
18
+ from .authors import (
19
+ AuthorsResource ,
20
+ AsyncAuthorsResource ,
21
+ AuthorsResourceWithRawResponse ,
22
+ AsyncAuthorsResourceWithRawResponse ,
23
+ AuthorsResourceWithStreamingResponse ,
24
+ AsyncAuthorsResourceWithStreamingResponse ,
25
+ )
10
26
from ..._types import NOT_GIVEN , Body , Query , Headers , NotGiven
11
27
from ..._utils import (
12
28
required_args ,
32
48
AsyncModelsResourceWithStreamingResponse ,
33
49
)
34
50
from ..._base_client import make_request_options
51
+ from .finetunes .finetunes import (
52
+ FinetunesResource ,
53
+ AsyncFinetunesResource ,
54
+ FinetunesResourceWithRawResponse ,
55
+ AsyncFinetunesResourceWithRawResponse ,
56
+ FinetunesResourceWithStreamingResponse ,
57
+ AsyncFinetunesResourceWithStreamingResponse ,
58
+ )
35
59
from ...types .ai .ai_run_response import AIRunResponse
36
60
37
61
__all__ = ["AIResource" , "AsyncAIResource" ]
38
62
39
63
40
64
class AIResource (SyncAPIResource ):
65
+ @cached_property
66
+ def finetunes (self ) -> FinetunesResource :
67
+ return FinetunesResource (self ._client )
68
+
69
+ @cached_property
70
+ def authors (self ) -> AuthorsResource :
71
+ return AuthorsResource (self ._client )
72
+
73
+ @cached_property
74
+ def tasks (self ) -> TasksResource :
75
+ return TasksResource (self ._client )
76
+
41
77
@cached_property
42
78
def models (self ) -> ModelsResource :
43
79
return ModelsResource (self ._client )
@@ -778,6 +814,18 @@ def run(
778
814
779
815
780
816
class AsyncAIResource (AsyncAPIResource ):
817
+ @cached_property
818
+ def finetunes (self ) -> AsyncFinetunesResource :
819
+ return AsyncFinetunesResource (self ._client )
820
+
821
+ @cached_property
822
+ def authors (self ) -> AsyncAuthorsResource :
823
+ return AsyncAuthorsResource (self ._client )
824
+
825
+ @cached_property
826
+ def tasks (self ) -> AsyncTasksResource :
827
+ return AsyncTasksResource (self ._client )
828
+
781
829
@cached_property
782
830
def models (self ) -> AsyncModelsResource :
783
831
return AsyncModelsResource (self ._client )
@@ -1525,6 +1573,18 @@ def __init__(self, ai: AIResource) -> None:
1525
1573
ai .run ,
1526
1574
)
1527
1575
1576
+ @cached_property
1577
+ def finetunes (self ) -> FinetunesResourceWithRawResponse :
1578
+ return FinetunesResourceWithRawResponse (self ._ai .finetunes )
1579
+
1580
+ @cached_property
1581
+ def authors (self ) -> AuthorsResourceWithRawResponse :
1582
+ return AuthorsResourceWithRawResponse (self ._ai .authors )
1583
+
1584
+ @cached_property
1585
+ def tasks (self ) -> TasksResourceWithRawResponse :
1586
+ return TasksResourceWithRawResponse (self ._ai .tasks )
1587
+
1528
1588
@cached_property
1529
1589
def models (self ) -> ModelsResourceWithRawResponse :
1530
1590
return ModelsResourceWithRawResponse (self ._ai .models )
@@ -1538,6 +1598,18 @@ def __init__(self, ai: AsyncAIResource) -> None:
1538
1598
ai .run ,
1539
1599
)
1540
1600
1601
+ @cached_property
1602
+ def finetunes (self ) -> AsyncFinetunesResourceWithRawResponse :
1603
+ return AsyncFinetunesResourceWithRawResponse (self ._ai .finetunes )
1604
+
1605
+ @cached_property
1606
+ def authors (self ) -> AsyncAuthorsResourceWithRawResponse :
1607
+ return AsyncAuthorsResourceWithRawResponse (self ._ai .authors )
1608
+
1609
+ @cached_property
1610
+ def tasks (self ) -> AsyncTasksResourceWithRawResponse :
1611
+ return AsyncTasksResourceWithRawResponse (self ._ai .tasks )
1612
+
1541
1613
@cached_property
1542
1614
def models (self ) -> AsyncModelsResourceWithRawResponse :
1543
1615
return AsyncModelsResourceWithRawResponse (self ._ai .models )
@@ -1551,6 +1623,18 @@ def __init__(self, ai: AIResource) -> None:
1551
1623
ai .run ,
1552
1624
)
1553
1625
1626
+ @cached_property
1627
+ def finetunes (self ) -> FinetunesResourceWithStreamingResponse :
1628
+ return FinetunesResourceWithStreamingResponse (self ._ai .finetunes )
1629
+
1630
+ @cached_property
1631
+ def authors (self ) -> AuthorsResourceWithStreamingResponse :
1632
+ return AuthorsResourceWithStreamingResponse (self ._ai .authors )
1633
+
1634
+ @cached_property
1635
+ def tasks (self ) -> TasksResourceWithStreamingResponse :
1636
+ return TasksResourceWithStreamingResponse (self ._ai .tasks )
1637
+
1554
1638
@cached_property
1555
1639
def models (self ) -> ModelsResourceWithStreamingResponse :
1556
1640
return ModelsResourceWithStreamingResponse (self ._ai .models )
@@ -1564,6 +1648,18 @@ def __init__(self, ai: AsyncAIResource) -> None:
1564
1648
ai .run ,
1565
1649
)
1566
1650
1651
+ @cached_property
1652
+ def finetunes (self ) -> AsyncFinetunesResourceWithStreamingResponse :
1653
+ return AsyncFinetunesResourceWithStreamingResponse (self ._ai .finetunes )
1654
+
1655
+ @cached_property
1656
+ def authors (self ) -> AsyncAuthorsResourceWithStreamingResponse :
1657
+ return AsyncAuthorsResourceWithStreamingResponse (self ._ai .authors )
1658
+
1659
+ @cached_property
1660
+ def tasks (self ) -> AsyncTasksResourceWithStreamingResponse :
1661
+ return AsyncTasksResourceWithStreamingResponse (self ._ai .tasks )
1662
+
1567
1663
@cached_property
1568
1664
def models (self ) -> AsyncModelsResourceWithStreamingResponse :
1569
1665
return AsyncModelsResourceWithStreamingResponse (self ._ai .models )
0 commit comments