
    ]j                     Z   d dl Z d dlmZ ddlmZ ddlmZm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 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(  e jR                  e jT                  d      Z+ G d d      Z, G d d      Z-y)    N)JSONDecodeError   )ApiError)AsyncClientWrapperSyncClientWrapper)AsyncHttpResponseHttpResponse)jsonable_encoder)RequestOptions)'convert_and_respect_annotation_metadata)construct_type)BadRequestError)BatchFailedPredictions)BatchPredictions)ModelInterface)ModelInterfaceSerializerGet) PaginatedAllRolesProjectListList)'PaginatedProjectSubsetTasksResponseList)ProjectSubsetItem)SkillNameEnum)UserSimpleRequest   )+CompatibleProjectsPromptsRequestProjectType.c                   p   e Zd ZdefdZdedddej                  ej                     de	dej                  e	   dej                  e   d	ej                  e   d
ee   fdZdeddde	dej                  ej                     dej                  e	   dej                  e   d	ej                  e   d
ee   fdZdd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j                  e   d	ej                  e   d
ee   fdZdddde	dej                  e   d	ej                  e   d
eej*                  e      fdZddddej                  e   d	ej                  e   d
eej*                  e      fdZeeeeeeedddedej                  ej                  e	      d ej                  e   d!ej                  e   d"ej                  ej                     d#ej                  e	   d$ej                  ej                     d%ej                  e   d	ej                  e   d
ee   fd&Z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e   fd)Z dd*d+ed	ej                  e   d
ee   fd,Z!dd*d+ed	ej                  e   d
ed   fd-Z"eeeeeeeedd.	d+edej                  ej                  e	      d ej                  e   d!ej                  e   d"ej                  ej                     d#ej                  e	   d$ej                  ej                     d%ej                  e   dej                  e   d	ej                  e   d
ee   fd/Z#y)0RawPromptsClientclient_wrapperc                    || _         y N_client_wrapperselfr   s     M/root/env/lib/python3.12/site-packages/label_studio_sdk/prompts/raw_client.py__init__zRawPromptsClient.__init__   
    -    Nnum_failed_predictionsjob_idrequest_optionsfailed_predictionsmodelrun_idr(   r)   r*   returnc          	      &   | j                   j                  j                  ddd|i|||dddi|t              }	 d|j                  cxk  rd	k  rGn nDt        j                  t        t        t        |j                         
            }t        ||      S |j                         }t        |j                  t        |j                        |      # t        $ r6 t        |j                  t        |j                        |j                        w xY 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 batch of failed predictions.

        Parameters
        ----------
        failed_predictions : typing.Sequence[typing.Any]

        modelrun_id : int

        num_failed_predictions : typing.Optional[int]
            Number of failed predictions being sent (for telemetry only, has no effect)

        job_id : typing.Optional[str]

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

        Returns
        -------
        HttpResponse[BatchFailedPredictions]

        &api/model-run/batch-failed-predictionsPOSTr(   r+   r)   r,   content-typeapplication/jsonmethodparamsjsonheadersr*   omit   ,  type_object_responsedatastatus_coder8   body)r    httpx_clientrequestOMITrC   typingcastr   r   r7   r	   r   r   dictr8   text	r"   r+   r,   r(   r)   r*   	_response_data_response_jsons	            r#   batch_failed_predictionsz)RawPromptsClient.batch_failed_predictions!   s   J ((55==4(*@ '9 *  2 , > 
	"	ti++1c1*"4 ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	t   AC C ?Dnum_predictionsr)   r*   resultsrS   c          	      &   | j                   j                  j                  ddd|i|||dddi|t              }	 d|j                  cxk  rd	k  rGn nDt        j                  t        t        t        |j                         
            }t        ||      S |j                         }t        |j                  t        |j                        |      # t        $ r6 t        |j                  t        |j                        |j                        w xY 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 batch prediction.

        Parameters
        ----------
        modelrun_id : int

        results : typing.Sequence[typing.Any]

        num_predictions : typing.Optional[int]
            Number of predictions being sent (for telemetry only, has no effect)

        job_id : typing.Optional[str]

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

        Returns
        -------
        HttpResponse[BatchPredictions]

        api/model-run/batch-predictionsr0   rS   r)   r,   rT   r2   r3   r4   r:   r;   r<   r?   rB   )r    rE   rF   rG   rC   rH   rI   r   r   r7   r	   r   r   rJ   r8   rK   	r"   r,   rT   rS   r)   r*   rM   rN   rO   s	            r#   batch_predictionsz"RawPromptsClient.batch_predictionsf   s   J ((55==-!? !*"  2 , > 
	"	ti++1c1$". ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	trQ   include_total	model_runorderingpage	page_sizeparent_modelproject_subsetr*   
project_pkr[   r\   r]   r^   r_   r`   ra   c                "   | j                   j                  j                  dt        |       dd|||||||d|	      }
	 d|
j                  cxk  rdk  rGn nDt        j                  t        t        t        |
j                                     }t        |
|	      S |
j                  d
k(  rit        t        |
j                        t        j                  t
        j                  t        t
        j                  |
j                                           |
j                         }t!        |
j                  t        |
j                        |      # t        $ r6 t!        |
j                  t        |
j                        |
j"                        w xY 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>

                Provides list of tasks, based on project subset. Includes predictions for tasks. For the 'HasGT' subset, accuracy metrics will also be provided.


        Parameters
        ----------
        project_pk : int

        include_total : typing.Optional[bool]
            If true (default), includes task_count in response; if false, omits it.

        model_run : typing.Optional[int]
            A unique ID of a ModelRun

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

        page : typing.Optional[int]
            A page number within the paginated result set.

        page_size : typing.Optional[int]
            Number of results to return per page.

        parent_model : typing.Optional[int]
            The ID of the parent model (ModelInterface) for this Inference Run

        project_subset : typing.Optional[str]
            The project subset to retrieve tasks for

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

        Returns
        -------
        HttpResponse[PaginatedProjectSubsetTasksResponseList]

        api/projects//subset-tasksGETr[   r\   r]   r^   r_   r`   ra   r5   r6   r*   r:   r;   r<   r?     r8   rD   rB   )r    rE   rF   r
   rC   rH   rI   r   r   r7   r	   r   rJ   r8   Anyr   r   rK   r"   rb   r[   r\   r]   r^   r_   r`   ra   r*   rM   rN   rO   s                r#   subset_taskszRawPromptsClient.subset_tasks   si   r ((55==,Z89G!.&$& ,"0 , > 
		ti++1c1;"E ) 0 $YUCC$$+% !2!23

&"(**$-NN$4	 	 '^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts    AE BE ?Fr]   r*   c                j   | j                   j                  j                  dt        |       ddd|i|      }	 d|j                  cxk  rdk  rin nft        j                  t
        j                  t           t        t
        j                  t           |j                                     }t        ||	      S |j                         }t        |j                  t        |j                        |
      # t        $ r6 t        |j                  t        |j                        |j                   
      w xY 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>

                Provides list of available subsets for a project along with count of tasks in each subset


        Parameters
        ----------
        project_pk : int

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

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

        Returns
        -------
        HttpResponse[typing.List[ProjectSubsetItem]]

        rd   /subsetsrf   r]   rh   r:   r;   r<   r?   rB   )r    rE   rF   r
   rC   rH   rI   Listr   r   r7   r	   r   r   rJ   r8   rK   r"   rb   r]   r*   rM   rN   rO   s          r#   subsetszRawPromptsClient.subsets  s   B ((55==,Z89BH , > 
		ti++1c1KK 12"$kk*;< ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   A=C3 8C3 3?D2c                P   | j                   j                  j                  ddd|i|      }	 d|j                  cxk  rdk  rin nft	        j
                  t        j                  t           t        t        j                  t           |j                                     }t        ||      S |j                         }t        |j                  t        |j                        |	      # t        $ r6 t        |j                  t        |j                        |j                  	      w xY w)
