§
     jB0  ã                   ó¾   — d dl Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	m
Z
 ddlmZ dd	lmZ  e j        e j        d
¦  «        Z G d„ d¦  «        Z G d„ d¦  «        ZdS )é    Né   )ÚComment)ÚAsyncClientWrapperÚSyncClientWrapper)ÚRequestOptionsé   )ÚAsyncRawCommentsClientÚRawCommentsClient)ÚCreateCommentResponse)ÚGetCommentsResponse.c                   óv  — e Zd Zdefd„Zedefd„¦   «         Zeddœde	de	d	e	d
e	de
j        e	         de
j        e         defd„Zdddddddœde
j        e         de
j        e         de
j        e	         d	e
j        e	         de
j        e	         de
j        e         defd„Zddœde	de
j        e         defd„ZdS )ÚCommentsClientÚclient_wrapperc                ó0   — t          |¬¦  «        | _        d S ©N)r   )r
   Ú_raw_client©Úselfr   s     úf/lsinfo/ai/hellotax_ai/base_platform/venv/lib/python3.11/site-packages/langfuse/api/comments/client.pyÚ__init__zCommentsClient.__init__   s   € Ý,¸NÐKÑKÔKˆÔÐÐó    Úreturnc                 ó   — | j         S )z–
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawCommentsClient
        ©r   ©r   s    r   Úwith_raw_responsez CommentsClient.with_raw_response   ó   € ð ÔÐr   N©Úauthor_user_idÚrequest_optionsÚ
project_idÚobject_typeÚ	object_idÚcontentr   r    c                óP   — | j                              ||||||¬¦  «        }|j        S )a  
        Create a comment. Comments may be attached to different object types (trace, observation, session, prompt).

        Parameters
        ----------
        project_id : str
            The id of the project to attach the comment to.

        object_type : str
            The type of the object to attach the comment to (trace, observation, session, prompt).

        object_id : str
            The id of the object to attach the comment to. If this does not reference a valid existing object, an error will be thrown.

        content : str
            The content of the comment. May include markdown. Currently limited to 5000 characters.

        author_user_id : typing.Optional[str]
            The id of the user who created the comment.

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

        Returns
        -------
        CreateCommentResponse

        Examples
        --------
        from langfuse import LangfuseAPI

        client = LangfuseAPI(
            x_langfuse_sdk_name="YOUR_X_LANGFUSE_SDK_NAME",
            x_langfuse_sdk_version="YOUR_X_LANGFUSE_SDK_VERSION",
            x_langfuse_public_key="YOUR_X_LANGFUSE_PUBLIC_KEY",
            username="YOUR_USERNAME",
            password="YOUR_PASSWORD",
            base_url="https://yourhost.com/path/to/api",
        )
        client.comments.create(
            project_id="projectId",
            object_type="objectType",
            object_id="objectId",
            content="content",
        )
        ©r!   r"   r#   r$   r   r    ©r   ÚcreateÚdata©r   r!   r"   r#   r$   r   r    Ú	_responses           r   r(   zCommentsClient.create   s>   € ðp Ô$×+Ò+Ø!Ø#ØØØ)Ø+ð ,ñ 
ô 
ˆ	ð Œ~Ðr   ©ÚpageÚlimitr"   r#   r   r    r-   r.   c                óP   — | j                              ||||||¬¦  «        }|j        S )a  
        Get all comments

        Parameters
        ----------
        page : typing.Optional[int]
            Page number, starts at 1.

        limit : typing.Optional[int]
            Limit of items per page. If you encounter api issues due to too large page sizes, try to reduce the limit

        object_type : typing.Optional[str]
            Filter comments by object type (trace, observation, session, prompt).

        object_id : typing.Optional[str]
            Filter comments by object id. If objectType is not provided, an error will be thrown.

        author_user_id : typing.Optional[str]
            Filter comments by author user id.

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

        Returns
        -------
        GetCommentsResponse

        Examples
        --------
        from langfuse import LangfuseAPI

        client = LangfuseAPI(
            x_langfuse_sdk_name="YOUR_X_LANGFUSE_SDK_NAME",
            x_langfuse_sdk_version="YOUR_X_LANGFUSE_SDK_VERSION",
            x_langfuse_public_key="YOUR_X_LANGFUSE_PUBLIC_KEY",
            username="YOUR_USERNAME",
            password="YOUR_PASSWORD",
            base_url="https://yourhost.com/path/to/api",
        )
        client.comments.get()
        r,   ©r   Úgetr)   ©r   r-   r.   r"   r#   r   r    r+   s           r   r1   zCommentsClient.geta   s>   € ðf Ô$×(Ò(ØØØ#ØØ)Ø+ð )ñ 
