
    ]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mZ  e j"                  e j$                  d      Z G d d      Z G d d      Zy)    N   )AsyncClientWrapperSyncClientWrapper)RequestOptions)InferenceRunCostEstimate)ProviderEnum)RefinedPromptResponse)ThirdPartyModelVersion   )AsyncRawVersionsClientRawVersionsClient.c                      e Zd ZdefdZedefd       Zdddede	j                  e   ddfd	Zddd
dede	j                  e   de	j                  e   de	j                  e   fdZeeeedddededed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de	j                  e   defdZdddedede	j                  e   ddfdZeeeeeeeddde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fdZdddedede	j                  e   defdZddddedede	j                  e   de	j                  e   def
dZddd deded!ed"ed#ed$e	j                  e   de	j                  e   defd%Zy)&VersionsClientclient_wrapperc                &    t        |      | _        y N)r   )r   _raw_clientselfr   s     R/root/env/lib/python3.12/site-packages/label_studio_sdk/prompts/versions/client.py__init__zVersionsClient.__init__   s    ,NK    returnc                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        RawVersionsClient
        r   r   s    r   with_raw_responsez VersionsClient.with_raw_response        r   Nrequest_optionsidr    c                T    | j                   j                  ||      }|j                  S )a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Get default prompt version name

        Parameters
        ----------
        id : int

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

        Returns
        -------
        None

        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.versions.get_default_version_name(
            id=1,
        )
        r   r   get_default_version_namedatar   r!   r    	_responses       r   r$   z'VersionsClient.get_default_version_name    s+    @ $$==bRa=b	~~r   orderingr    	prompt_idr)   c                V    | j                   j                  |||      }|j                  S )am  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        List all versions of a prompt.

        Parameters
        ----------
        prompt_id : int

        ordering : typing.Optional[str]
            Which field to use when ordering the results.

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

        Returns
        -------
        typing.List[ThirdPartyModelVersion]


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.versions.list(
            prompt_id=1,
        )
        r(   r   listr%   r   r*   r)   r    r'   s        r   r-   zVersionsClient.listC   s-    T $$)))hXg)h	~~r   model_provider_connectionorganizationparent_modelproviderr    promptprovider_model_idtitler0   r1   r2   r3   c                b    | j                   j                  |||||||||		      }
|
j                  S )aY  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Create a new version of a prompt.

        Parameters
        ----------
        prompt_id : int

        prompt : str
            Prompt to execute

        provider_model_id : str
            The model ID to use within the given provider, e.g. gpt-3.5

        title : str
            Model name

        model_provider_connection : typing.Optional[int]

        organization : typing.Optional[int]

        parent_model : typing.Optional[int]
            Parent model interface ID

        provider : typing.Optional[ProviderEnum]
            The model provider to use e.g. OpenAI

            * `OpenAI` - OpenAI
            * `AzureOpenAI` - AzureOpenAI
            * `AzureAIFoundry` - AzureAIFoundry
            * `VertexAI` - VertexAI
            * `Gemini` - Gemini
            * `Anthropic` - Anthropic
            * `Custom` - Custom

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

        Returns
        -------
        ThirdPartyModelVersion


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.versions.create(
            prompt_id=1,
            prompt="prompt",
            provider_model_id="provider_model_id",
            title="title",
        )
        r4   r5   r6   r0   r1   r2   r3   r    r   creater%   r   r*   r4   r5   r6   r0   r1   r2   r3   r    r'   s              r   r:   zVersionsClient.createp   sG    V $$++/&?%%+ , 

	 ~~r   
