ó
    ûÞ j�W  ã                  ól  • S SK Jr  S SKJr  S SKJr  S SKrSSKJr  SSK	J
r
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Jr  SS
KJr  SSKJrJr  SSK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)  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      r0g)é    )Úannotations)ÚOptional)ÚLiteralNé   )Ú_legacy_response)Úbatch_list_paramsÚbatch_create_params)ÚBodyÚOmitÚQueryÚHeadersÚNotGivenÚomitÚ	not_given)Úpath_templateÚmaybe_transformÚasync_maybe_transform)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)ÚSyncCursorPageÚAsyncCursorPage)ÚBatch)ÚAsyncPaginatorÚmake_request_options)ÚMetadataÚBatchesÚAsyncBatchesc                  ó  • \ rS 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   é   ú;Create large batches of API requests to run asynchronously.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/openai/openai-python#accessing-raw-response-data-eg-headers
)ÚBatchesWithRawResponse©Úselfs    ÚR/var/www/html/gaurav/venv/lib/python3.13/site-packages/openai/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/openai/openai-python#with_streaming_response
)ÚBatchesWithStreamingResponser'   s    r)   Úwith_streaming_responseÚBatches.with_streaming_response&   s   € ô ,¨DÓ1Ð1r,   N©ÚmetadataÚoutput_expires_afterÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutc       	        ó„   • U R                  S[        UUUUUS.[        R                  5      [	        UUUU	SS0S9[
        S9$ )á  
Creates and executes a batch from an uploaded file of requests

