
    j                        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	 ddl
mZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZmZ ddl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!y)    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)JsonNodeWrite)PromptDetail)PromptPagePublic)PromptVersionDetail)PromptVersionLinkPublic)PromptVersionPagePublic)PromptVersionUpdate   )AsyncRawPromptsClientRawPromptsClient)*CreatePromptVersionDetailTemplateStructure)PromptWriteTemplateStructure)PromptWriteType.c                      e Zd ZdefdZedefd       Zd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j                  e   defdZeeeeeeeeeeddd	e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j                  e   dej                  e   dej                  e   dej                  ej&                  e      dej                  e   ddfdZeeeeddd	ededej                  e   dej                  ej&                  e      d
ej                  e   dej                  e   dej                  e   defdZedddej&                  e   d ed!ej                  e   dej                  e   ddf
d"Zdd#dedej                  e   defd$Zeedd%ded	edej                  e   dej                  ej&                  e      dej                  e   ddfd&Zdd#dedej                  e   ddfd'Zdd#dej&                  e   dej                  e   ddfd(Zdd#d)edej                  e   defd*Z dd#d+edej                  e   defd,Z!ddddddd-de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#d0ej&                  e   dej                  e   dejH                  e%   fd1Z&dd#d2ed+edej                  e   defd3Z'eedd4d	ed)ej                  e   dej                  e   dej                  e   def
d5Z(y)6PromptsClientclient_wrapperc                &    t        |      | _        y N)r   )r   _raw_clientselfr   s     u/Users/manta/Documents/Projects/TheRoad-I1/backend/.venv/lib/python3.12/site-packages/opik/rest_api/prompts/client.py__init__zPromptsClient.__init__   s    +>J    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawPromptsClient
        r   r   s    r   with_raw_responsezPromptsClient.with_raw_response        r   Npagesizename
project_idsortingfiltersrequest_optionsr&   r'   r(   r)   r*   r+   r,   c          	      ^    | j                   j                  |||||||      }|j                  S )a  
        Get prompts

        Parameters
        ----------
        page : typing.Optional[int]

        size : typing.Optional[int]

        name : typing.Optional[str]

        project_id : typing.Optional[str]

        sorting : typing.Optional[str]

        filters : typing.Optional[str]

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

        Returns
        -------
        PromptPagePublic
            OK

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.prompts.get_prompts()
        r%   r   get_promptsdata	r   r&   r'   r(   r)   r*   r+   r,   	_responses	            r   r/   zPromptsClient.get_prompts&   sA    T $$00!+ 1 
	 ~~r   idr)   project_namedescriptiontemplatemetadatachange_descriptiontypetemplate_structuretagsr,   r4   r5   r6   r7   r8   r9   r:   r;   r<   c                h    | j                   j                  |||||||||	|
||      }|j                  S )aM  
        Create prompt

        Parameters
        ----------
        name : str

        id : typing.Optional[str]

        project_id : typing.Optional[str]
            Project ID. Takes precedence over project_name when both are provided.

        project_name : typing.Optional[str]
            For project scope, specify either project_id or project_name. If project_name is provided and the project does not exist, it will be created. Ignored when project_id is provided. If neither is provided, the prompt is created at workspace level.

        description : typing.Optional[str]

        template : typing.Optional[str]

        metadata : typing.Optional[JsonNodeWrite]

        change_description : typing.Optional[str]

        type : typing.Optional[PromptWriteType]

        template_structure : typing.Optional[PromptWriteTemplateStructure]
            Template structure type: 'text' or 'chat'. Immutable after creation.

        tags : typing.Optional[typing.Sequence[str]]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.prompts.create_prompt(name='name', )
        r(   r4   r)   r5   r6   r7   r8   r9   r:   r;   r<   r,   r   create_promptr0   r   r(   r4   r)   r5   r6   r7   r8   r9   r:   r;   r<   r,   r2   s                 r   r@   zPromptsClient.create_prompt[   sP    v $$22!%#11+ 3 
	 ~~r   r;   %exclude_blueprint_update_for_projectsr)   r5   r,   versionrC   c          	      ^    | j                   j                  |||||||      }|j                  S )a  
        Create prompt version

        Parameters
        ----------
        name : str

        version : PromptVersionDetail

        template_structure : typing.Optional[CreatePromptVersionDetailTemplateStructure]
            Template structure for the prompt: 'text' or 'chat'. Note: This field is only used when creating a new prompt. If a prompt with the given name already exists, this field is ignored and the existing prompt's template structure is used. Template structure is immutable after prompt creation.

        exclude_blueprint_update_for_projects : typing.Optional[typing.Sequence[str]]
            Optional set of project IDs to exclude from automatic blueprint creation when this prompt version is committed.

        project_id : typing.Optional[str]
            Project ID. Takes precedence over project_name when both are provided.

        project_name : typing.Optional[str]
            If provided, scopes the prompt to the specified project. Ignored when project_id is provided.

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

        Returns
        -------
        PromptVersionDetail
            OK

        Examples
        --------
        from Opik import OpikApi
        from Opik import PromptVersionDetail
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.prompts.create_prompt_version(name='name', version=PromptVersionDetail(template='template', ), )
        r(   rD   r;   rC   r)   r5   r,   r   create_prompt_versionr0   	r   r(   rD   r;   rC   r)   r5   r,   r2   s	            r   rH   z#PromptsClient.create_prompt_version   sA    ^ $$::12W!%+ ; 
	 ~~r   