at  
        List all prompts.

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

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

        Returns
        -------
        HttpResponse[typing.List[ModelInterfaceSerializerGet]]

        api/prompts/rf   r]   rh   r:   r;   r<   r?   rB   )r    rE   rF   rC   rH   rI   rq   r   r   r7   r	   r   r   rJ   r8   rK   r"   r]   r*   rM   rN   rO   s         r#   listzRawPromptsClient.listD  s   & ((55==H , > 
		ti++1c1KK ;<"$kk*EF ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   A=C& +C& &?D%associated_projects
created_bydescriptioninput_fieldsorganizationoutput_classes
skill_namer*   titlery   rz   r{   r|   r}   r~   r   c       	         J   | j                   j                  j                  dd|t        |t        d      ||||||dddi|	t
              }
	 d	|
j                  cxk  rd
k  rGn nDt        j                  t        t        t        |
j                                     }t        |
|      S |
j                         }t        |
j                  t        |
j                         |      # t        $ r6 t        |
j                  t        |
j                         |
j"                        w xY 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 prompt.

        Parameters
        ----------
        title : str
            Model name

        associated_projects : typing.Optional[typing.Sequence[int]]

        created_by : typing.Optional[UserSimpleRequest]
            User who created Dataset

        description : typing.Optional[str]
            Model description

        input_fields : typing.Optional[typing.Any]

        organization : typing.Optional[int]

        output_classes : typing.Optional[typing.Any]

        skill_name : typing.Optional[SkillNameEnum]

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

        Returns
        -------
        HttpResponse[ModelInterface]

        ru   r0   writer>   
