
    b6iv                         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 j                  e j                  d      Z G d	 d
      Z G d d      Zy)    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)MusicPrompt   )AsyncRawCompositionPlanClientRawCompositionPlanClient.c                       e Zd ZdefdZedef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Zy)CompositionPlanClientclient_wrapperc                &    t        |      | _        y N)r   )r
   _raw_clientselfr   s     s/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/music/composition_plan/client.py__init__zCompositionPlanClient.__init__   s    3>R    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawCompositionPlanClient
        r   r   s    r   with_raw_responsez'CompositionPlanClient.with_raw_response        r   Nmusic_length_mssource_composition_planmodel_idrequest_optionspromptr   r   r   music_v1r    c                Z    | j                   j                  |||||      }|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 600000ms. 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    	_responses          r   r&   zCompositionPlanClient.create   s;    Z $$+++$;+ , 
	 ~~r   )__name__
__module____qualname__r   r   propertyr
   r   OMITstrtypingOptionalintr   Literalr   r&    r   r   r   r      s    S*; S  #;     15@D@D;?4 4  -	4
 "(!=4 //&.."<=4  84 
4r   r   c                       e Zd ZdefdZedef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Zy)AsyncCompositionPlanClientr   c                &    t        |      | _        y r   )r	   r   r   s     r   r   z#AsyncCompositionPlanClient.__init__U   s    8Wr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawCompositionPlanClient
        r   r   s    r   r   z,AsyncCompositionPlanClient.with_raw_responseX   r   r   Nr   r!   r   r   r   r"   r    c                v   K   | j                   j                  |||||       d{   }|j                  S 7 w)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 600000ms. 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(   s          r   r&   z!AsyncCompositionPlanClient.createc   sI     j **11+$;+ 2 
 
	 ~~
s   $979)r*   r+   r,   r   r   r-   r	   r   r.   r/   r0   r1   r2   r   r3   r   r&   r4   r   r   r6   r6   T   s    X*< X  #@     15@D@D;?< <  -	<
 "(!=< //&.."<=<  8< 
<r   r6   )r0   core.client_wrapperr   r   core.request_optionsr   types.music_promptr   
raw_clientr	   r
   castAnyr.   r   r6   r4   r   r   <module>r@      sG     H 2 - O v{{6::s#C CLK Kr   