merge_tagsr,   idsupdaterK   c                X    | j                   j                  ||||      }|j                  S )a  
        Update one or more prompt versions.

        Note: Prompt versions are immutable by design.
        Only organizational properties, such as tags etc., can be updated.
        Core properties like template and metadata cannot be modified after creation.

        PATCH semantics:
        - non-empty values update the field
        - null values preserve existing field values (no change)
        - empty values explicitly clear the field

        Parameters
        ----------
        ids : typing.Sequence[str]
            IDs of prompt versions to update

        update : PromptVersionUpdate

        merge_tags : typing.Optional[bool]
            Tag merge behavior:
            - true: Add new tags to existing tags (union)
            - false: Replace all existing tags with new tags (default behaviour if not provided)

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import OpikApi
        from Opik import PromptVersionUpdate
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.prompts.update_prompt_versions(ids=['ids'], update=PromptVersionUpdate(), )
        rL   rM   rK   r,   r   update_prompt_versionsr0   r   rL   rM   rK   r,   r2   s         r   rQ   z$PromptsClient.update_prompt_versions   s5    \ $$;;Fz? < 
	 ~~r   r,   c                T    | j                   j                  ||      }|j                  S )a  
        Get prompt by id

        Parameters
        ----------
        id : str

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

        Returns
        -------
        PromptDetail
            Prompt resource

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.prompts.get_prompt_by_id(id='id', )
        rS   r   get_prompt_by_idr0   r   r4   r,   r2   s       r   rV   zPromptsClient.get_prompt_by_id  s)    , $$55b/5Z	~~r   r6   r<   r,   c                Z    | j                   j                  |||||      }|j                  S )a<  
        Update prompt

        Parameters
        ----------
        id : str

        name : str

        description : typing.Optional[str]

        tags : typing.Optional[typing.Sequence[str]]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.prompts.update_prompt(id='id', name='name', )
        r(   r6   r<   r,   r   update_promptr0   r   r4   r(   r6   r<   r,   r2   s          r   r\   zPromptsClient.update_prompt,  s7    F $$22T{ 3 
	 ~~r   c                T    | j                   j                  ||      }|j                  S )a  
        Delete prompt

        Parameters
        ----------
        id : str

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.prompts.delete_prompt(id='id', )
        rS   r   delete_promptr0   rW   s       r   r`   zPromptsClient.delete_promptT  s)    * $$2222W	~~r   c                T    | j                   j                  ||      }|j                  S )a  
        Delete prompts batch

        Parameters
        ----------
        ids : typing.Sequence[str]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.prompts.delete_prompts_batch(ids=['ids'], )
        rL   r,   r   delete_prompts_batchr0   r   rL   r,   r2   s       r   rd   z"PromptsClient.delete_prompts_batchl  s*    . $$99cSb9c	~~r   commitc                T    | j                   j                  ||      }|j                  S )a  
        Get prompt by commit

        Parameters
        ----------
        commit : str

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

        Returns
        -------
        PromptDetail
            OK

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.prompts.get_prompt_by_commit(commit='commit', )
        rS   r   get_prompt_by_commitr0   r   rf   r,   r2   s       r   ri   z"PromptsClient.get_prompt_by_commit  s*    0 $$99&Ra9b	~~r   
version_idc                T    | j                   j                  ||      }|j                  S )a  
        Get prompt version by id

        Parameters
        ----------
        version_id : str

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

        Returns
        -------
        PromptVersionDetail
            Prompt version resource

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.prompts.get_prompt_version_by_id(version_id='versionId', )
        rS   r   get_prompt_version_by_idr0   r   rk   r,   r2   s       r   rn   z&PromptsClient.get_prompt_version_by_id  s*    0 $$==jZi=j	~~r   r&   r'   searchr*   r+   r,   rq   c          	      ^    | j                   j                  |||||||      }|j                  S )a  
        Get prompt versions

        Parameters
        ----------
        id : str

        page : typing.Optional[int]

        size : typing.Optional[int]

        search : typing.Optional[str]
            Search text to find in template or change description fields

        sorting : typing.Optional[str]

        filters : typing.Optional[str]

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

        Returns
        -------
        PromptVersionPagePublic
            OK

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.prompts.get_prompt_versions(id='id', )
        rp   r   get_prompt_versionsr0   	r   r4   r&   r'   rq   r*   r+   r,   r2   s	            r   rt   z!PromptsClient.get_prompt_versions  s<    V $$88TVWggv 9 
	 ~~r   commitsc                T    | j                   j                  ||      }|j                  S )a+  
        Get prompts by prompt version commits

        Parameters
        ----------
        commits : typing.Sequence[str]

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

        Returns
        -------
        typing.List[PromptVersionLinkPublic]
            OK

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.prompts.get_prompts_by_commits(commits=['commits'], )
        rv   r,   r   get_prompts_by_commitsr0   r   rv   r,   r2   s       r   rz   z$PromptsClient.get_prompts_by_commits  s*    0 $$;;G]l;m	~~r   	prompt_idc                V    | j                   j                  |||      }|j                  S )aw  
        Restore a prompt version by creating a new version with the content from the specified version

        Parameters
        ----------
        prompt_id : str

        version_id : str

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

        Returns
        -------
        PromptVersionDetail
            OK

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.prompts.restore_prompt_version(prompt_id='promptId', version_id='versionId', )
        rS   r   restore_prompt_versionr0   r   r|   rk   r,   r2   s        r   r   z$PromptsClient.restore_prompt_version  s,    4 $$;;Izcr;s	~~r   rf   r5   r,   c                X    | j                   j                  ||||      }|j                  S )a  
        Retrieve prompt version

        Parameters
        ----------
        name : str

        commit : typing.Optional[str]

        project_name : typing.Optional[str]
            If provided, scopes the search to the specified project

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

        Returns
        -------
        PromptVersionDetail
            OK

        Examples
        --------
        from Opik import OpikApi
        client = OpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        client.prompts.retrieve_prompt_version(name='name', )
        r(   rf   r5   r,   r   retrieve_prompt_versionr0   r   r(   rf   r5   r,   r2   s         r   r   z%PromptsClient.retrieve_prompt_version$  s6    D $$<<f<Q` = 
	 ~~r   ))__name__
