
    g                        d dl 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 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/m0Z0 ddlm1Z1  e jd                  e jf                  d      Z4 G d d      Z5 G d  d!      Z6y)"    N   )SyncClientWrapper)RequestOptions)ListEmbedJobResponse)construct_type)BadRequestError)UnauthorizedError)ForbiddenError)NotFoundError)UnprocessableEntityError)TooManyRequestsError)InvalidTokenError)ClientClosedRequestError)InternalServerError)NotImplementedError)ServiceUnavailableError)GatewayTimeoutError)JSONDecodeError)ApiError)EmbedInputType)EmbeddingType   )CreateEmbedJobRequestTruncate)CreateEmbedJobResponse)EmbedJob)jsonable_encoder)AsyncClientWrapper.c                   f   e Zd ZdefdZdddej                  e   defdZ	e
e
e
ddd	ed
ededej                  e   dej                  ej                  e      dej                  e   dej                  e   defdZdddedej                  e   defdZdddedej                  e   ddfdZy)EmbedJobsClientclient_wrapperc                    || _         y N_client_wrapperselfr    s     M/var/www/openai/venv/lib/python3.12/site-packages/cohere/embed_jobs/client.py__init__zEmbedJobsClient.__init__#   
    -    Nrequest_optionsr,   returnc          
         | j                   j                  j                  dd|      }	 d|j                  cxk  rdk  r:n n7t	        j
                  t        t        t        |j                                     S |j                  dk(  rvt        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  d	k(  rvt        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  d
k(  rvt        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt!        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt#        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt%        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt'        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt)        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt+        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt-        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                         }t1        |j                  |      # t.        $ r" t1        |j                  |j2                        w xY w)a!  
        The list embed job endpoint allows users to view all embed jobs history for that specific user.

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

        Returns
        -------
        ListEmbedJobResponse
            OK

        Examples
        --------
        from cohere import Client

        client = Client(
            client_name="YOUR_CLIENT_NAME",
            token="YOUR_TOKEN",
        )
        client.embed_jobs.list()
        v1/embed-jobsGETmethodr,      ,  type_object_                        status_codebodyr$   httpx_clientrequestrE   typingcastr   r   jsonr   OptionalAnyr	   r
   r   r   r   r   r   r   r   r   r   r   r   textr&   r,   	_response_response_jsons       r'   listzEmbedJobsClient.list&   s   0 ((55==+ > 
	
C	Si++1c1{{("2 ) 0  $$+%KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+$KK

3&"(//&**"=$-NN$4  $$+#KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+*KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+-KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  '^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   A[ 9Y[ +\nameembedding_typestruncater,   model
dataset_id
input_typerU   rV   rW   c                4   | j                   j                  j                  dd||||||dddi|t              }	 d|j                  cxk  rdk  r:n n7t        j                  t        t        t        |j                         	            S |j                  d
k(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         	                  |j                  dk(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         	                  |j                  dk(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         	                  |j                  dk(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         	                  |j                  dk(  rvt!        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         	                  |j                  dk(  rvt#        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         	                  |j                  dk(  rvt%        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         	                  |j                  dk(  rvt'        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         	                  |j                  dk(  rvt)        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         	                  |j                  dk(  rvt+        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         	                  |j                  dk(  rvt-        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         	                  |j                  dk(  rvt/        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         	                  |j                         }	t3        |j                  |	      # t0        $ r" t3        |j                  |j4                        w xY w)az
  
        This API launches an async Embed job for a [Dataset](https://docs.cohere.com/docs/datasets) of type `embed-input`. The result of a completed embed job is new Dataset of type `embed-output`, which contains the original text entries and the corresponding embeddings.

        Parameters
        ----------
        model : str
            ID of the embedding model.

            Available models and corresponding embedding dimensions:

            - `embed-english-v3.0` : 1024
            - `embed-multilingual-v3.0` : 1024
            - `embed-english-light-v3.0` : 384
            - `embed-multilingual-light-v3.0` : 384


        dataset_id : str
            ID of a [Dataset](https://docs.cohere.com/docs/datasets). The Dataset must be of type `embed-input` and must have a validation status `Validated`

        input_type : EmbedInputType

        name : typing.Optional[str]
            The name of the embed job.

        embedding_types : typing.Optional[typing.Sequence[EmbeddingType]]
            Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.

            * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models.
            * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.
            * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models.
            * `"binary"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models.
            * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models.

        truncate : typing.Optional[CreateEmbedJobRequestTruncate]
            One of `START|END` to specify how the API will handle inputs longer than the maximum token length.

            Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.


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

        Returns
        -------
        CreateEmbedJobResponse
            OK

        Examples
        --------
        from cohere import Client

        client = Client(
            client_name="YOUR_CLIENT_NAME",
            token="YOUR_TOKEN",
        )
        client.embed_jobs.create(
            model="model",
            dataset_id="dataset_id",
            input_type="search_document",
        )
        r/   POSTrX   rY   rZ   rU   rV   rW   content-typeapplication/jsonr2   rL   headersr,   omitr3   r4   r5   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   r$   rH   rI   OMITrE   rJ   rK   r   r   rL   r   rM   rN   r	   r
   r   r   r   r   r   r   r   r   r   r   r   rO   
r&   rX   rY   rZ   rU   rV   rW   r,   rQ   rR   s
             r'   createzEmbedJobsClient.create   s,   P ((55==((#2$  2 , > 
	"C	Si++1c1{{*"4 ) 0  $$+%KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+$KK

3&"(//&**"=$-NN$4  $$+#KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+*KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+-KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  '^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   A[, 	Y[, ,+\idc          
      ,   | j                   j                  j                  dt        |       d|      }	 d|j                  cxk  rdk  r:n n7t        j                  t        t        t        |j                                     S |j                  dk(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  d	k(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  d
k(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt!        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt#        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt%        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt'        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt)        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt+        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt-        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt/        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                         }t3        |j                  |      # t0        $ r" t3        |j                  |j4                        w xY w)aa  
        This API retrieves the details about an embed job started by the same user.

        Parameters
        ----------
        id : str
            The ID of the embed job to retrieve.

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

        Returns
        -------
        EmbedJob
            OK

        Examples
        --------
        from cohere import Client

        client = Client(
            client_name="YOUR_CLIENT_NAME",
            token="YOUR_TOKEN",
        )
        client.embed_jobs.get(
            id="id",
        )
        v1/embed-jobs/r0   r1   r3   r4   r5   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   r$   rH   rI   r   rE   rJ   rK   r   r   rL   r   rM   rN   r	   r
   r   r   r   r   r   r   r   r   r   r   r   rO   r&   rg   r,   rQ   rR   s        r'   getzEmbedJobsClient.get  s   : ((55==-b123+ > 
	
C	Si++1c1{{"& ) 0  $$+%KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+$KK

3&"(//&**"=$-NN$4  $$+#KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+*KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+-KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  '^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   A[( Y[( (+\c          
         | j                   j                  j                  dt        |       dd|      }	 d|j                  cxk  rdk  ry |j                  dk(  rvt        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  d
k(  rvt        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt!        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt#        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt%        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt'        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt)        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt+        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt-        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                         }t1        |j                  |      # t.        $ r" t1        |j                  |j2                        w xY w)a$  
        This API allows users to cancel an active embed job. Once invoked, the embedding process will be terminated, and users will be charged for the embeddings processed up to the cancellation point. It's important to note that partial results will not be available to users after cancellation.

        Parameters
        ----------
        id : str
            The ID of the embed job to cancel.

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

        Returns
        -------
        None

        Examples
        --------
        from cohere import Client

        client = Client(
            client_name="YOUR_CLIENT_NAME",
            token="YOUR_TOKEN",
        )
        client.embed_jobs.cancel(
            id="id",
        )
        ri   /cancelr\   r1   r3   r4   Nr8   r5   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   r$   rH   rI   r   rE   r   rJ   rK   rM   rN   r   rL   r	   r
   r   r   r   r   r   r   r   r   r   r   r   rO   rk   s        r'   cancelzEmbedJobsClient.cancelP  s   8 ((55==-b12':+ > 
	
}	Si++1c1 2$$+%KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+$KK

3&"(//&**"=$-NN$4  $$+#KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+*KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+-KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  '^^-N 9#8#8~NN  	Sy'<'<9>>RR	Ss   Z1 YZ1 1+[)__name__
__module____qualname__r   r(   rJ   rM   r   r   rS   rd   strr   Sequencer   r   r   rf   r   rl   rp    r*   r'   r   r   "   sE   .*; . JN aOv~'F aORf aOR &*KOCG;?]O ]O 	]O
 #]O ooc"]O  )GH]O //"?@]O  8]O 
 ]O~ RV fOc fOv~/N fOZb fOP UY _O _O&//.2Q _O]a _Or*   r   c                   f   e Zd ZdefdZdddej                  e   defdZ	e
e
e
ddd	ed
ededej                  e   dej                  ej                  e      dej                  e   dej                  e   defdZdddedej                  e   defdZdddedej                  e   ddfdZy)AsyncEmbedJobsClientr    c                    || _         y r"   r#   r%   s     r'   r(   zAsyncEmbedJobsClient.__init__  r)   r*   Nr+   r,   r-   c          
      2  K   | j                   j                  j                  dd|       d{   }	 d|j                  cxk  rdk  r:n n7t	        j
                  t        t        t        |j                                     S |j                  dk(  rvt        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  d	k(  rvt        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  d
k(  rvt        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt!        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt#        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt%        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt'        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt)        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt+        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                  dk(  rvt-        t	        j
                  t        j                  t        j                     t        t        j                  t        j                     |j                                           |j                         }t1        |j                  |      7 # t.        $ r" t1        |j                  |j2                        w xY ww)a  
        The list embed job endpoint allows users to view all embed jobs history for that specific user.

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

        Returns
        -------
        ListEmbedJobResponse
            OK

        Examples
        --------
        import asyncio

        from cohere import AsyncClient

        client = AsyncClient(
            client_name="YOUR_CLIENT_NAME",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.embed_jobs.list()


        asyncio.run(main())
        r/   r0   r1   Nr3   r4   r5   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rG   rP   s       r'   rS   zAsyncEmbedJobsClient.list  s    @ ..;;CC+ D 
 
	
C	Si++1c1{{("2 ) 0  $$+%KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+$KK

3&"(//&**"=$-NN$4  $$+#KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+*KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+-KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  '^^-N 9#8#8~NNS
N  	Sy'<'<9>>RR	Ss4   ,\[&\A[) \Y[) \)+\\rT   rX   rY   rZ   rU   rV   rW   c                R  K   | j                   j                  j                  dd||||||dddi|t               d{   }	 d|j                  cxk  rd	k  r:n n7t        j                  t        t        t        |j                         
            S |j                  dk(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         
                  |j                  dk(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         
                  |j                  dk(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         
                  |j                  dk(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         
                  |j                  dk(  rvt!        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         
                  |j                  dk(  rvt#        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         
                  |j                  dk(  rvt%        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         
                  |j                  dk(  rvt'        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         
                  |j                  dk(  rvt)        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         
                  |j                  dk(  rvt+        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         
                  |j                  dk(  rvt-        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         
                  |j                  dk(  rvt/        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                         
                  |j                         }	t3        |j                  |	      7 # t0        $ r" t3        |j                  |j4                        w xY ww)a
  
        This API launches an async Embed job for a [Dataset](https://docs.cohere.com/docs/datasets) of type `embed-input`. The result of a completed embed job is new Dataset of type `embed-output`, which contains the original text entries and the corresponding embeddings.

        Parameters
        ----------
        model : str
            ID of the embedding model.

            Available models and corresponding embedding dimensions:

            - `embed-english-v3.0` : 1024
            - `embed-multilingual-v3.0` : 1024
            - `embed-english-light-v3.0` : 384
            - `embed-multilingual-light-v3.0` : 384


        dataset_id : str
            ID of a [Dataset](https://docs.cohere.com/docs/datasets). The Dataset must be of type `embed-input` and must have a validation status `Validated`

        input_type : EmbedInputType

        name : typing.Optional[str]
            The name of the embed job.

        embedding_types : typing.Optional[typing.Sequence[EmbeddingType]]
            Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types.

            * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models.
            * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models.
            * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models.
            * `"binary"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models.
            * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models.

        truncate : typing.Optional[CreateEmbedJobRequestTruncate]
            One of `START|END` to specify how the API will handle inputs longer than the maximum token length.

            Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model.


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

        Returns
        -------
        CreateEmbedJobResponse
            OK

        Examples
        --------
        import asyncio

        from cohere import AsyncClient

        client = AsyncClient(
            client_name="YOUR_CLIENT_NAME",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.embed_jobs.create(
                model="model",
                dataset_id="dataset_id",
                input_type="search_document",
            )


        asyncio.run(main())
        r/   r\   r]   r^   r_   r`   Nr3   r4   r5   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rc   re   s
             r'   rf   zAsyncEmbedJobsClient.create  s<    ` ..;;CC((#2$  2 , D 
 
	"C	Si++1c1{{*"4 ) 0  $$+%KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+$KK

3&"(//&**"=$-NN$4  $$+#KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+*KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+-KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  '^^-N 9#8#8~NNk
f  	Sy'<'<9>>RR	Ss5   <\'[6\'A[9 \'Y[9 \'9+\$$\'rg   c          
      J  K   | j                   j                  j                  dt        |       d|       d{   }	 d|j                  cxk  rdk  r:n n7t        j                  t        t        t        |j                                     S |j                  dk(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  d	k(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  d
k(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt!        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt#        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt%        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt'        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt)        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt+        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt-        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                  dk(  rvt/        t        j                  t
        j                  t
        j                     t        t
        j                  t
        j                     |j                                           |j                         }t3        |j                  |      7 # t0        $ r" t3        |j                  |j4                        w xY ww)a  
        This API retrieves the details about an embed job started by the same user.

        Parameters
        ----------
        id : str
            The ID of the embed job to retrieve.

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

        Returns
        -------
        EmbedJob
            OK

        Examples
        --------
        import asyncio

        from cohere import AsyncClient

        client = AsyncClient(
            client_name="YOUR_CLIENT_NAME",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.embed_jobs.get(
                id="id",
            )


        asyncio.run(main())
        ri   r0   r1   Nr3   r4   r5   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rj   rk   s        r'   rl   zAsyncEmbedJobsClient.get  s!    J ..;;CC-b123+ D 
 
	
C	Si++1c1{{"& ) 0  $$+%KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+$KK

3&"(//&**"=$-NN$4  $$+#KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+*KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+-KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  '^^-N 9#8#8~NNS
N  	Sy'<'<9>>RR	Ss5   8\#[2\# A[5 \#Y[5 \#5+\  \#c          
        K   | j                   j                  j                  dt        |       dd|       d{   }	 d|j                  cxk  rdk  ry |j                  dk(  rvt        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  d
k(  rvt        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt!        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt#        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt%        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt'        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt)        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt+        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                  dk(  rvt-        t        j                  t        j                  t        j                     t        t        j                  t        j                     |j                         	                  |j                         }t1        |j                  |      7 # t.        $ r" t1        |j                  |j2                        w xY ww)a  
        This API allows users to cancel an active embed job. Once invoked, the embedding process will be terminated, and users will be charged for the embeddings processed up to the cancellation point. It's important to note that partial results will not be available to users after cancellation.

        Parameters
        ----------
        id : str
            The ID of the embed job to cancel.

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

        Returns
        -------
        None

        Examples
        --------
        import asyncio

        from cohere import AsyncClient

        client = AsyncClient(
            client_name="YOUR_CLIENT_NAME",
            token="YOUR_TOKEN",
        )


        async def main() -> None:
            await client.embed_jobs.cancel(
                id="id",
            )


        asyncio.run(main())
        ri   rn   r\   r1   Nr3   r4   r8   r5   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   ro   rk   s        r'   rp   zAsyncEmbedJobsClient.cancel8  s     H ..;;CC-b12':+ D 
 
	
}	Si++1c1 2$$+%KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+$KK

3&"(//&**"=$-NN$4  $$+#KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+*KK

3&"(//&**"=$-NN$4  $$+'KK

3&"(//&**"=$-NN$4  $$+.KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  $$+-KK

3&"(//&**"=$-NN$4  $$+)KK

3&"(//&**"=$-NN$4  '^^-N 9#8#8~NNG
B  	Sy'<'<9>>RR	Ss4   9[,Z;[,Z> [,YZ> $[,>+[))[,)rq   rr   rs   r   r(   rJ   rM   r   r   rS   rd   rt   r   ru   r   r   r   rf   r   rl   rp   rv   r*   r'   rx   rx     sE   .*< . PT iOV__^-L iOXl iOb &*KOCG;?eO eO 	eO
 #eO ooc"eO  )GHeO //"?@eO  8eO 
 eON X\ nOC nOV__^5T nO`h nO` [_ gOs gO8W gOcg gOr*   rx   )7rJ   core.client_wrapperr   core.request_optionsr   types.list_embed_job_responser   core.unchecked_base_modelr   errors.bad_request_errorr   errors.unauthorized_errorr	   errors.forbidden_errorr
   errors.not_found_errorr   !errors.unprocessable_entity_errorr   errors.too_many_requests_errorr   errors.invalid_token_errorr   "errors.client_closed_request_errorr   errors.internal_server_errorr   errors.not_implemented_errorr    errors.service_unavailable_errorr   errors.gateway_timeout_errorr   json.decoderr   core.api_errorr   types.embed_input_typer   types.embedding_typer   'types.create_embed_job_request_truncater   types.create_embed_job_responser   types.embed_jobr   core.jsonable_encoderr   r   rK   rN   rd   r   rx   rv   r*   r'   <module>r      s     3 1 @ 6 6 9 3 2 H A : I > > F > ( % 3 0 R D & 4 4 v{{6::s#MO MO`mO mOr*   