version_idc                V    | j                   j                  |||      }|j                  S )a8  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Retrieve a specific prompt of a model.

        Parameters
        ----------
        prompt_id : int

        version_id : int

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

        Returns
        -------
        ThirdPartyModelVersion


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.versions.get(
            prompt_id=1,
            version_id=1,
        )
        r   r   getr%   r   r*   r<   r    r'   s        r   r?   zVersionsClient.get   s-    L $$((JP_(`	~~r   c                V    | j                   j                  |||      }|j                  S )a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Delete a prompt version by ID

        Parameters
        ----------
        prompt_id : int

        version_id : int

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

        Returns
        -------
        None

        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.versions.delete(
            prompt_id=1,
            version_id=1,
        )
        r   r   deleter%   r@   s        r   rC   zVersionsClient.delete   s-    J $$++IzSb+c	~~r   r0   r1   r2   r4   r3   r5   r6   r    c                d    | j                   j                  |||||||||	|

      }|j                  S )a[  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Update a specific prompt version by ID.

        Parameters
        ----------
        prompt_id : int

        version_id : int

        model_provider_connection : typing.Optional[int]

        organization : typing.Optional[int]

        parent_model : typing.Optional[int]
            Parent model interface ID

        prompt : typing.Optional[str]
            Prompt to execute

        provider : typing.Optional[ProviderEnum]
            The model provider to use e.g. OpenAI

            * `OpenAI` - OpenAI
            * `AzureOpenAI` - AzureOpenAI
            * `AzureAIFoundry` - AzureAIFoundry
            * `VertexAI` - VertexAI
            * `Gemini` - Gemini
            * `Anthropic` - Anthropic
            * `Custom` - Custom

        provider_model_id : typing.Optional[str]
            The model ID to use within the given provider, e.g. gpt-3.5

        title : typing.Optional[str]
            Model name

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

        Returns
        -------
        ThirdPartyModelVersion


        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.versions.update(
            prompt_id=1,
            version_id=1,
        )
        rD   r   updater%   r   r*   r<   r0   r1   r2   r4   r3   r5   r6   r    r'   s               r   rG   zVersionsClient.update  sJ    X $$++&?%%/+ , 
	 ~~r   c                V    | j                   j                  |||      }|j                  S )a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Get an estimate of the cost for making an inference run on the selected Prompt Version and Project/ProjectSubset

        Parameters
        ----------
        prompt_id : int

        version_id : int

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

        Returns
        -------
        InferenceRunCostEstimate
            Cost estimate response

        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.versions.cost_estimate(
            prompt_id=1,
            version_id=1,
        )
        r   r   cost_estimater%   r@   s        r   rK   zVersionsClient.cost_estimates  s-    L $$229jZi2j	~~r   refinement_job_idr    rM   c                X    | j                   j                  ||||      }|j                  S )a#  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Get the refined prompt based on the `refinement_job_id`.

        Parameters
        ----------
        prompt_id : int

        version_id : int

        refinement_job_id : typing.Optional[str]
            Refinement Job ID acquired from the `POST /api/prompts/{prompt_id}/versions/{version_id}/refine` endpoint

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

        Returns
        -------
        RefinedPromptResponse
            Refined prompt response

        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.versions.get_refined_prompt(
            prompt_id=1,
            version_id=1,
        )
        rL   r   get_refined_promptr%   r   r*   r<   rM   r    r'   s         r   rP   z!VersionsClient.get_refined_prompt  s7    \ $$77z5FXg 8 
	 ~~r   async_r    
project_idteacher_model_name$teacher_model_provider_connection_idrS   c          	      ^    | j                   j                  |||||||      }|j                  S )a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Refine a prompt version using a teacher model and save the refined prompt as a new version.

        Parameters
        ----------
        prompt_id : int

        version_id : int

        project_id : int
            Project ID to target the refined prompt for

        teacher_model_name : str
            Name of the model to use to refine the prompt

        teacher_model_provider_connection_id : int
            Model Provider Connection ID to use to refine the prompt

        async_ : typing.Optional[bool]
            Whether to run the refinement asynchronously

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

        Returns
        -------
        RefinedPromptResponse
            Refined prompt response

        Examples
        --------
        from label_studio_sdk import LabelStudio

        client = LabelStudio(
            api_key="YOUR_API_KEY",
        )
        client.prompts.versions.refine_prompt(
            prompt_id=1,
            version_id=1,
            project_id=1,
            teacher_model_name="teacher_model_name",
            teacher_model_provider_connection_id=1,
        )
        rT   rU   rV   rS   r    r   refine_promptr%   	r   r*   r<   rT   rU   rV   rS   r    r'   s	            r   rZ   zVersionsClient.refine_prompt  sA    z $$22!11U+ 3 
	 ~~r   )__name__
__module____qualname__r   r   propertyr   r   inttypingOptionalr   r$   strListr
   r-   OMITr   r:   r?   rC   rG   r   rK   r	   rP   boolrZ    r   r   r   r      s   L*; L  #4     gk !3 !FOOTbDc !os !N *.;?++ //#&	+
  8+ 
+	,+h ;?-1-126;?VV 	V
 V V $*??3#7V ooc*V ooc*V //,/V  8V 
 Vr fj''*-'CI??SaCb'	'T fj&&*-&CI??SaCb&	&Z ;?-1-1'+2626&*;?XX X
 $*??3#7X ooc*X ooc*X $X //,/X "??3/X s#X  8X 
 Xv fj''*-'CI??SaCb'	!'\ 37;?11 1
 "??3/1  81 
1v )-;?FF F
 F  F /2F %F  8F 