__module____qualname__r   r   propertyr   r#   typingOptionalintstrr   r	   r/   OMITr   r   r   Sequencer@   r
   r   rH   r   boolrQ   r   rV   r\   r`   rd   ri   rn   r   rt   Listr   rz   r   r    r   r   r   r      s   K*; K  #3     &*%)%)+/(,(,;?3 ooc"3 ooc"	3
 ooc"3 OOC(3 %3 %3  83 
3r $(+/-1,0)-373715LP6:;?I I OOC 	I
 OOC(I ooc*I __S)I //#&I //-0I #OOC0I ooo.I #OO,HII oofooc23I  8I 
I` [_W[+/-1;?8 8 %	8
 #OO,VW8 06vs?S/T8 OOC(8 ooc*8  88 
8~ -1;?1 __S!1 $	1
 OOD)1  81 
1f _c 3 FOON<[ gs < -16:;?&& 	&
 __S)& oofooc23&  8& 
&P \`  9X dh 2 `dooc*=C__^=\	6 RV/5~/N	8 VZ39??>3R	> &*%)'+(,(,;?.. ooc"	.
 ooc". $. %. %.  8. 
!.b dh //#.AGQ_A`	,	-8 fj*-CI??SaCb	B (,-1;?% % $	%
 ooc*%  8% 