annotation	directionry   rz   r{   r|   r}   r~   r   r   r2   r3   r5   r7   r8   r*   r9   r:   r;   r<   r?   rB   )r    rE   rF   r   r   rG   rC   rH   rI   r   r   r7   r	   r   r   rJ   r8   rK   r"   r   ry   rz   r{   r|   r}   r~   r   r*   rM   rN   rO   s                r#   createzRawPromptsClient.createn  s%   f ((55==':E&3DPW  + , ,"0(  2 ,' > 
	*	ti++1c1"", ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   AC# (C# #?D"r]   r^   r_   project_typer*   r   c          	         | j                   j                  j                  dd||||d|      }	 d|j                  cxk  rdk  rGn nDt	        j
                  t        t        t        |j                                     }t        ||      S |j                         }t        |j                  t        |j                        |	      # t        $ r6 t        |j                  t        |j                        |j                  	      w xY w)
a  
        Retrieve a list of compatible project for prompt.

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

        page : typing.Optional[int]
            A page number within the paginated result set.

        page_size : typing.Optional[int]
            Number of results to return per page.

        project_type : typing.Optional[CompatibleProjectsPromptsRequestProjectType]
            Skill to filter by

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

        Returns
        -------
        HttpResponse[PaginatedAllRolesProjectListList]

        api/prompts/compatible-projectsrf   r]   r^   r_   r   rh   r:   r;   r<   r?   rB   )r    rE   rF   rC   rH   rI   r   r   r7   r	   r   r   rJ   r8   rK   	r"   r]   r^   r_   r   r*   rM   rN   rO   s	            r#   compatible_projectsz$RawPromptsClient.compatible_projects  s    D ((55==-$& ,	 , > 

		ti++1c14"> ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   AC C ?Dr*   idc                    | j                   j                  j                  dt        |       dd|      }	 d|j                  cxk  rdk  rGn nDt        j                  t        t        t        |j                                     }t        ||      S |j                         }t        |j                  t        |j                        |	      # t        $ r6 t        |j                  t        |j                        |j                  	      w xY 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.

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

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

        Returns
        -------
        HttpResponse[ModelInterfaceSerializerGet]

        ru   /rf   r5   r*   r:   r;   r<   r?   rB   )r    rE   rF   r
   rC   rH   rI   r   r   r7   r	   r   r   rJ   r8   rK   r"   r   r*   rM   rN   rO   s         r#   getzRawPromptsClient.get  s    0 ((55==+B/02+ > 
	
	ti++1c1/"9 ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   AC C ?Dc                   | j                   j                  j                  dt        |       dd|      }	 d|j                  cxk  rdk  rn nt        |d      S |j                         }t        |j                  t        |j                        |	      # t        $ r6 t        |j                  t        |j                        |j                  	      w xY 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 by ID

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

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

        Returns
        -------
        HttpResponse[None]
        ru   r   DELETEr   r:   r;   Nr?   rB   )r    rE   rF   r
   rC   r	   r7   r   r   rJ   r8   rK   r"   r   r*   rM   rO   s        r#   deletezRawPromptsClient.delete-  s    * ((55==+B/02+ > 
	
	ti++1c1#YTBB&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   $B B ?C	ry   rz   r{   r|   r}   r~   r   r   r*   c       	         d   | j                   j                  j                  dt        |       dd|t	        |t
        d      ||||||	dddi|