ô 
ˆ	ð Œ~Ðr   ©r    Ú
comment_idc                óH   — | j                              ||¬¦  «        }|j        S )a>  
        Get a comment by id

        Parameters
        ----------
        comment_id : str
            The unique langfuse identifier of a comment

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

        Returns
        -------
        Comment

        Examples
        --------
        from langfuse import LangfuseAPI

        client = LangfuseAPI(
            x_langfuse_sdk_name="YOUR_X_LANGFUSE_SDK_NAME",
            x_langfuse_sdk_version="YOUR_X_LANGFUSE_SDK_VERSION",
            x_langfuse_public_key="YOUR_X_LANGFUSE_PUBLIC_KEY",
            username="YOUR_USERNAME",
            password="YOUR_PASSWORD",
            base_url="https://yourhost.com/path/to/api",
        )
        client.comments.get_by_id(
            comment_id="commentId",
        )
        r3   ©r   Ú	get_by_idr)   ©r   r4   r    r+   s       r   r7   zCommentsClient.get_by_idž   s1   € ðJ Ô$×.Ò.Ø¨ð /ñ 
ô 
ˆ	ð Œ~Ðr   )Ú__name__Ú
__module__Ú__qualname__r   r   Úpropertyr
   r   ÚOMITÚstrÚtypingÚOptionalr   r   r(   Úintr   r1   r   r7   © r   r   r   r      sÏ  € € € € € ðLÐ*;ð Lð Lð Lð Lð ð Ð#4ð  ð  ð  ñ „Xð ð" 04Ø;?ð@ð @ð @ð ð@ð ð	@ð
 ð@ð ð@ð œ¨Ô,ð@ð  œ¨Ô8ð@ð 
ð@ð @ð @ð @ðJ &*Ø&*Ø,0Ø*.Ø/3Ø;?ð;ð ;ð ;ð Œo˜cÔ"ð;ð Œ˜sÔ#ð	;ð
 ”_ SÔ)ð;ð ”? 3Ô'ð;ð œ¨Ô,ð;ð  œ¨Ô8ð;ð 