%r   r   c                      e Zd ZdefdZedefd       Zd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j                  e   defdZeeeeeeeeeeddd	e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j                  e   dej                  e   dej                  e   dej                  ej&                  e      dej                  e   ddfdZeeeeddd	ededej                  e   dej                  ej&                  e      d
ej                  e   dej                  e   dej                  e   defdZedddej&                  e   d ed!ej                  e   dej                  e   ddf
d"Zdd#dedej                  e   defd$Zeedd%ded	edej                  e   dej                  ej&                  e      dej                  e   ddfd&Zdd#dedej                  e   ddfd'Zdd#dej&                  e   dej                  e   ddfd(Zdd#d)edej                  e   defd*Z dd#d+edej                  e   defd,Z!ddddddd-de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#d0ej&                  e   dej                  e   dejH                  e%   fd1Z&dd#d2ed+edej                  e   defd3Z'eedd4d	ed)ej                  e   dej                  e   dej                  e   def
d5Z(y)6AsyncPromptsClientr   c                &    t        |      | _        y r   )r   r   r   s     r   r   zAsyncPromptsClient.__init__M  s    0Or   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawPromptsClient
        r!   r"   s    r   r#   z$AsyncPromptsClient.with_raw_responseP  r$   r   Nr%   r&   r'   r(   r)   r*   r+   r,   c          	      z   K   | j                   j                  |||||||       d{   }|j                  S 7 w)a  
        Get prompts

        Parameters
        ----------
        page : typing.Optional[int]

        size : typing.Optional[int]

        name : typing.Optional[str]

        project_id : typing.Optional[str]

        sorting : typing.Optional[str]

        filters : typing.Optional[str]

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

        Returns
        -------
        PromptPagePublic
            OK

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.prompts.get_prompts()
        asyncio.run(main())
        r%   Nr.   r1   s	            r   r/   zAsyncPromptsClient.get_prompts[  sO     Z **66!+ 7 
 
	 ~~
   &;9;r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   c                   K   | j                   j                  |||||||||	|
||       d{   }|j                  S 7 w)a  
        Create prompt

        Parameters
        ----------
        name : str

        id : typing.Optional[str]

        project_id : typing.Optional[str]
            Project ID. Takes precedence over project_name when both are provided.

        project_name : typing.Optional[str]
            For project scope, specify either project_id or project_name. If project_name is provided and the project does not exist, it will be created. Ignored when project_id is provided. If neither is provided, the prompt is created at workspace level.

        description : typing.Optional[str]

        template : typing.Optional[str]

        metadata : typing.Optional[JsonNodeWrite]

        change_description : typing.Optional[str]

        type : typing.Optional[PromptWriteType]

        template_structure : typing.Optional[PromptWriteTemplateStructure]
            Template structure type: 'text' or 'chat'. Immutable after creation.

        tags : typing.Optional[typing.Sequence[str]]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.prompts.create_prompt(name='name', )
        asyncio.run(main())
        r>   Nr?   rA   s                 r   r@   z AsyncPromptsClient.create_prompt  s^     | **88!%#11+ 9 
 
	 ~~
