|
1 | 1 | # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2 | 2 |
|
| 3 | +from __future__ import annotations |
| 4 | + |
| 5 | +from typing import TYPE_CHECKING |
3 | 6 | from typing_extensions import override
|
4 | 7 |
|
5 |
| -from . import resources, _load_client |
| 8 | +if TYPE_CHECKING: |
| 9 | + from .resources.files import Files |
| 10 | + from .resources.images import Images |
| 11 | + from .resources.models import Models |
| 12 | + from .resources.batches import Batches |
| 13 | + from .resources.beta.beta import Beta |
| 14 | + from .resources.chat.chat import Chat |
| 15 | + from .resources.embeddings import Embeddings |
| 16 | + from .resources.audio.audio import Audio |
| 17 | + from .resources.completions import Completions |
| 18 | + from .resources.evals.evals import Evals |
| 19 | + from .resources.moderations import Moderations |
| 20 | + from .resources.uploads.uploads import Uploads |
| 21 | + from .resources.responses.responses import Responses |
| 22 | + from .resources.fine_tuning.fine_tuning import FineTuning |
| 23 | + from .resources.vector_stores.vector_stores import VectorStores |
| 24 | + |
| 25 | +from . import _load_client |
6 | 26 | from ._utils import LazyProxy
|
7 | 27 |
|
8 | 28 |
|
9 |
| -class ChatProxy(LazyProxy[resources.Chat]): |
| 29 | +class ChatProxy(LazyProxy["Chat"]): |
10 | 30 | @override
|
11 |
| - def __load__(self) -> resources.Chat: |
| 31 | + def __load__(self) -> Chat: |
12 | 32 | return _load_client().chat
|
13 | 33 |
|
14 | 34 |
|
15 |
| -class BetaProxy(LazyProxy[resources.Beta]): |
| 35 | +class BetaProxy(LazyProxy["Beta"]): |
16 | 36 | @override
|
17 |
| - def __load__(self) -> resources.Beta: |
| 37 | + def __load__(self) -> Beta: |
18 | 38 | return _load_client().beta
|
19 | 39 |
|
20 | 40 |
|
21 |
| -class FilesProxy(LazyProxy[resources.Files]): |
| 41 | +class FilesProxy(LazyProxy["Files"]): |
22 | 42 | @override
|
23 |
| - def __load__(self) -> resources.Files: |
| 43 | + def __load__(self) -> Files: |
24 | 44 | return _load_client().files
|
25 | 45 |
|
26 | 46 |
|
27 |
| -class AudioProxy(LazyProxy[resources.Audio]): |
| 47 | +class AudioProxy(LazyProxy["Audio"]): |
28 | 48 | @override
|
29 |
| - def __load__(self) -> resources.Audio: |
| 49 | + def __load__(self) -> Audio: |
30 | 50 | return _load_client().audio
|
31 | 51 |
|
32 | 52 |
|
33 |
| -class EvalsProxy(LazyProxy[resources.Evals]): |
| 53 | +class EvalsProxy(LazyProxy["Evals"]): |
34 | 54 | @override
|
35 |
| - def __load__(self) -> resources.Evals: |
| 55 | + def __load__(self) -> Evals: |
36 | 56 | return _load_client().evals
|
37 | 57 |
|
38 | 58 |
|
39 |
| -class ImagesProxy(LazyProxy[resources.Images]): |
| 59 | +class ImagesProxy(LazyProxy["Images"]): |
40 | 60 | @override
|
41 |
| - def __load__(self) -> resources.Images: |
| 61 | + def __load__(self) -> Images: |
42 | 62 | return _load_client().images
|
43 | 63 |
|
44 | 64 |
|
45 |
| -class ModelsProxy(LazyProxy[resources.Models]): |
| 65 | +class ModelsProxy(LazyProxy["Models"]): |
46 | 66 | @override
|
47 |
| - def __load__(self) -> resources.Models: |
| 67 | + def __load__(self) -> Models: |
48 | 68 | return _load_client().models
|
49 | 69 |
|
50 | 70 |
|
51 |
| -class BatchesProxy(LazyProxy[resources.Batches]): |
| 71 | +class BatchesProxy(LazyProxy["Batches"]): |
52 | 72 | @override
|
53 |
| - def __load__(self) -> resources.Batches: |
| 73 | + def __load__(self) -> Batches: |
54 | 74 | return _load_client().batches
|
55 | 75 |
|
56 | 76 |
|
57 |
| -class UploadsProxy(LazyProxy[resources.Uploads]): |
| 77 | +class UploadsProxy(LazyProxy["Uploads"]): |
58 | 78 | @override
|
59 |
| - def __load__(self) -> resources.Uploads: |
| 79 | + def __load__(self) -> Uploads: |
60 | 80 | return _load_client().uploads
|
61 | 81 |
|
62 | 82 |
|
63 |
| -class ResponsesProxy(LazyProxy[resources.Responses]): |
| 83 | +class ResponsesProxy(LazyProxy["Responses"]): |
64 | 84 | @override
|
65 |
| - def __load__(self) -> resources.Responses: |
| 85 | + def __load__(self) -> Responses: |
66 | 86 | return _load_client().responses
|
67 | 87 |
|
68 | 88 |
|
69 |
| -class EmbeddingsProxy(LazyProxy[resources.Embeddings]): |
| 89 | +class EmbeddingsProxy(LazyProxy["Embeddings"]): |
70 | 90 | @override
|
71 |
| - def __load__(self) -> resources.Embeddings: |
| 91 | + def __load__(self) -> Embeddings: |
72 | 92 | return _load_client().embeddings
|
73 | 93 |
|
74 | 94 |
|
75 |
| -class CompletionsProxy(LazyProxy[resources.Completions]): |
| 95 | +class CompletionsProxy(LazyProxy["Completions"]): |
76 | 96 | @override
|
77 |
| - def __load__(self) -> resources.Completions: |
| 97 | + def __load__(self) -> Completions: |
78 | 98 | return _load_client().completions
|
79 | 99 |
|
80 | 100 |
|
81 |
| -class ModerationsProxy(LazyProxy[resources.Moderations]): |
| 101 | +class ModerationsProxy(LazyProxy["Moderations"]): |
82 | 102 | @override
|
83 |
| - def __load__(self) -> resources.Moderations: |
| 103 | + def __load__(self) -> Moderations: |
84 | 104 | return _load_client().moderations
|
85 | 105 |
|
86 | 106 |
|
87 |
| -class FineTuningProxy(LazyProxy[resources.FineTuning]): |
| 107 | +class FineTuningProxy(LazyProxy["FineTuning"]): |
88 | 108 | @override
|
89 |
| - def __load__(self) -> resources.FineTuning: |
| 109 | + def __load__(self) -> FineTuning: |
90 | 110 | return _load_client().fine_tuning
|
91 | 111 |
|
92 | 112 |
|
93 |
| -class VectorStoresProxy(LazyProxy[resources.VectorStores]): |
| 113 | +class VectorStoresProxy(LazyProxy["VectorStores"]): |
94 | 114 | @override
|
95 |
| - def __load__(self) -> resources.VectorStores: |
| 115 | + def __load__(self) -> VectorStores: |
96 | 116 | return _load_client().vector_stores
|
97 | 117 |
|
98 | 118 |
|
99 |
| -chat: resources.Chat = ChatProxy().__as_proxied__() |
100 |
| -beta: resources.Beta = BetaProxy().__as_proxied__() |
101 |
| -files: resources.Files = FilesProxy().__as_proxied__() |
102 |
| -audio: resources.Audio = AudioProxy().__as_proxied__() |
103 |
| -evals: resources.Evals = EvalsProxy().__as_proxied__() |
104 |
| -images: resources.Images = ImagesProxy().__as_proxied__() |
105 |
| -models: resources.Models = ModelsProxy().__as_proxied__() |
106 |
| -batches: resources.Batches = BatchesProxy().__as_proxied__() |
107 |
| -uploads: resources.Uploads = UploadsProxy().__as_proxied__() |
108 |
| -responses: resources.Responses = ResponsesProxy().__as_proxied__() |
109 |
| -embeddings: resources.Embeddings = EmbeddingsProxy().__as_proxied__() |
110 |
| -completions: resources.Completions = CompletionsProxy().__as_proxied__() |
111 |
| -moderations: resources.Moderations = ModerationsProxy().__as_proxied__() |
112 |
| -fine_tuning: resources.FineTuning = FineTuningProxy().__as_proxied__() |
113 |
| -vector_stores: resources.VectorStores = VectorStoresProxy().__as_proxied__() |
| 119 | +chat: Chat = ChatProxy().__as_proxied__() |
| 120 | +beta: Beta = BetaProxy().__as_proxied__() |
| 121 | +files: Files = FilesProxy().__as_proxied__() |
| 122 | +audio: Audio = AudioProxy().__as_proxied__() |
| 123 | +evals: Evals = EvalsProxy().__as_proxied__() |
| 124 | +images: Images = ImagesProxy().__as_proxied__() |
| 125 | +models: Models = ModelsProxy().__as_proxied__() |
| 126 | +batches: Batches = BatchesProxy().__as_proxied__() |
| 127 | +uploads: Uploads = UploadsProxy().__as_proxied__() |
| 128 | +responses: Responses = ResponsesProxy().__as_proxied__() |
| 129 | +embeddings: Embeddings = EmbeddingsProxy().__as_proxied__() |
| 130 | +completions: Completions = CompletionsProxy().__as_proxied__() |
| 131 | +moderations: Moderations = ModerationsProxy().__as_proxied__() |
| 132 | +fine_tuning: FineTuning = FineTuningProxy().__as_proxied__() |
| 133 | +vector_stores: VectorStores = VectorStoresProxy().__as_proxied__() |
0 commit comments