t        	      }	 d
|j                  cxk  rdk  rGn nDt        j                  t        t        t        |j                                     }t        ||      S |j                         }t        |j                  t!        |j"                        |      # t        $ r6 t        |j                  t!        |j"                        |j$                        w xY 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 by ID.

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

        associated_projects : typing.Optional[typing.Sequence[int]]

        created_by : typing.Optional[UserSimpleRequest]
            User who created Dataset

        description : typing.Optional[str]
            Model description

        input_fields : typing.Optional[typing.Any]

        organization : typing.Optional[int]

        output_classes : typing.Optional[typing.Any]

        skill_name : typing.Optional[SkillNameEnum]

        title : typing.Optional[str]
            Model name

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

        Returns
        -------
        HttpResponse[ModelInterface]

        ru   r   PATCHr   r   r   r2   r3   r   r:   r;   r<   r?   rB   )r    rE   rF   r
   r   r   rG   rC   rH   rI   r   r   r7   r	   r   r   rJ   r8   rK   r"   r   ry   rz   r{   r|   r}   r~   r   r   r*   rM   rN   rO   s                 r#   updatezRawPromptsClient.updateO  s5   l ((55==+B/02':E&3DPW  + , ,"0(  2 ,' > 
	*	ti++1c1"", ) 0 $YUCC&^^-N 9#8#8$yGXGXBY`noo  	ty'<'<d9K\K\F]dmdrdrss	ts   AC0 5C0 0?D/)$__name__
__module____qualname__r   r$   rG   rH   Sequencerk   intOptionalstrr   r	   r   rP   r   rY   boolr   rm   rq   r   rs   r   rw   r   r   r   r   r   r   r   r   r   r    r&   r#   r   r      s   .*; . 8<'+;?Cp #OOFJJ7Cp 	Cp
 !' 4Cp $Cp  8Cp 
,	-CpT 15'+;?Cp Cp ,	Cp
  -Cp $Cp  8Cp 
&	'CpR 04*.)-%)*.-1/3;?_p_p t,	_p
 ??3'_p //#&_p ooc"_p ??3'_p ooc*_p ,_p  8_p 
=	>_pJ *.;?6p6p //#&	6p
  86p 
fkk"34	56pr 37ko(p!??3/(pIOYgIh(p	fkk"=>	?(p\ FJ9=,048-16:59;?Up Up $__V__S-AB	Up
 OO$56Up __S)Up oofjj1Up ooc*Up 

3Up OOM2Up  8Up 
n	%Upt *.%)*.UY;?:p //#&:p ooc"	:p
 ??3':p oo&QR:p  8:p 
6	7:pz NR*p*p+1??>+J*p	1	2*pX UY  p  p&//.2Q  p]ijn]o  pL FJ9=,048-16:59&*;?XpXp $__V__S-AB	Xp
 OO$56Xp __S)Xp oofjj1Xp ooc*Xp 