s   +A >A rB   rD   rC   c          	      z   K   | j                   j                  |||||||       d{   }|j                  S 7 w)aN  
        Create prompt version

        Parameters
        ----------
        name : str

        version : PromptVersionDetail

        template_structure : typing.Optional[CreatePromptVersionDetailTemplateStructure]
            Template structure for the prompt: 'text' or 'chat'. Note: This field is only used when creating a new prompt. If a prompt with the given name already exists, this field is ignored and the existing prompt's template structure is used. Template structure is immutable after prompt creation.

        exclude_blueprint_update_for_projects : typing.Optional[typing.Sequence[str]]
            Optional set of project IDs to exclude from automatic blueprint creation when this prompt version is committed.

        project_id : typing.Optional[str]
            Project ID. Takes precedence over project_name when both are provided.

        project_name : typing.Optional[str]
            If provided, scopes the prompt to the specified project. Ignored when project_id is provided.

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

        Returns
        -------
        PromptVersionDetail
            OK

        Examples
        --------
        from Opik import AsyncOpikApi
        from Opik import PromptVersionDetail
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.prompts.create_prompt_version(name='name', version=PromptVersionDetail(template='template', ), )
        asyncio.run(main())
        rF   NrG   rI   s	            r   rH   z(AsyncPromptsClient.create_prompt_version  sP     d **@@12W!%+ A 
 
	 ~~
r   rJ   rL   rM   rK   c                t   K   | j                   j                  ||||       d{   }|j                  S 7 w)an  
        Update one or more prompt versions.

        Note: Prompt versions are immutable by design.
        Only organizational properties, such as tags etc., can be updated.
        Core properties like template and metadata cannot be modified after creation.

        PATCH semantics:
        - non-empty values update the field
        - null values preserve existing field values (no change)
        - empty values explicitly clear the field

        Parameters
        ----------
        ids : typing.Sequence[str]
            IDs of prompt versions to update

        update : PromptVersionUpdate

        merge_tags : typing.Optional[bool]
            Tag merge behavior:
            - true: Add new tags to existing tags (union)
            - false: Replace all existing tags with new tags (default behaviour if not provided)

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import AsyncOpikApi
        from Opik import PromptVersionUpdate
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.prompts.update_prompt_versions(ids=['ids'], update=PromptVersionUpdate(), )
        asyncio.run(main())
        rO   NrP   rR   s         r   rQ   z)AsyncPromptsClient.update_prompt_versions  sD     b **AAFz? B 
 
	 ~~
   #868rS   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)aL  
        Get prompt by id

        Parameters
        ----------
        id : str

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

        Returns
        -------
        PromptDetail
            Prompt resource

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.prompts.get_prompt_by_id(id='id', )
        asyncio.run(main())
        rS   NrU   rW   s       r   rV   z#AsyncPromptsClient.get_prompt_by_idT  s7     6 **;;BP_;``	~~ a   !646rX   c                v   K   | j                   j                  |||||       d{   }|j                  S 7 w)a  
        Update prompt

        Parameters
        ----------
        id : str

        name : str

        description : typing.Optional[str]

        tags : typing.Optional[typing.Sequence[str]]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.prompts.update_prompt(id='id', name='name', )
        asyncio.run(main())
        rZ   Nr[   r]   s          r   r\   z AsyncPromptsClient.update_promptr  sE     L **88T{ 9 
 
	 ~~
s   $979c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)a"  
        Delete prompt

        Parameters
        ----------
        id : str

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.prompts.delete_prompt(id='id', )
        asyncio.run(main())
        rS   Nr_   rW   s       r   r`   z AsyncPromptsClient.delete_prompt  s6     0 **88_8]]	~~ ^r   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)aF  
        Delete prompts batch

        Parameters
        ----------
        ids : typing.Sequence[str]

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

        Returns
        -------
        None

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.prompts.delete_prompts_batch(ids=['ids'], )
        asyncio.run(main())
        rb   Nrc   re   s       r   rd   z'AsyncPromptsClient.delete_prompts_batch  s7     4 **??CYh?ii	~~ jr   rf   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)aS  
        Get prompt by commit

        Parameters
        ----------
        commit : str

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

        Returns
        -------
        PromptDetail
            OK

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.prompts.get_prompt_by_commit(commit='commit', )
        asyncio.run(main())
        rS   Nrh   rj   s       r   ri   z'AsyncPromptsClient.get_prompt_by_commit  s7     6 **??Xg?hh	~~ ir   rk   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)a  
        Get prompt version by id

        Parameters
        ----------
        version_id : str

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

        Returns
        -------
        PromptVersionDetail
            Prompt version resource

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.prompts.get_prompt_version_by_id(version_id='versionId', )
        asyncio.run(main())
        rS   Nrm   ro   s       r   rn   z+AsyncPromptsClient.get_prompt_version_by_id  s7     6 **CCJ`oCpp	~~ qr   rp   rq   c          	      z   K   | j                   j                  |||||||       d{   }|j                  S 7 w)aZ  
        Get prompt versions

        Parameters
        ----------
        id : str

        page : typing.Optional[int]

        size : typing.Optional[int]

        search : typing.Optional[str]
            Search text to find in template or change description fields

        sorting : typing.Optional[str]

        filters : typing.Optional[str]

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

        Returns
        -------
        PromptVersionPagePublic
            OK

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.prompts.get_prompt_versions(id='id', )
        asyncio.run(main())
        rp   Nrs   ru   s	            r   rt   z&AsyncPromptsClient.get_prompt_versions  sJ     \ **>>TVWggv ? 
 
	 ~~
