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

        Returns
        -------
        RawFeedbackClient
        r   r   s    r   with_raw_responsez FeedbackClient.with_raw_response        r   Nfeedbackrequest_optionsconversation_idr   r   c                V    | j                   j                  |||      }|j                  S )aC  
        Send the feedback for the given conversation

        Parameters
        ----------
        conversation_id : str
            The id of the conversation you're taking the action on.

        feedback : typing.Optional[UserFeedbackScore]
            Either 'like' or 'dislike' to indicate the feedback for the conversation.

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

        Returns
        -------
        typing.Any
            Successful Response

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

        client = ElevenLabs(
            api_key="YOUR_API_KEY",
        )
        client.conversational_ai.conversations.feedback.create(
            conversation_id="21m00Tcm4TlvDq8ikWAM",
            feedback="like",
        )
        r   r   createdatar   r   r   r   	_responses        r   r"   zFeedbackClient.create   s-    L $$++Oh`o+p	~~r   )__name__
__module____qualname__r   r   propertyr
   r   OMITstrtypingOptionalr   r   Anyr"    r   r   r   r      sw    L*; L  #4     8<;?'' //"34	'
  8' 
'r   r   c            	           e Zd ZdefdZedefd       Zeddde	de
j                  e   d	e
j                  e   de
j                  fd
Zy)AsyncFeedbackClientr   c                &    t        |      | _        y r   )r	   r   r   s     r   r   zAsyncFeedbackClient.__init__H   s    1Pr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawFeedbackClient
        r   r   s    r   r   z%AsyncFeedbackClient.with_raw_responseK   r   r   Nr   r   r   r   c                r   K   | j                   j                  |||       d{   }|j                  S 7 w)a  
        Send the feedback for the given conversation

        Parameters
        ----------
        conversation_id : str
            The id of the conversation you're taking the action on.

        feedback : typing.Optional[UserFeedbackScore]
            Either 'like' or 'dislike' to indicate the feedback for the conversation.

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

        Returns
        -------
        typing.Any
            Successful Response

        Examples
        --------
        import asyncio

        from elevenlabs import AsyncElevenLabs

        client = AsyncElevenLabs(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.conversational_ai.conversations.feedback.create(
                conversation_id="21m00Tcm4TlvDq8ikWAM",
                feedback="like",
            )


        asyncio.run(main())
        r   Nr!   r$   s        r   r"   zAsyncFeedbackClient.createV   s:     \ **11/Hfu1vv	~~ ws   "757)r&   r'   r(   r   r   r)   r	   r   r*   r+   r,   r-   r   r   r.   r"   r/   r   r   r1   r1   G   sw    Q*< Q  #9     8<;?// //"34	/
  8/ 
/r   r1   )r,   core.client_wrapperr   r   core.request_optionsr   types.user_feedback_scorer   
raw_clientr	   r
   castr.   r*   r   r1   r/   r   r   <module>r:      sC     I 3 ; A v{{6::s#6 6r> >r   