ð;ð ;ð ;ð ;ðB <@ð	(ð (ð (àð(ð  œ¨Ô8ð	(ð
 
ð(ð (ð (ð (ð (ð (r   r   c                   óv  — e Zd Zdefd„Zedefd„¦   «         Zeddœde	de	d	e	d
e	de
j        e	         de
j        e         defd„Zdddddddœde
j        e         de
j        e         de
j        e	         d	e
j        e	         de
j        e	         de
j        e         defd„Zddœde	de
j        e         defd„ZdS )ÚAsyncCommentsClientr   c                ó0   — t          |¬¦  «        | _        d S r   )r	   r   r   s     r   r   zAsyncCommentsClient.__init__Ê   s   € Ý1ÀÐPÑPÔPˆÔÐÐr   r   c                 ó   — | j         S )z›
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawCommentsClient
        r   r   s    r   r   z%AsyncCommentsClient.with_raw_responseÍ   r   r   Nr   r!   r"   r#   r$   r   r    c             ƒ   ó`   K  — | j                              ||||||¬¦  «        ƒ d{V —†}|j        S )a  
        Create a comment. Comments may be attached to different object types (trace, observation, session, prompt).

        Parameters
        ----------
        project_id : str
            The id of the project to attach the comment to.

        object_type : str
            The type of the object to attach the comment to (trace, observation, session, prompt).

        object_id : str
            The id of the object to attach the comment to. If this does not reference a valid existing object, an error will be thrown.

        content : str
            The content of the comment. May include markdown. Currently limited to 5000 characters.

        author_user_id : typing.Optional[str]
            The id of the user who created the comment.

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

        Returns
        -------
        CreateCommentResponse

        Examples
        --------
        import asyncio

        from langfuse import AsyncLangfuseAPI

        client = AsyncLangfuseAPI(
            x_langfuse_sdk_name="YOUR_X_LANGFUSE_SDK_NAME",
            x_langfuse_sdk_version="YOUR_X_LANGFUSE_SDK_VERSION",
            x_langfuse_public_key="YOUR_X_LANGFUSE_PUBLIC_KEY",
            username="YOUR_USERNAME",
            password="YOUR_PASSWORD",
            base_url="https://yourhost.com/path/to/api",
        )


        async def main() -> None:
            await client.comments.create(
                project_id="projectId",
                object_type="objectType",
                object_id="objectId",
                content="content",
            )


        asyncio.run(main())
        r&   Nr'   r*   s           r   r(   zAsyncCommentsClient.createØ   s`   è è € ð@ Ô*×1Ò1Ø!Ø#ØØØ)Ø+ð 2ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
ˆ	ð Œ~Ðr   r,   r-   r.   c             ƒ   ó`   K  — | j                              ||||||¬¦  «        ƒ d{V —†}|j        S )a  
        Get all comments

        Parameters
        ----------
        page : typing.Optional[int]
            Page number, starts at 1.

        limit : typing.Optional[int]
            Limit of items per page. If you encounter api issues due to too large page sizes, try to reduce the limit

        object_type : typing.Optional[str]
            Filter comments by object type (trace, observation, session, prompt).

        object_id : typing.Optional[str]
            Filter comments by object id. If objectType is not provided, an error will be thrown.

        author_user_id : typing.Optional[str]
            Filter comments by author user id.

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

        Returns
        -------
        GetCommentsResponse

        Examples
        --------
        import asyncio

        from langfuse import AsyncLangfuseAPI

        client = AsyncLangfuseAPI(
            x_langfuse_sdk_name="YOUR_X_LANGFUSE_SDK_NAME",
            x_langfuse_sdk_version="YOUR_X_LANGFUSE_SDK_VERSION",
            x_langfuse_public_key="YOUR_X_LANGFUSE_PUBLIC_KEY",
            username="YOUR_USERNAME",
            password="YOUR_PASSWORD",
            base_url="https://yourhost.com/path/to/api",
        )


        async def main() -> None:
            await client.comments.get()


        asyncio.run(main())
        r,   Nr0   r2   s           r   r1   zAsyncCommentsClient.get"  s`   è è € ðv Ô*×.Ò.ØØØ#ØØ)Ø+ð /ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
ˆ	ð Œ~Ðr   r3   r4   c             ƒ   óX   K  — | j                              ||¬¦  «        ƒ d{V —†}|j        S )a´  
        Get a comment by id

        Parameters
        ----------
        comment_id : str
            The unique langfuse identifier of a comment

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

        Returns
        -------
        Comment

        Examples
        --------
        import asyncio

        from langfuse import AsyncLangfuseAPI

        client = AsyncLangfuseAPI(
            x_langfuse_sdk_name="YOUR_X_LANGFUSE_SDK_NAME",
            x_langfuse_sdk_version="YOUR_X_LANGFUSE_SDK_VERSION",
            x_langfuse_public_key="YOUR_X_LANGFUSE_PUBLIC_KEY",
            username="YOUR_USERNAME",
            password="YOUR_PASSWORD",
            base_url="https://yourhost.com/path/to/api",
        )


        async def main() -> None:
            await client.comments.get_by_id(
                comment_id="commentId",
            )


        asyncio.run(main())
        r3   Nr6   r8   s       r   r7   zAsyncCommentsClient.get_by_idg  sS   è è € ðZ Ô*×4Ò4Ø¨ð 5ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
ˆ	ð Œ~Ðr   )r9   r:   r;   r   r   r<   r	   r   r=   r>   r?   r@   r   r   r(   rA   r   r1   r   r7   rB   r   r   rD   rD   É   sÜ  € € € € € ðQÐ*<ð Qð Qð Qð Qð ð Ð#9ð  ð  ð  ñ „Xð ð" 04Ø;?ðHð Hð Hð ðHð ð	Hð
 ðHð ðHð œ¨Ô,ðHð  œ¨Ô8ðHð 
ðHð Hð Hð HðZ &*Ø&*Ø,0Ø*.Ø/3Ø;?ðCð Cð Cð Œo˜cÔ"ðCð Œ˜sÔ#ð	Cð
 ”_ SÔ)ðCð ”? 3Ô'ðCð œ¨Ô,ðCð  œ¨Ô8ðCð 
ðCð Cð Cð CðR <@ð	0ð 0ð 0àð0ð  œ¨Ô8ð	0ð
 
ð0ð 0ð 0ð 0ð 0ð 0r   rD   )r?   Úcommons.types.commentr   Úcore.client_wrapperr   r   Úcore.request_optionsr   Ú
raw_clientr	   r
   Útypes.create_comment_responser   Útypes.get_comments_responser   ÚcastÚAnyr=   r   rD   rB   r   r   ú<module>rR      s  ðð €€€à +Ð +Ð +Ð +Ð +Ð +Ø GÐ GÐ GÐ GÐ GÐ GÐ GÐ GØ 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø AÐ AÐ AÐ AÐ AÐ AÐ AÐ AØ @Ð @Ð @Ð @Ð @Ð @Ø <Ð <Ð <Ð <Ð <Ð <ð €v„{6”:˜sÑ#Ô#€ðvð vð vð vð vñ vô vð vðrNð Nð Nð Nð Nñ Nô Nð Nð Nð Nr   