r   rv   c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)a  
        Get prompts by prompt version commits

        Parameters
        ----------
        commits : typing.Sequence[str]

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

        Returns
        -------
        typing.List[PromptVersionLinkPublic]
            OK

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.prompts.get_prompts_by_commits(commits=['commits'], )
        asyncio.run(main())
        rx   Nry   r{   s       r   rz   z)AsyncPromptsClient.get_prompts_by_commitsD  s7     6 **AA'crAss	~~ tr   r|   c                r   K   | j                   j                  |||       d{   }|j                  S 7 w)a  
        Restore a prompt version by creating a new version with the content from the specified version

        Parameters
        ----------
        prompt_id : str

        version_id : str

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

        Returns
        -------
        PromptVersionDetail
            OK

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.prompts.restore_prompt_version(prompt_id='promptId', version_id='versionId', )
        asyncio.run(main())
        rS   Nr~   r   s        r   r   z)AsyncPromptsClient.restore_prompt_versionb  sA     : **AAz? B 
 
	 ~~
s   "757r   c                t   K   | j                   j                  ||||       d{   }|j                  S 7 w)a  
        Retrieve prompt version

        Parameters
        ----------
        name : str

        commit : typing.Optional[str]

        project_name : typing.Optional[str]
            If provided, scopes the search to the specified project

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

        Returns
        -------
        PromptVersionDetail
            OK

        Examples
        --------
        from Opik import AsyncOpikApi
        import asyncio
        client = AsyncOpikApi(api_key="YOUR_API_KEY", workspace_name="YOUR_WORKSPACE_NAME", )
        async def main() -> None:
            await client.prompts.retrieve_prompt_version(name='name', )
        asyncio.run(main())
        r   Nr   r   s         r   r   z*AsyncPromptsClient.retrieve_prompt_version  sE     J **BBf<Q` C 
 
	 ~~
r   ))r   r   r   r   r   r   r   r#   r   r   r   r   r   r	   r/   r   r   r   r   r   r@   r
   r   rH   r   r   rQ   r   rV   r\   r`   rd   ri   rn   r   rt   r   r   rz   r   r   r   r   r   r   r   L  s   P*< P  #8     &*%)%)+/(,(,;?6 ooc"6 ooc"	6
 ooc"6 OOC(6 %6 %6  86 
6x $(+/-1,0)-373715LP6:;?L L OOC 	L
 OOC(L ooc*L __S)L //#&L //-0L #OOC0L ooo.L #OO,HIL oofooc23L  8L 
Lf [_W[+/-1;?; ; %	;
 #OO,VW; 06vs?S/T; OOC(; ooc*;  8; 
;D -1;?4 __S!4 $	4
 OOD)4  84 
4n NR+1??>+J	F -16:;?)) 	)
 __S)) oofooc23)  8) 
)V bf c v~?^ jn 8 `dooc*=C__^=\	< RV/5~/N	> VZ39??>3R	D &*%)'+(,(,;?11 ooc"	1
 ooc"1 $1 %1 %1  81 
!1h dh //#.AGQ_A`	,	-> fj  *- CI??SaCb 	 L (,-1;?( ( $	(
 ooc*(  8( 
(r   r   )"r   core.client_wrapperr   r   core.request_optionsr   types.json_node_writer   types.prompt_detailr   types.prompt_page_publicr	   types.prompt_version_detailr
    types.prompt_version_link_publicr    types.prompt_version_page_publicr   types.prompt_version_updater   
raw_clientr   r   5types.create_prompt_version_detail_template_structurer   %types.prompt_write_template_structurer   types.prompt_write_typer   castAnyr   r   r   r   r   r   <module>r      sb     G 1 1 . 7 = F F = ? m O 4 v{{6::s#r rj`	 `	r   