3Xp OOM2Xp s#Xp  8Xp 
n	%Xpr&   r   c                   p   e Zd ZdefdZdedddej                  ej                     de	dej                  e	   dej                  e   d	ej                  e   d
ee   fdZdeddde	dej                  ej                     dej                  e	   dej                  e   d	ej                  e   d
ee   fdZdd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j                  e   d	ej                  e   d
ee   fdZdddde	dej                  e   d	ej                  e   d
eej*                  e      fdZddddej                  e   d	ej                  e   d
eej*                  e      fdZeeeeeeedddedej                  ej                  e	      d ej                  e   d!ej                  e   d"ej                  ej                     d#ej                  e	   d$ej                  ej                     d%ej                  e   d	ej                  e   d
ee   fd&Z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e   fd)Z dd*d+ed	ej                  e   d
ee   fd,Z!dd*d+ed	ej                  e   d
ed   fd-Z"eeeeeeeedd.	d+edej                  ej                  e	      d ej                  e   d!ej                  e   d"ej                  ej                     d#ej                  e	   d$ej                  ej                     d%ej                  e   dej                  e   d	ej                  e   d
ee   fd/Z#y)0AsyncRawPromptsClientr   c                    || _         y r   r   r!   s     r#   r$   zAsyncRawPromptsClient.__init__  r%   r&   Nr'   r+   r,   r(   r)   r*   r-   c          	      B  K   | j                   j                  j                  ddd|i|||dddi|t               d{   }	 d	|j                  cxk  rd
k  rGn nDt        j                  t        t        t        |j                                     }t        ||      S |j                         }t        |j                  t        |j                        |      7 # t        $ r6 t        |j                  t        |j                        |j                        w xY w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 batch of failed predictions.

        Parameters
        ----------
        failed_predictions : typing.Sequence[typing.Any]

        modelrun_id : int

        num_failed_predictions : typing.Optional[int]
            Number of failed predictions being sent (for telemetry only, has no effect)

        job_id : typing.Optional[str]

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

        Returns
        -------
        AsyncHttpResponse[BatchFailedPredictions]

        r/   r0   r(   r1   r2   r3   r4   Nr:   r;   r<   r?   rB   )r    rE   rF   rG   rC   rH   rI   r   r   r7   r   r   r   rJ   r8   rK   rL   s	            r#   rP   z.AsyncRawPromptsClient.batch_failed_predictions  s!    J ..;;CC4(*@ '9 *  2 , D 
 
	"	ti++1c1*"4 ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`noo=
8  	ty'<'<d9K\K\F]dmdrdrss	t4   <DCDAC D C 0,D?DDrR   rT   rS   c          	      B  K   | j                   j                  j                  ddd|i|||dddi|t               d{   }	 d	|j                  cxk  rd
k  rGn nDt        j                  t        t        t        |j                                     }t        ||      S |j                         }t        |j                  t        |j                        |      7 # t        $ r6 t        |j                  t        |j                        |j                        w xY w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 batch prediction.

        Parameters
        ----------
        modelrun_id : int

        results : typing.Sequence[typing.Any]

        num_predictions : typing.Optional[int]
            Number of predictions being sent (for telemetry only, has no effect)

        job_id : typing.Optional[str]

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

        Returns
        -------
        AsyncHttpResponse[BatchPredictions]

        rV   r0   rS   rW   r2   r3   r4   Nr:   r;   r<   r?   rB   )r    rE   rF   rG   rC   rH   rI   r   r   r7   r   r   r   rJ   r8   rK   rX   s	            r#   rY   z'AsyncRawPromptsClient.batch_predictions  s     J ..;;CC-!? !*"  2 , D 
 
	"	ti++1c1$". ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`noo=
