
    b6i                         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)LlmUsageCalculatorResponseModel   )AsyncRawLlmUsageClientRawLlmUsageClient.c                   j    e Zd ZdefdZedefd       Zdddeded	e	d
e
j                  e   def
dZy)LlmUsageClientclient_wrapperc                &    t        |      | _        y N)r   )r
   _raw_clientselfr   s     x/root/.openclaw/workspace/visionaryfx/venv/lib/python3.12/site-packages/elevenlabs/conversational_ai/llm_usage/client.py__init__zLlmUsageClient.__init__   s    ,NK    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawLlmUsageClient
        r   r   s    r   with_raw_responsez LlmUsageClient.with_raw_response        r   Nrequest_optionsprompt_lengthnumber_of_pagesrag_enabledr   c                X    | j                   j                  ||||      }|j                  S )a  
        Returns a list of LLM models and the expected cost for using them based on the provided values.

        Parameters
        ----------
        prompt_length : int
            Length of the prompt in characters.

        number_of_pages : int
            Pages of content in PDF documents or URLs in the agent's knowledge base.

        rag_enabled : bool
            Whether RAG is enabled.

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

        Returns
        -------
        LlmUsageCalculatorResponseModel
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.llm_usage.calculate(
            prompt_length=1,
            number_of_pages=1,
            rag_enabled=True,
        )
        r   r   r    r   r   	calculatedatar   r   r   r    r   	_responses         r   r$   zLlmUsageClient.calculate   s8    V $$..'+#+	 / 
	 ~~r   )__name__
__module____qualname__r   r   propertyr
   r   intbooltypingOptionalr   r   r$    r   r   r   r      ss    L*; L  #4      <@1 1 	1
 1  81 
)1r   r   c                   j    e Zd ZdefdZedefd       Zdddeded	e	d
e
j                  e   def
dZy)AsyncLlmUsageClientr   c                &    t        |      | _        y r   )r	   r   r   s     r   r   zAsyncLlmUsageClient.__init__R   s    1Pr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawLlmUsageClient
        r   r   s    r   r   z%AsyncLlmUsageClient.with_raw_responseU   r   r   Nr   r   r   r    r   c                t   K   | j                   j                  ||||       d{   }|j                  S 7 w)a  
        Returns a list of LLM models and the expected cost for using them based on the provided values.

        Parameters
        ----------
        prompt_length : int
            Length of the prompt in characters.

        number_of_pages : int
            Pages of content in PDF documents or URLs in the agent's knowledge base.

        rag_enabled : bool
            Whether RAG is enabled.

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

        Returns
        -------
        LlmUsageCalculatorResponseModel
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.llm_usage.calculate(
                prompt_length=1,
                number_of_pages=1,
                rag_enabled=True,
            )


        asyncio.run(main())
        r"   Nr#   r&   s         r   r$   zAsyncLlmUsageClient.calculate`   sF     f **44'+#+	 5 
 
	 ~~
s   #868)r(   r)   r*   r   r   r+   r	   r   r,   r-   r.   r/   r   r   r$   r0   r   r   r2   r2   Q   ss    Q*< Q  #9      <@9 9 	9
 9  89 
)9r   r2   )r.   core.client_wrapperr   r   core.request_optionsr   )types.llm_usage_calculator_response_modelr   
raw_clientr	   r
   castAnyOMITr   r2   r0   r   r   <module>r=      sG     H 2 X A v{{6::s#@ @FH Hr   