
    Mi?                    h   S SK Jr  S SKJrJr  S SKJr  S SKrSSKJ	r	  SSK
JrJrJrJrJrJrJr  SSKJrJr  SS	KJr  SS
KJrJr  SSKJrJrJrJr  SSKJ r   SSK!J"r"  SSK#J$r$  SSK%J&r&  SSK'J(r(  SS/r) " S S\5      r* " S S\5      r+ " S S5      r, " S S5      r- " S S5      r. " S S5      r/g)    )annotations)DictOptional)LiteralN   )batch_create_params)BodyOmitQueryHeadersNotGivenomit	not_given)maybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_raw_response_wrapperto_streamed_response_wrapperasync_to_raw_response_wrapper"async_to_streamed_response_wrapper)make_request_options)BatchListResponse)BatchCancelResponse)BatchCreateResponse)BatchRetrieveResponseBatchesAsyncBatchesc                      \ rS rSr\SS j5       r\SS j5       r\SSS\S.                 SS jjr	SSS\S.           SS jjr
SSS\S.         SS	 jjrSSS\S.           SS
 jjrSrg)r      c                    [        U 5      $ z
This property can be used as a prefix for any HTTP method call to return
the raw response object instead of the parsed content.

For more information, see https://www.github.com/groq/groq-python#accessing-raw-response-data-eg-headers
)BatchesWithRawResponseselfs    p/var/www/eduai.edurigo.com/storigo/production/storigo_env/lib/python3.13/site-packages/groq/resources/batches.pywith_raw_responseBatches.with_raw_response   s     &d++    c                    [        U 5      $ z
An alternative to `.with_raw_response` that doesn't eagerly read the response body.

For more information, see https://www.github.com/groq/groq-python#with_streaming_response
)BatchesWithStreamingResponser%   s    r'   with_streaming_responseBatches.with_streaming_response)   s     ,D11r*   Nmetadataextra_headersextra_query
extra_bodytimeoutc               x    U R                  S[        UUUUS.[        R                  5      [	        XVXxS9[
        S9$ )  
Creates and executes a batch from an uploaded file of requests.
[Learn more](/docs/batch).

Args:
  completion_window: The time frame within which the batch should be processed. Durations from `24h`
      to `7d` are supported.

  endpoint: The endpoint to be used for all requests in the batch. Currently
      `/v1/chat/completions` is supported.

  input_file_id: The ID of an uploaded file that contains requests for the new batch.

      See [upload file](/docs/api-reference#files-upload) for how to upload a file.

      Your input file must be formatted as a [JSONL file](/docs/batch), and must be
      uploaded with the purpose `batch`. The file can be up to 100 MB in size.

  metadata: Optional custom metadata for the batch.

  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
/openai/v1/batchescompletion_windowendpointinput_file_idr1   r2   r3   r4   r5   bodyoptionscast_to)_postr   r   BatchCreateParamsr   r   	r&   r:   r;   r<   r1   r2   r3   r4   r5   s	            r'   createBatches.create2   sW    T zz  ): (%2 (	 $55 )+Q[ (  
 	
r*   r=   c          
     n    U(       d  [        SU< 35      eU R                  SU 3[        X#XES9[        S9$ )  
Retrieves a batch.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
7Expected a non-empty value for `batch_id` but received /openai/v1/batches/r=   r@   rA   
ValueError_getr   r   r&   batch_idr2   r3   r4   r5   s         r'   retrieveBatches.retrievem   sO    . VW_Vbcddyy!(,(+Q[ *  
 	
r*   c          
     <    U R                  S[        XX4S9[        S9$ )!List your organization's batches.r8   r=   rK   rN   r   r   r&   r2   r3   r4   r5   s        r'   listBatches.list   s0     yy (+Q[ &  
 	
r*   c          
     p    U(       d  [        SU< 35      eU R                  SU S3[        X#XES9[        S9$ )  
Cancels a batch.

Args:
  extra_headers: Send extra headers

  extra_query: Add additional query parameters to the request

  extra_body: Add additional JSON properties to the request

  timeout: Override the client-level default timeout for this request, in seconds
rI   rJ   /cancelr=   rK   rM   rB   r   r   rO   s         r'   cancelBatches.cancel   sQ    . VW_Vbcddzz!(73(+Q[ (  
 	
r*    )returnr$   )r`   r-   r:   strr;   zLiteral['/v1/chat/completions']r<   rb   r1   zOptional[Dict[str, str]] | Omitr2   Headers | Noner3   Query | Noner4   Body | Noner5   'float | httpx.Timeout | None | NotGivenr`   r   rP   rb   r2   rc   r3   rd   r4   re   r5   rf   r`   r   
r2   rc   r3   rd   r4   re   r5   rf   r`   r   rP   rb   r2   rc   r3   rd   r4   re   r5   rf   r`   r   __name__
__module____qualname____firstlineno__r   r(   r.   r   r   rE   rQ   rW   r]   __static_attributes__r_   r*   r'   r   r      s   , , 2 2 59 )-$("&;D9
 9
 2	9

 9
 29
 &9
 "9
  9
 99
 
9
B )-$("&;D

 &
 "
  
 9
 

L )-$("&;D

 &
 "
  
 9
 

2 )-$("&;D

 &
 "
  
 9
 

 
r*   c                      \ rS rSr\SS j5       r\SS j5       r\SSS\S.                 SS jjr	SSS\S.           SS jjr
SSS\S.         SS	 jjrSSS\S.           SS
 jjrSrg)r      c                    [        U 5      $ r#   )AsyncBatchesWithRawResponser%   s    r'   r(   AsyncBatches.with_raw_response   s     +400r*   c                    [        U 5      $ r,   )!AsyncBatchesWithStreamingResponser%   s    r'   r.   $AsyncBatches.with_streaming_response   s     166r*   Nr0   c                  #    U R                  S[        UUUUS.[        R                  5      I Sh  vN [	        XVXxS9[
        S9I Sh  vN $  N N7f)r7   r8   r9   Nr=   r>   )rB   r   r   rC   r   r   rD   s	            r'   rE   AsyncBatches.create   sn     T ZZ ,): (%2 (	 $55  )+Q[ (   
 
 	

s!   /AA
A	A
AAr=   c          
        #    U(       d  [        SU< 35      eU R                  SU 3[        X#XES9[        S9I Sh  vN $  N7f)rH   rI   rJ   r=   rK   NrL   rO   s         r'   rQ   AsyncBatches.retrieve  s\     . VW_VbcddYY!(,(+Q[ *  
 
 	
 
s   :AAAc          
     X   #    U R                  S[        XX4S9[        S9I Sh  vN $  N7f)rT   r8   r=   rK   NrU   rV   s        r'   rW   AsyncBatches.list3  s=      YY (+Q[ &  
 
 	
 
s   !*(*c          
        #    U(       d  [        SU< 35      eU R                  SU S3[        X#XES9[        S9I Sh  vN $  N7f)rZ   rI   rJ   r[   r=   rK   Nr\   rO   s         r'   r]   AsyncBatches.cancelF  s^     . VW_VbcddZZ!(73(+Q[ (   
 
 	
 
s   ;AAAr_   )r`   rs   )r`   rv   ra   rg   rh   ri   rj   r_   r*   r'   r   r      s   1 1 7 7 59 )-$("&;D9
 9
 2	9

 9
 29
 &9
 "9
  9
 99
 
9
B )-$("&;D

 &
 "
  
 9
 

L )-$("&;D

 &
 "
  
 9
 

2 )-$("&;D

 &
 "
  
 9
 

 
r*   c                      \ rS rSrSS jrSrg)r$   ih  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        g N)_batchesr   rE   rQ   rW   r]   r&   batchess     r'   __init__BatchesWithRawResponse.__init__i  s[    -NN
 0
 ,LL
	 .NN
r*   r   r]   rE   rW   rQ   Nr   r   r`   Nonerk   rl   rm   rn   r   ro   r_   r*   r'   r$   r$   h      
r*   r$   c                      \ rS rSrSS jrSrg)rs   iz  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        g r   )r   r   rE   rQ   rW   r]   r   s     r'   r   $AsyncBatchesWithRawResponse.__init__{  s[    3NN
 6
 2LL
	 4NN
r*   r   Nr   r   r`   r   r   r_   r*   r'   rs   rs   z  r   r*   rs   c                      \ rS rSrSS jrSrg)r-   i  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        g r   )r   r   rE   rQ   rW   r]   r   s     r'   r   %BatchesWithStreamingResponse.__init__  s[    2NN
 5
 1LL
	 3NN
r*   r   Nr   r   r_   r*   r'   r-   r-     r   r*   r-   c                      \ rS rSrSS jrSrg)rv   i  c                    Xl         [        UR                  5      U l        [        UR                  5      U l        [        UR                  5      U l        [        UR
                  5      U l        g r   )r   r   rE   rQ   rW   r]   r   s     r'   r   *AsyncBatchesWithStreamingResponse.__init__  s[    8NN
 ;
 7LL
	 9NN
r*   r   Nr   r   r_   r*   r'   rv   rv     r   r*   rv   )0
__future__r   typingr   r   typing_extensionsr   httpxtypesr   _typesr	   r
   r   r   r   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   r   r   _base_clientr   types.batch_list_responser   types.batch_cancel_responser   types.batch_create_responser   types.batch_retrieve_responser   __all__r   r   r$   rs   r-   rv   r_   r*   r'   <module>r      s    # ! %  ' J J J ; % 9  0 9 = = An
%b
o b
Jb
# b
J
 
$
 
$
 
$
 
r*   