Fr   r   c                      e Zd ZdefdZedefd       Zdddede	j                  e   ddfd	Zddd
dede	j                  e   de	j                  e   de	j                  e   fdZeeeedddededed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de	j                  e   defdZdddedede	j                  e   ddfdZeeeeeeeddde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fdZdddedede	j                  e   defdZddddedede	j                  e   de	j                  e   def
dZddd deded!ed"ed#ed$e	j                  e   de	j                  e   defd%Zy)&AsyncVersionsClientr   c                &    t        |      | _        y r   )r   r   r   s     r   r   zAsyncVersionsClient.__init__  s    1Pr   r   c                     | j                   S )z
        Retrieves a raw implementation of this client that returns raw responses.

        Returns
        -------
        AsyncRawVersionsClient
        r   r   s    r   r   z%AsyncVersionsClient.with_raw_response  r   r   Nr   r!   r    c                p   K   | j                   j                  ||       d{   }|j                  S 7 w)ag  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Get default prompt version name

        Parameters
        ----------
        id : int

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

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.versions.get_default_version_name(
                id=1,
            )


        asyncio.run(main())
        r   Nr#   r&   s       r   r$   z,AsyncVersionsClient.get_default_version_name'  s8     T **CCBXgChh	~~ is   !646r(   r*   r)   c                r   K   | j                   j                  |||       d{   }|j                  S 7 w)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        List all versions of a prompt.

        Parameters
        ----------
        prompt_id : int

        ordering : typing.Optional[str]
            Which field to use when ordering the results.

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

        Returns
        -------
        typing.List[ThirdPartyModelVersion]


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.versions.list(
                prompt_id=1,
            )


        asyncio.run(main())
        r(   Nr,   r.   s        r   r-   zAsyncVersionsClient.listT  s:     d **//	H^m/nn	~~ o   "757r/   r4   r5   r6   r0   r1   r2   r3   c                ~   K   | j                   j                  |||||||||		       d{   }
|
j                  S 7 w)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Create a new version of a prompt.

        Parameters
        ----------
        prompt_id : int

        prompt : str
            Prompt to execute

        provider_model_id : str
            The model ID to use within the given provider, e.g. gpt-3.5

        title : str
            Model name

        model_provider_connection : typing.Optional[int]

        organization : typing.Optional[int]

        parent_model : typing.Optional[int]
            Parent model interface ID

        provider : typing.Optional[ProviderEnum]
            The model provider to use e.g. OpenAI

            * `OpenAI` - OpenAI
            * `AzureOpenAI` - AzureOpenAI
            * `AzureAIFoundry` - AzureAIFoundry
            * `VertexAI` - VertexAI
            * `Gemini` - Gemini
            * `Anthropic` - Anthropic
            * `Custom` - Custom

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

        Returns
        -------
        ThirdPartyModelVersion


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.versions.create(
                prompt_id=1,
                prompt="prompt",
                provider_model_id="provider_model_id",
                title="title",
            )


        asyncio.run(main())
        r8   Nr9   r;   s              r   r:   zAsyncVersionsClient.create  sU     f **11/&?%%+ 2 

 

	 ~~

s   (=;=r<   c                r   K   | j                   j                  |||       d{   }|j                  S 7 w)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Retrieve a specific prompt of a model.

        Parameters
        ----------
        prompt_id : int

        version_id : int

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

        Returns
        -------
        ThirdPartyModelVersion


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.versions.get(
                prompt_id=1,
                version_id=1,
            )


        asyncio.run(main())
        r   Nr>   r@   s        r   r?   zAsyncVersionsClient.get  s:     \ **..y*Ve.ff	~~ grn   c                r   K   | j                   j                  |||       d{   }|j                  S 7 w)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Delete a prompt version by ID

        Parameters
        ----------
        prompt_id : int

        version_id : int

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

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.versions.delete(
                prompt_id=1,
                version_id=1,
            )


        asyncio.run(main())
        r   NrB   r@   s        r   rC   zAsyncVersionsClient.delete  s:     Z **11)ZYh1ii	~~ jrn   rD   c                   K   | j                   j                  |||||||||	|

       d{   }|j                  S 7 w)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Update a specific prompt version by ID.

        Parameters
        ----------
        prompt_id : int

        version_id : int

        model_provider_connection : typing.Optional[int]

        organization : typing.Optional[int]

        parent_model : typing.Optional[int]
            Parent model interface ID

        prompt : typing.Optional[str]
            Prompt to execute

        provider : typing.Optional[ProviderEnum]
            The model provider to use e.g. OpenAI

            * `OpenAI` - OpenAI
            * `AzureOpenAI` - AzureOpenAI
            * `AzureAIFoundry` - AzureAIFoundry
            * `VertexAI` - VertexAI
            * `Gemini` - Gemini
            * `Anthropic` - Anthropic
            * `Custom` - Custom

        provider_model_id : typing.Optional[str]
            The model ID to use within the given provider, e.g. gpt-3.5

        title : typing.Optional[str]
            Model name

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

        Returns
        -------
        ThirdPartyModelVersion


        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.versions.update(
                prompt_id=1,
                version_id=1,
            )


        asyncio.run(main())
        rD   NrF   rH   s               r   rG   zAsyncVersionsClient.updateJ  sX     h **11&?%%/+ 2 
 
	 ~~