8  	ty'<'<d9K\K\F]dmdrdrss	tr   rZ   rb   r[   r\   r]   r^   r_   r`   ra   c                @  K   | j                   j                  j                  dt        |       dd|||||||d|	       d{   }
	 d|
j                  cxk  rdk  rGn nDt        j                  t        t        t        |
j                         	            }t        |
|
      S |
j                  dk(  rit        t        |
j                        t        j                  t
        j                  t        t
        j                  |
j                         	                  |
j                         }t!        |
j                  t        |
j                        |      7 # t        $ r6 t!        |
j                  t        |
j                        |
j"                        w xY w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>

                Provides list of tasks, based on project subset. Includes predictions for tasks. For the 'HasGT' subset, accuracy metrics will also be provided.


        Parameters
        ----------
        project_pk : int

        include_total : typing.Optional[bool]
            If true (default), includes task_count in response; if false, omits it.

        model_run : typing.Optional[int]
            A unique ID of a ModelRun

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

        page : typing.Optional[int]
            A page number within the paginated result set.

        page_size : typing.Optional[int]
            Number of results to return per page.

        parent_model : typing.Optional[int]
            The ID of the parent model (ModelInterface) for this Inference Run

        project_subset : typing.Optional[str]
            The project subset to retrieve tasks for

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

        Returns
        -------
        AsyncHttpResponse[PaginatedProjectSubsetTasksResponseList]

        rd   re   rf   rg   rh   Nr:   r;   r<   r?   ri   rj   rB   )r    rE   rF   r
   rC   rH   rI   r   r   r7   r   r   rJ   r8   rk   r   r   rK   rl   s                r#   rm   z"AsyncRawPromptsClient.subset_tasks8  sy    r ..;;CC,Z89G!.&$& ,"0 , D 
 
		ti++1c1;"E ) 0 ))%HH$$+% !2!23

&"(**$-NN$4	 	 '^^-N 9#8#8$yGXGXBY`nooM
H  	ty'<'<d9K\K\F]dmdrdrss	ts8   AFEF
AE %F&BE .,F?FFrn   c                  K   | j                   j                  j                  dt        |       ddd|i|       d{   }	 d|j                  cxk  rdk  rin nft        j                  t
        j                  t           t        t
        j                  t           |j                         	            }t        ||
      S |j                         }t        |j                  t        |j                        |      7 # t        $ r6 t        |j                  t        |j                        |j                         w xY w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>

                Provides list of available subsets for a project along with count of tasks in each subset


        Parameters
        ----------
        project_pk : int

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

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

        Returns
        -------
        AsyncHttpResponse[typing.List[ProjectSubsetItem]]

        rd   rp   rf   r]   rh   Nr:   r;   r<   r?   rB   )r    rE   rF   r
   rC   rH   rI   rq   r   r   r7   r   r   r   rJ   r8   rK   rr   s          r#   rs   zAsyncRawPromptsClient.subsets  s$    B ..;;CC,Z89BH , D 
 
		ti++1c1KK 12"$kk*;< ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`noo+
&  	ty'<'<d9K\K\F]dmdrdrss	ts4   <EC=EA=C? EC? ,E??D>>Ec                l  K   | j                   j                  j                  ddd|i|       d{   }	 d|j                  cxk  rdk  rin nft	        j
                  t        j                  t           t        t        j                  t           |j                                     }t        ||	      S |j                         }t        |j                  t        |j                        |
      7 # t        $ r6 t        |j                  t        |j                        |j                  
      w xY ww)ay  
        List all prompts.

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

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

        Returns
        -------
        AsyncHttpResponse[typing.List[ModelInterfaceSerializerGet]]

        ru   rf   r]   rh   Nr:   r;   r<   r?   rB   )r    rE   rF   rC   rH   rI   rq   r   r   r7   r   r   r   rJ   r8   rK   rv   s         r#   rw   zAsyncRawPromptsClient.list  s    & ..;;CCH , D 
 
		ti++1c1KK ;<"$kk*EF ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`noo+
&  	ty'<'<d9K\K\F]dmdrdrss	ts3   /D4C0D4A=C2 4D45C2 ,D42?D11D4rx   r   ry   rz   r{   r|   r}   r~   r   c       	         f  K   | j                   j                  j                  dd|t        |t        d      ||||||dddi|	t
               d	{   }
	 d
