o
    lWiv                     @   sn   d dl Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	m
Z
 e e jdZG d	d
 d
ZG dd dZdS )    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)MusicPrompt   )AsyncRawCompositionPlanClientRawCompositionPlanClient.c                   @   x   e Zd ZdefddZedefddZeeeddd	e	d
e
je de
je de
je
jd  de
je defddZdS )CompositionPlanClientclient_wrapperc                C      t |d| _d S N)r   )r	   _raw_clientselfr    r   l/var/www/html/asistente-voz-ia/venv/lib/python3.10/site-packages/elevenlabs/music/composition_plan/client.py__init__      zCompositionPlanClient.__init__returnc                 C      | j S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawCompositionPlanClient
        r   r   r   r   r   with_raw_response      	z'CompositionPlanClient.with_raw_responseNmusic_length_mssource_composition_planmodel_idrequest_optionspromptr   r   r   music_v1r    c                C   s   | j j|||||d}|jS )a  
        Create a composition plan for music generation. Usage of this endpoint does not cost any credits but is subject to rate limiting depending on your tier.

        Parameters
        ----------
        prompt : str
            A simple text prompt to compose a plan from.

        music_length_ms : typing.Optional[int]
            The length of the composition plan to generate in milliseconds. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.

        source_composition_plan : typing.Optional[MusicPrompt]
            An optional composition plan to use as a source for the new composition plan.

        model_id : typing.Optional[typing.Literal["music_v1"]]
            The model to use for the generation.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        MusicPrompt
            Successful Response

        Examples
        --------
        from elevenlabs import ElevenLabs

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.music.composition_plan.create(
            prompt="prompt",
        )
        r!   r   r   r   r    r   createdatar   r!   r   r   r   r    	_responser   r   r   r%      s   -zCompositionPlanClient.create)__name__
__module____qualname__r   r   propertyr	   r   OMITstrtypingOptionalintr   Literalr   r%   r   r   r   r   r      *    r   c                   @   r
   )AsyncCompositionPlanClientr   c                C   r   r   )r   r   r   r   r   r   r   U   r   z#AsyncCompositionPlanClient.__init__r   c                 C   r   )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawCompositionPlanClient
        r   r   r   r   r   r   X   r   z,AsyncCompositionPlanClient.with_raw_responseNr   r!   r   r   r   r"   r    c                   s$   | j j|||||dI dH }|jS )a;  
        Create a composition plan for music generation. Usage of this endpoint does not cost any credits but is subject to rate limiting depending on your tier.

        Parameters
        ----------
        prompt : str
            A simple text prompt to compose a plan from.

        music_length_ms : typing.Optional[int]
            The length of the composition plan to generate in milliseconds. Must be between 3000ms and 300000ms. Optional - if not provided, the model will choose a length based on the prompt.

        source_composition_plan : typing.Optional[MusicPrompt]
            An optional composition plan to use as a source for the new composition plan.

        model_id : typing.Optional[typing.Literal["music_v1"]]
            The model to use for the generation.

        request_options : typing.Optional[RequestOptions]
            Request-specific configuration.

        Returns
        -------
        MusicPrompt
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.music.composition_plan.create(
                prompt="prompt",
            )


        asyncio.run(main())
        r#   Nr$   r'   r   r   r   r%   c   s   5z!AsyncCompositionPlanClient.create)r)   r*   r+   r   r   r,   r   r   r-   r.   r/   r0   r1   r   r2   r   r%   r   r   r   r   r4   T   r3   r4   )r/   core.client_wrapperr   r   core.request_optionsr   types.music_promptr   
raw_clientr   r	   castAnyr-   r   r4   r   r   r   r   <module>   s   F