Args:
  completion_window: The time frame within which the batch should be processed. Currently only `24h`
      is supported.

  endpoint: The endpoint to be used for all requests in the batch. Currently
      `/v1/responses`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/completions`,
      `/v1/moderations`, `/v1/images/generations`, `/v1/images/edits`, and
      `/v1/videos` are supported. Note that `/v1/embeddings` batches are also
      restricted to a maximum of 50,000 embedding inputs across all requests in the
      batch.

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

      See [upload file](https://platform.openai.com/docs/api-reference/files/create)
      for how to upload a file.

      Your input file must be formatted as a
      [JSONL file](https://platform.openai.com/docs/api-reference/batch/request-input),
      and must be uploaded with the purpose `batch`. The file can contain up to 50,000
      requests, and can be up to 200 MB in size.

  metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
      for storing additional information about the object in a structured format, and
      querying for objects via API or the dashboard.

      Keys are strings with a maximum length of 64 characters. Values are strings with
      a maximum length of 512 characters.

  output_expires_after: The expiration policy for the output and/or error file that are generated for a
      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
ú/batches©Úcompletion_windowÚendpointÚinput_file_idr3   r4   Úbearer_authT©r5   r6   r7   r8   Úsecurity©ÚbodyÚoptionsÚcast_to)Ú_postr   r	   ÚBatchCreateParamsr   r   ©
r(   r=   r>   r?   r3   r4   r5   r6   r7   r8   s
             r)   ÚcreateÚBatches.create/   sh   € ðD �z‰zØÜ à):Ø (Ø%2Ø (Ø,@ñô $×5Ñ5ó	ô )Ø+Ø'Ø%ØØ'¨Ð.ñô ð' ð 
ð 	
r,   ©r5   r6   r7   r8   c               ó‚   • U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S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 ú/batches/{batch_id}©Úbatch_idr@   TrA   ©rE   rF   ©Ú
ValueErrorÚ_getr   r   r   ©r(   rR   r5   r6   r7   r8   s         r)   ÚretrieveÚBatches.retrieve‡   s^   € ö. ÜÐVÐW_ÑVbÐcÓdÐdØ�y‰yÜÐ/¸(ÑCÜ(Ø+Ø'Ø%ØØ'¨Ð.ñô ð ð 

ð 
	
r,   ©ÚafterÚlimitr5   r6   r7   r8   c               ó–   • U R                  S[        [           [        UUUU[	        UUS.[
        R                  5      SS0S9[        S9$ ©aÄ  List your organization's batches.

Args:
  after: A cursor for use in pagination.

`after` is an object ID that defines your place
      in the list. For instance, if you make a list request and receive 100 objects,
      ending with obj_foo, your subsequent call can include after=obj_foo in order to
      fetch the next page of the list.

  limit: A limit on the number of objects to be returned. Limit can range between 1 and
      100, and the default is 20.

  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
r;   )r[   r\   r@   T)r5   r6   r7   r8   ÚqueryrB   )ÚpagerE   Úmodel)Ú_get_api_listr   r   r   r   r   ÚBatchListParams©r(   r[   r\   r5   r6   r7   r8   s          r)   ÚlistÚBatches.list¬   si   € ðB ×!Ñ!ØÜ¤Ñ&Ü(Ø+Ø'Ø%ØÜ%à!&Ø!&ñô &×5Ñ5óð (¨Ð.ñô ð# "ð 
ð 	
r,   c               ó‚   • U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9$ )áÂ  Cancels an in-progress batch.

The batch will be in status `cancelling` for up to
10 minutes, before changing to `cancelled`, where it will have partial results
(if any) available in the output file.

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
rO   ú/batches/{batch_id}/cancelrQ   r@   TrA   rS   ©rU   rG   r   r   r   rW   s         r)   ÚcancelÚBatches.cancelá   s^   € ö4 ÜÐVÐW_ÑVbÐcÓdÐdØ�z‰zÜÐ6ÀÑJÜ(Ø+Ø'Ø%ØØ'¨Ð.ñô ð ð 

ð 
	
r,   © )Úreturnr&   )rn   r/   ©r=   zLiteral['24h']r>   z¤Literal['/v1/responses', '/v1/chat/completions', '/v1/embeddings', '/v1/completions', '/v1/moderations', '/v1/images/generations', '/v1/images/edits', '/v1/videos']r?   Ústrr3   zOptional[Metadata] | Omitr4   z-batch_create_params.OutputExpiresAfter | Omitr5   úHeaders | Noner6   úQuery | Noner7   úBody | Noner8   ú(float | httpx2.Timeout | None | NotGivenrn   r   ©rR   rp   r5   rq   r6   rr   r7   rs   r8   rt   rn   r   )r[   ú
str | Omitr\   ú
int | Omitr5   rq   r6   rr   r7   rs   r8   rt   rn   zSyncCursorPage[Batch]©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r*   r0   r   r   rJ   rX   re   rk   Ú__static_attributes__rm   r,   r)   r   r      s¹  † ÙEàó,ó ð,ð ó2ó ð2ð. /3ØNRð )-Ø$(Ø"&Ø<Eñ-V
ð *ðV
ð	
ð	V
ð ðV
ð ,ðV
ð  Lð!V
ð& &ð'V
ð( "ð)V
ð*  ð+V
ð, :ð-V
ð. 
õ/V
ð| )-Ø$(Ø"&Ø<Eñ#
àð#
ð &ð#
ð "ð#
ð  ð#
ð :ð#
ð 
õ#
ðP !Ø ð )-Ø$(Ø"&Ø<Eñ3
ð ð3
ð ð	3
ð &ð3
ð "ð3
ð  ð3
ð :ð3
ð 
õ3
ðv )-Ø$(Ø"&Ø<Eñ&
àð&
ð &ð&
ð "ð&
ð  ð&
ð :ð&
ð 
÷&
ð &
r,   c                  ó  • \ rS 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    i
  r#   c                ó   • [        U 5      $ r%   )ÚAsyncBatchesWithRawResponser'   s    r)   r*   ÚAsyncBatches.with_raw_response  s   € ô +¨4Ó0Ð0r,   c                ó   • [        U 5      $ r.   )Ú!AsyncBatchesWithStreamingResponser'   s    r)   r0   Ú$AsyncBatches.with_streaming_response  s   € ô 1°Ó6Ð6r,   Nr2   c       	      ƒ  ó´   #   • U R                  S[        UUUUUS.[        R                  5      I Sh  v•N [	        UUUU	SS0S9[
        S9I Sh  v•N $  N! N7f)r:   r;   r<   Nr@   TrA   rC   )rG   r   r	   rH   r   r   rI   s
             r)   rJ   ÚAsyncBatches.create   s   é € ðD —Z‘ZØÜ,à):Ø (Ø%2Ø (Ø,@ñô $×5Ñ5ó	÷ 	ô )Ø+Ø'Ø%ØØ'¨Ð.ñô ð'  ð 
÷ 
ð 	
ñ	ñ
ùs!   ‚0A²A
³AÁAÁAÁArL   c             ƒ  óž   #   • U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9I Sh  v•N $  N7f)	rN   rO   rP   rQ   r@   TrA   rS   NrT   rW   s         r)   rX   ÚAsyncBatches.retrievex  sk   é € ö. ÜÐVÐW_ÑVbÐcÓdÐdØ—Y‘YÜÐ/¸(ÑCÜ(Ø+Ø'Ø%ØØ'¨Ð.ñô ð ð 

÷ 

ð 
	
ñ 

ùó   ‚AAÁAÁArZ   c               ó–   • U R                  S[        [           [        UUUU[	        UUS.[
        R                  5      SS0S9[        S9$ r^   )rb   r   r   r   r   r   rc   rd   s          r)   re   ÚAsyncBatches.list�  si   € ðB ×!Ñ!ØÜ ¤Ñ'Ü(Ø+Ø'Ø%ØÜ%à!&Ø!&ñô &×5Ñ5óð (¨Ð.ñô ð# "ð 
ð 	
r,   c             ƒ  óž   #   • U(       d  [        SU< 35      eU R                  [        SUS9[        UUUUSS0S9[        S9I Sh  v•N $  N7f)	rh   rO   ri   rQ   r@   TrA   rS   Nrj   rW   s         r)   rk   ÚAsyncBatches.cancelÒ  sk   é € ö4 ÜÐVÐW_ÑVbÐcÓdÐdØ—Z‘ZÜÐ6ÀÑJÜ(Ø+Ø'Ø%ØØ'¨Ð.ñô ð  ð 

÷ 

ð 
	
ñ 

ùrŠ   rm   )rn   r�   )rn   r„   ro   ru   )r[   rv   r\   rw   r5   rq   r6   rr   r7   rs   r8   rt   rn   z-AsyncPaginator[Batch, AsyncCursorPage[Batch]]rx   rm   r,   r)   r    r    
  s¹  † ÙEàó1ó ð1ð ó7ó ð7ð. /3ØNRð )-Ø$(Ø"&Ø<Eñ-V
ð *ðV
ð	
ð	V
ð ðV
ð ,ðV
ð  Lð!V
ð& &ð'V
ð( "ð)V
ð*  ð+V
ð, :ð-V
ð. 
õ/V
ð| )-Ø$(Ø"&Ø<Eñ#
àð#
ð &ð#
ð "ð#
ð  ð#
ð :ð#
ð 
õ#
ðP !Ø ð )-Ø$(Ø"&Ø<Eñ3
ð ð3
ð ð	3
ð &ð3
ð "ð3
ð  ð3
ð :ð3
ð 
7õ3
ðv )-Ø$(Ø"&Ø<Eñ&
àð&
ð &ð&
ð "ð&
ð  ð&
ð :ð&
ð 
÷&
ð &
r,   c                  ó   • \ rS rSrSS jrSrg)r&   iû  c                ó8  • Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        g ©N)Ú_batchesr   Úto_raw_response_wrapperrJ   rX   re   rk   ©r(   Úbatchess     r)   Ú__init__ÚBatchesWithRawResponse.__init__ü  ss   € ØŒä&×>Ò>Ø�N‰Nó
ˆŒô )×@Ò@Ø×Ñó
ˆŒô %×<Ò<Ø�L‰Ló
ˆŒ	ô '×>Ò>Ø�N‰Nó
ˆ�r,   ©r’   rk   rJ   re   rX   N©r•   r   rn   ÚNone©ry   rz   r{   r|   r–   r~   rm   r,   r)   r&   r&   û  ó   † ÷
r,   r&   c                  ó   • \ rS rSrSS jrSrg)r�   i  c                ó8  • Xl         [        R                  " UR                  5      U l        [        R                  " UR                  5      U l        [        R                  " UR
                  5      U l        [        R                  " UR                  5      U l        g r‘   )r’   r   Úasync_to_raw_response_wrapperrJ   rX   re   rk   r”   s     r)   r–   Ú$AsyncBatchesWithRawResponse.__init__  ss   € ØŒä&×DÒDØ�N‰Nó
ˆŒô )×FÒFØ×Ñó
ˆŒô %×BÒBØ�L‰Ló
ˆŒ	ô '×DÒDØ�N‰Nó
ˆ�r,   r˜   N©r•   r    rn   rš   r›   rm   r,   r)   r�   r�     rœ   r,   r�   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   rJ   rX   re   rk   r”   s     r)   r–   Ú%BatchesWithStreamingResponse.__init__   s[   € ØŒä2Ø�N‰Nó
ˆŒô 5Ø×Ñó
ˆŒô 1Ø�L‰Ló
ˆŒ	ô 3Ø�N‰Nó
ˆ�r,   r˜   Nr™   r›   rm   r,   r)   r/   r/     rœ   r,   r/   c                  ó   • \ rS rSrSS jrSrg)r„   i1  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   rJ   rX   re   rk   r”   s     r)   r–   Ú*AsyncBatchesWithStreamingResponse.__init__2  s[   € ØŒä8Ø�N‰Nó
ˆŒô ;Ø×Ñó
ˆŒô 7Ø�L‰Ló
ˆŒ	ô 9Ø�N‰Nó
ˆ�r,   r˜   Nr¡   r›   rm   r,   r)   r„   r„   1  rœ   r,   r„   )1Ú
__future__r   Útypingr   Útyping_extensionsr   Úhttpx2Ú r   Útypesr   r	   Ú_typesr
   r   r   r   r   r   r   Ú_utilsr   r   r   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   Ú
paginationr   r   Útypes.batchr   Ú_base_clientr   r   Útypes.shared_params.metadatar   Ú__all__r   r    r&   r�   r/   r„   rm   r,   r)   Ú<module>r¸      sŽ   ðõ #å Ý %ã å ß :ß J× JÑ Jß JÑ JÝ %ß 9ß Xß 8Ý ß ?Ý 3à�nÐ
%€ôn
ˆoô n
ôbn
Ð#ô n
÷b
ñ 
÷$
ñ 
÷$
ñ 
÷$
ò 
r,   