|
j                  cxk  rdk  rGn nDt        j                  t        t        t        |
j                                     }t        |
|      S |
j                         }t        |
j                  t        |
j                         |      7 # t        $ r6 t        |
j                  t        |
j                         |
j"                        w xY w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 prompt.

        Parameters
        ----------
        title : str
            Model name

        associated_projects : typing.Optional[typing.Sequence[int]]

        created_by : typing.Optional[UserSimpleRequest]
            User who created Dataset

        description : typing.Optional[str]
            Model description

        input_fields : typing.Optional[typing.Any]

        organization : typing.Optional[int]

        output_classes : typing.Optional[typing.Any]

        skill_name : typing.Optional[SkillNameEnum]

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

        Returns
        -------
        AsyncHttpResponse[ModelInterface]

        ru   r0   r   r   r   r2   r3   r   Nr:   r;   r<   r?   rB   )r    rE   rF   r   r   rG   rC   rH   rI   r   r   r7   r   r   r   rJ   r8   rK   r   s                r#   r   zAsyncRawPromptsClient.create  s5    f ..;;CC':E&3DPW  + , ,"0(  2 ,' D 
 
	*	ti++1c1"", ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`nooE
@  	ty'<'<d9K\K\F]dmdrdrss	ts7   AD1C-D1AC/ 1D12C/ ,D1/?D..D1r   r   c          	      .  K   | j                   j                  j                  dd||||d|       d{   }	 d|j                  cxk  rdk  rGn nDt	        j
                  t        t        t        |j                                     }t        ||	      S |j                         }t        |j                  t        |j                        |
      7 # t        $ r6 t        |j                  t        |j                        |j                  
      w xY ww)a  
        Retrieve a list of compatible project for prompt.

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

        page : typing.Optional[int]
            A page number within the paginated result set.

        page_size : typing.Optional[int]
            Number of results to return per page.

        project_type : typing.Optional[CompatibleProjectsPromptsRequestProjectType]
            Skill to filter by

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

        Returns
        -------
        AsyncHttpResponse[PaginatedAllRolesProjectListList]

        r   rf   r   rh   Nr:   r;   r<   r?   rB   )r    rE   rF   rC   rH   rI   r   r   r7   r   r   r   rJ   r8   rK   r   s	            r#   r   z)AsyncRawPromptsClient.compatible_projectsR  s    D ..;;CC-$& ,	 , D 

 

		ti++1c14"> ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`noo1

,  	ty'<'<d9K\K\F]dmdrdrss	ts3   2DCDAC DC &,D?DDr   r   c                <  K   | j                   j                  j                  dt        |       dd|       d{   }	 d|j                  cxk  rdk  rGn nDt        j                  t        t        t        |j                                     }t        ||	      S |j                         }t        |j                  t        |j                        |
      7 # t        $ r6 t        |j                  t        |j                        |j                  
      w xY w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.

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

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

        Returns
        -------
        AsyncHttpResponse[ModelInterfaceSerializerGet]

        ru   r   rf   r   Nr:   r;   r<   r?   rB   )r    rE   rF   r
   rC   rH   rI   r   r   r7   r   r   r   rJ   r8   rK   r   s         r#   r   zAsyncRawPromptsClient.get  s    0 ..;;CC+B/02+ D 
 
	
	ti++1c1/"9 ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`noo%
   	ty'<'<d9K\K\F]dmdrdrss	ts4   9DCDAC DC -,D?DDc                  K   | j                   j                  j                  dt        |       dd|       d{   }	 d|j                  cxk  rdk  rn nt        |d      S |j                         }t        |j                  t        |j                        |	      7 e# t        $ r6 t        |j                  t        |j                        |j                  	      w xY w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 by ID

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

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

        Returns
        -------
        AsyncHttpResponse[None]
        ru   r   r   r   Nr:   r;   r?   rB   )r    rE   rF   r
   rC   r   r7   r   r   rJ   r8   rK   r   s        r#   r   zAsyncRawPromptsClient.delete  s     . ..;;CC+B/02+ D 
 
	
	ti++1c1()$GG&^^-N 9#8#8$yGXGXBY`noo
  	ty'<'<d9K\K\F]dmdrdrss	ts3   9C%B!C%$B# %C%&B# 6,C%#?C""C%r   c       	           K   | j                   j                  j                  dt        |       dd|t	        |t
        d      ||||||	dddi|
