_module_client.py 4.9 KB

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