1# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
  2
  3from __future__ import annotations
  4
  5from .graders import (
  6    Graders,
  7    AsyncGraders,
  8    GradersWithRawResponse,
  9    AsyncGradersWithRawResponse,
 10    GradersWithStreamingResponse,
 11    AsyncGradersWithStreamingResponse,
 12)
 13from ...._compat import cached_property
 14from ...._resource import SyncAPIResource, AsyncAPIResource
 15
 16__all__ = ["Alpha", "AsyncAlpha"]
 17
 18
 19class Alpha(SyncAPIResource):
 20    @cached_property
 21    def graders(self) -> Graders:
 22        return Graders(self._client)
 23
 24    @cached_property
 25    def with_raw_response(self) -> AlphaWithRawResponse:
 26        """
 27        This property can be used as a prefix for any HTTP method call to return
 28        the raw response object instead of the parsed content.
 29
 30        For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
 31        """
 32        return AlphaWithRawResponse(self)
 33
 34    @cached_property
 35    def with_streaming_response(self) -> AlphaWithStreamingResponse:
 36        """
 37        An alternative to `.with_raw_response` that doesn't eagerly read the response body.
 38
 39        For more information, see https://www.github.com/openai/openai-python#with_streaming_response
 40        """
 41        return AlphaWithStreamingResponse(self)
 42
 43
 44class AsyncAlpha(AsyncAPIResource):
 45    @cached_property
 46    def graders(self) -> AsyncGraders:
 47        return AsyncGraders(self._client)
 48
 49    @cached_property
 50    def with_raw_response(self) -> AsyncAlphaWithRawResponse:
 51        """
 52        This property can be used as a prefix for any HTTP method call to return
 53        the raw response object instead of the parsed content.
 54
 55        For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
 56        """
 57        return AsyncAlphaWithRawResponse(self)
 58
 59    @cached_property
 60    def with_streaming_response(self) -> AsyncAlphaWithStreamingResponse:
 61        """
 62        An alternative to `.with_raw_response` that doesn't eagerly read the response body.
 63
 64        For more information, see https://www.github.com/openai/openai-python#with_streaming_response
 65        """
 66        return AsyncAlphaWithStreamingResponse(self)
 67
 68
 69class AlphaWithRawResponse:
 70    def __init__(self, alpha: Alpha) -> None:
 71        self._alpha = alpha
 72
 73    @cached_property
 74    def graders(self) -> GradersWithRawResponse:
 75        return GradersWithRawResponse(self._alpha.graders)
 76
 77
 78class AsyncAlphaWithRawResponse:
 79    def __init__(self, alpha: AsyncAlpha) -> None:
 80        self._alpha = alpha
 81
 82    @cached_property
 83    def graders(self) -> AsyncGradersWithRawResponse:
 84        return AsyncGradersWithRawResponse(self._alpha.graders)
 85
 86
 87class AlphaWithStreamingResponse:
 88    def __init__(self, alpha: Alpha) -> None:
 89        self._alpha = alpha
 90
 91    @cached_property
 92    def graders(self) -> GradersWithStreamingResponse:
 93        return GradersWithStreamingResponse(self._alpha.graders)
 94
 95
 96class AsyncAlphaWithStreamingResponse:
 97    def __init__(self, alpha: AsyncAlpha) -> None:
 98        self._alpha = alpha
 99
100    @cached_property
101    def graders(self) -> AsyncGradersWithStreamingResponse:
102        return AsyncGradersWithStreamingResponse(self._alpha.graders)