fa45d8aa5f
- health_checklist.json: 192.168.1.122→node122
- ocr_client.py: docstring IP→node122
- docs/market-data-requirements.md: IP→node122
- 所有API调用通过ProxyHandler({})绕过系统代理
Privoxy对node122:18003返回500,直连正常
103 lines
3.3 KiB
Python
103 lines
3.3 KiB
Python
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
|
|
from __future__ import annotations
|
|
|
|
from ..._compat import cached_property
|
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
from .organization.organization import (
|
|
Organization,
|
|
AsyncOrganization,
|
|
OrganizationWithRawResponse,
|
|
AsyncOrganizationWithRawResponse,
|
|
OrganizationWithStreamingResponse,
|
|
AsyncOrganizationWithStreamingResponse,
|
|
)
|
|
|
|
__all__ = ["Admin", "AsyncAdmin"]
|
|
|
|
|
|
class Admin(SyncAPIResource):
|
|
@cached_property
|
|
def organization(self) -> Organization:
|
|
return Organization(self._client)
|
|
|
|
@cached_property
|
|
def with_raw_response(self) -> AdminWithRawResponse:
|
|
"""
|
|
This property can be used as a prefix for any HTTP method call to return
|
|
the raw response object instead of the parsed content.
|
|
|
|
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
|
|
"""
|
|
return AdminWithRawResponse(self)
|
|
|
|
@cached_property
|
|
def with_streaming_response(self) -> AdminWithStreamingResponse:
|
|
"""
|
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
|
|
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
|
|
"""
|
|
return AdminWithStreamingResponse(self)
|
|
|
|
|
|
class AsyncAdmin(AsyncAPIResource):
|
|
@cached_property
|
|
def organization(self) -> AsyncOrganization:
|
|
return AsyncOrganization(self._client)
|
|
|
|
@cached_property
|
|
def with_raw_response(self) -> AsyncAdminWithRawResponse:
|
|
"""
|
|
This property can be used as a prefix for any HTTP method call to return
|
|
the raw response object instead of the parsed content.
|
|
|
|
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers
|
|
"""
|
|
return AsyncAdminWithRawResponse(self)
|
|
|
|
@cached_property
|
|
def with_streaming_response(self) -> AsyncAdminWithStreamingResponse:
|
|
"""
|
|
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
|
|
For more information, see https://www.github.com/openai/openai-python#with_streaming_response
|
|
"""
|
|
return AsyncAdminWithStreamingResponse(self)
|
|
|
|
|
|
class AdminWithRawResponse:
|
|
def __init__(self, admin: Admin) -> None:
|
|
self._admin = admin
|
|
|
|
@cached_property
|
|
def organization(self) -> OrganizationWithRawResponse:
|
|
return OrganizationWithRawResponse(self._admin.organization)
|
|
|
|
|
|
class AsyncAdminWithRawResponse:
|
|
def __init__(self, admin: AsyncAdmin) -> None:
|
|
self._admin = admin
|
|
|
|
@cached_property
|
|
def organization(self) -> AsyncOrganizationWithRawResponse:
|
|
return AsyncOrganizationWithRawResponse(self._admin.organization)
|
|
|
|
|
|
class AdminWithStreamingResponse:
|
|
def __init__(self, admin: Admin) -> None:
|
|
self._admin = admin
|
|
|
|
@cached_property
|
|
def organization(self) -> OrganizationWithStreamingResponse:
|
|
return OrganizationWithStreamingResponse(self._admin.organization)
|
|
|
|
|
|
class AsyncAdminWithStreamingResponse:
|
|
def __init__(self, admin: AsyncAdmin) -> None:
|
|
self._admin = admin
|
|
|
|
@cached_property
|
|
def organization(self) -> AsyncOrganizationWithStreamingResponse:
|
|
return AsyncOrganizationWithStreamingResponse(self._admin.organization)
|