s   )><>c                r   K   | j                   j                  |||       d{   }|j                  S 7 w)a*  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Get an estimate of the cost for making an inference run on the selected Prompt Version and Project/ProjectSubset

        Parameters
        ----------
        prompt_id : int

        version_id : int

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

        Returns
        -------
        InferenceRunCostEstimate
            Cost estimate response

        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.versions.cost_estimate(
                prompt_id=1,
                version_id=1,
            )


        asyncio.run(main())
        r   NrJ   r@   s        r   rK   z!AsyncVersionsClient.cost_estimate  s:     \ **88J`o8pp	~~ qrn   rL   rM   c                t   K   | j                   j                  ||||       d{   }|j                  S 7 w)a  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Get the refined prompt based on the `refinement_job_id`.

        Parameters
        ----------
        prompt_id : int

        version_id : int

        refinement_job_id : typing.Optional[str]
            Refinement Job ID acquired from the `POST /api/prompts/{prompt_id}/versions/{version_id}/refine` endpoint

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

        Returns
        -------
        RefinedPromptResponse
            Refined prompt response

        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.versions.get_refined_prompt(
                prompt_id=1,
                version_id=1,
            )


        asyncio.run(main())
        rL   NrO   rQ   s         r   rP   z&AsyncVersionsClient.get_refined_prompt  sE     l **==z5FXg > 
 
	 ~~
s   #868rR   rT   rU   rV   rS   c          	      z   K   | j                   j                  |||||||       d{   }|j                  S 7 w)a*  
        <Card href="https://humansignal.com/goenterprise">
                <img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
                <p style="margin-top: 10px; font-size: 14px;">
                    This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
                </p>
            </Card>
        Refine a prompt version using a teacher model and save the refined prompt as a new version.

        Parameters
        ----------
        prompt_id : int

        version_id : int

        project_id : int
            Project ID to target the refined prompt for

        teacher_model_name : str
            Name of the model to use to refine the prompt

        teacher_model_provider_connection_id : int
            Model Provider Connection ID to use to refine the prompt

        async_ : typing.Optional[bool]
            Whether to run the refinement asynchronously

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

        Returns
        -------
        RefinedPromptResponse
            Refined prompt response

        Examples
        --------
        import asyncio

        from label_studio_sdk import AsyncLabelStudio

        client = AsyncLabelStudio(
            api_key="YOUR_API_KEY",
        )


        async def main() -> None:
            await client.prompts.versions.refine_prompt(
                prompt_id=1,
                version_id=1,
                project_id=1,
                teacher_model_name="teacher_model_name",
                teacher_model_provider_connection_id=1,
            )


        asyncio.run(main())
        rX   NrY   r[   s	            r   rZ   z!AsyncVersionsClient.refine_prompt  sO     J **88!11U+ 9 
 
	 ~~
s   &;9;)r\   r]   r^   r   r   r_   r   r   r`   ra   rb   r   r$   rc   rd   r
   r-   re   r   r:   r?   rC   rG   r   rK   r	   rP   rf   rZ   rg   r   r   ri   ri     s   Q*< Q  #9     NR+++1??>+J+	+b *.;?33 //#&	3
  83 
+	,3x ;?-1-126;?^^ 	^
 ^ ^ $*??3#7^ ooc*^ ooc*^ //,/^  8^ 
 ^B fj//*-/CI??SaCb/	/d fj..*-.CI??SaCb.	.j ;?-1-1'+2626&*;?`` `
 $*??3#7` ooc*` ooc*` $` //,/` "??3/` s#`  8` 
 `F fj//*-/CI??SaCb/	!/l 37;?99 9
 "??3/9  89 
9F )-;?NN N
 N  N /2N %N  8N 
Nr   ri   )ra   core.client_wrapperr   r   core.request_optionsr   !types.inference_run_cost_estimater   types.provider_enumr   types.refined_prompt_responser	   types.third_party_model_versionr
   
raw_clientr   r   castAnyre   r   ri   rg   r   r   <module>r      sP     H 2 I / B E A v{{6::s#D DNN	 N	r   