Download data/src/elevenlabs/flows/client.py from introvoyz045/elevenlabs-python: direct link, hf CLI and curl.
- Browser
- Download file 4.11 kB
-
https://huggingface.co/datasets/introvoyz045/elevenlabs-python/resolve/main/data/src/elevenlabs/flows/client.py
- Command line
-
hf download hf://datasets/introvoyz045/elevenlabs-python/data/src/elevenlabs/flows/client.py
-
curl -L -o client.py https://huggingface.co/datasets/introvoyz045/elevenlabs-python/resolve/main/data/src/elevenlabs/flows/client.py
4.11 kB
| # This file was auto-generated by Fern from our API Definition. | |
| from __future__ import annotations | |
| import typing | |
| from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper | |
| from .raw_client import AsyncRawFlowsClient, RawFlowsClient | |
| if typing.TYPE_CHECKING: | |
| from .image.client import AsyncImageClient, ImageClient | |
| from .templates.client import AsyncTemplatesClient, TemplatesClient | |
| from .text_to_speech.client import AsyncTextToSpeechClient, TextToSpeechClient | |
| from .video.client import AsyncVideoClient, VideoClient | |
| class FlowsClient: | |
| def __init__(self, *, client_wrapper: SyncClientWrapper): | |
| self._raw_client = RawFlowsClient(client_wrapper=client_wrapper) | |
| self._client_wrapper = client_wrapper | |
| self._video: typing.Optional[VideoClient] = None | |
| self._image: typing.Optional[ImageClient] = None | |
| self._text_to_speech: typing.Optional[TextToSpeechClient] = None | |
| self._templates: typing.Optional[TemplatesClient] = None | |
| def with_raw_response(self) -> RawFlowsClient: | |
| """ | |
| Retrieves a raw implementation of this client that returns raw responses. | |
| Returns | |
| ------- | |
| RawFlowsClient | |
| """ | |
| return self._raw_client | |
| def video(self): | |
| if self._video is None: | |
| from .video.client import VideoClient # noqa: E402 | |
| self._video = VideoClient(client_wrapper=self._client_wrapper) | |
| return self._video | |
| def image(self): | |
| if self._image is None: | |
| from .image.client import ImageClient # noqa: E402 | |
| self._image = ImageClient(client_wrapper=self._client_wrapper) | |
| return self._image | |
| def text_to_speech(self): | |
| if self._text_to_speech is None: | |
| from .text_to_speech.client import TextToSpeechClient # noqa: E402 | |
| self._text_to_speech = TextToSpeechClient(client_wrapper=self._client_wrapper) | |
| return self._text_to_speech | |
| def templates(self): | |
| if self._templates is None: | |
| from .templates.client import TemplatesClient # noqa: E402 | |
| self._templates = TemplatesClient(client_wrapper=self._client_wrapper) | |
| return self._templates | |
| class AsyncFlowsClient: | |
| def __init__(self, *, client_wrapper: AsyncClientWrapper): | |
| self._raw_client = AsyncRawFlowsClient(client_wrapper=client_wrapper) | |
| self._client_wrapper = client_wrapper | |
| self._video: typing.Optional[AsyncVideoClient] = None | |
| self._image: typing.Optional[AsyncImageClient] = None | |
| self._text_to_speech: typing.Optional[AsyncTextToSpeechClient] = None | |
| self._templates: typing.Optional[AsyncTemplatesClient] = None | |
| def with_raw_response(self) -> AsyncRawFlowsClient: | |
| """ | |
| Retrieves a raw implementation of this client that returns raw responses. | |
| Returns | |
| ------- | |
| AsyncRawFlowsClient | |
| """ | |
| return self._raw_client | |
| def video(self): | |
| if self._video is None: | |
| from .video.client import AsyncVideoClient # noqa: E402 | |
| self._video = AsyncVideoClient(client_wrapper=self._client_wrapper) | |
| return self._video | |
| def image(self): | |
| if self._image is None: | |
| from .image.client import AsyncImageClient # noqa: E402 | |
| self._image = AsyncImageClient(client_wrapper=self._client_wrapper) | |
| return self._image | |
| def text_to_speech(self): | |
| if self._text_to_speech is None: | |
| from .text_to_speech.client import AsyncTextToSpeechClient # noqa: E402 | |
| self._text_to_speech = AsyncTextToSpeechClient(client_wrapper=self._client_wrapper) | |
| return self._text_to_speech | |
| def templates(self): | |
| if self._templates is None: | |
| from .templates.client import AsyncTemplatesClient # noqa: E402 | |
| self._templates = AsyncTemplatesClient(client_wrapper=self._client_wrapper) | |
| return self._templates | |