t        	       d
{   }	 d|j                  cxk  rdk  rGn nDt        j                  t        t        t        |j                                     }t        ||      S |j                         }t        |j                  t!        |j"                        |      7 # t        $ r6 t        |j                  t!        |j"                        |j$                        w xY w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 by ID.

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

        associated_projects : typing.Optional[typing.Sequence[int]]

        created_by : typing.Optional[UserSimpleRequest]
            User who created Dataset

        description : typing.Optional[str]
            Model description

        input_fields : typing.Optional[typing.Any]

        organization : typing.Optional[int]

        output_classes : typing.Optional[typing.Any]

        skill_name : typing.Optional[SkillNameEnum]

        title : typing.Optional[str]
            Model name

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

        Returns
        -------
        AsyncHttpResponse[ModelInterface]

        ru   r   r   r   r   r   r2   r3   r   Nr:   r;   r<   r?   rB   )r    rE   rF   r
   r   r   rG   rC   rH   rI   r   r   r7   r   r   r   rJ   r8   rK   r   s                 r#   r   zAsyncRawPromptsClient.update  sE    l ..;;CC+B/02':E&3DPW  + , ,"0(  2 ,' D 
 
	*	ti++1c1"", ) 0 ))%HH&^^-N 9#8#8$yGXGXBY`nooE
@  	ty'<'<d9K\K\F]dmdrdrss	ts7   AD>C:D>#AC< >D>?C< ,D><?D;;D>)$r   r   r   r   r$   rG   rH   r   rk   r   r   r   r   r   r   rP   r   rY   r   r   rm   rq   r   rs   r   rw   r   r   r   r   r   r   r   r   r   r   r   r&   r#   r   r     s   .*< . 8<'+;?Cp #OOFJJ7Cp 	Cp
 !' 4Cp $Cp  8Cp 
1	2CpT 15'+;?Cp Cp ,	Cp
  -Cp $Cp  8Cp 
+	,CpR 04*.)-%)*.-1/3;?_p_p t,	_p
 ??3'_p //#&_p ooc"_p ??3'_p ooc*_p ,_p  8_p 
B	C_pJ *.;?6p6p //#&	6p
  86p 
6;;'89	:6pr 37ko(p!??3/(pIOYgIh(p	6;;'BC	D(p\ FJ9=,048-16:59;?Up Up $__V__S-AB	Up
 OO$56Up __S)Up oofjj1Up ooc*Up 

3Up OOM2Up  8Up 
>	*Upt *.%)*.UY;?:p //#&:p ooc"	:p
 ??3':p oo&QR:p  8:p 
;	<:pz NR*p*p+1??>+J*p	6	7*pZ NR"p"p+1??>+J"p	4	 "pP FJ9=,048-16:59&*;?XpXp $__V__S-AB	Xp
 OO$56Xp __S)Xp oofjj1Xp ooc*Xp 

3Xp OOM2Xp s#Xp  8Xp 
>	*Xpr&   r   ).rH   json.decoderr   core.api_errorr   core.client_wrapperr   r   core.http_responser   r	   core.jsonable_encoderr
   core.request_optionsr   core.serializationr   core.unchecked_base_modelr   errors.bad_request_errorr   types.batch_failed_predictionsr   types.batch_predictionsr   types.model_interfacer   $types.model_interface_serializer_getr   +types.paginated_all_roles_project_list_listr   2types.paginated_project_subset_tasks_response_listr   types.project_subset_itemr   types.skill_name_enumr   types.user_simple_requestr   6types.compatible_projects_prompts_request_project_typer   rI   rk   rG   r   r   r   r&   r#   <module>r      sx     ( % G @ 4 1 H 6 6 C 6 2 N Z h 9 1 9 o v{{6::s#J
p J
pZL
p L
pr&   