+
    UiT                    n   ^ RI Ht ^ RIHt ^ RIHt ^ RIt^RIHt ^RI	H
t
Ht ^RIHtHtHtHtHtHtHt ^RIHtHtHt ^R	IHt ^R
IHtHt ^RIHtHt ^RI H!t!H"t" ^RI#H$t$ ^RI%H&t&H't' ^RI(H)t) RR.t* ! R R]4      t+ ! R R]4      t, ! R R4      t- ! R R4      t. ! R R4      t/ ! R R4      t0R# )    )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                      ] tR t^tRt]R R l4       t]R R l4       tR]R]RR	R
R	RR	R]	/R R llt
RR	R
R	RR	R]	/R R lltR]R]RR	R
R	RR	R]	/R R lltRR	R
R	RR	R]	/R R lltRtR	# )r   ;Create large batches of API requests to run asynchronously.c                   V ^8  d   QhRR/# )   returnBatchesWithRawResponse )formats   "W/home/ubuntu/hermes-agent/venv/lib/python3.14/site-packages/openai/resources/batches.py__annotate__Batches.__annotate__   s     , ,#9 ,    c                    \        V 4      # 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
)r%   selfs   &r(   with_raw_responseBatches.with_raw_response   s     &d++r+   c                   V ^8  d   QhRR/# )r#   r$   BatchesWithStreamingResponser&   )r'   s   "r(   r)   r*   '   s     2 2)E 2r+   c                    \        V 4      # 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
)r3   r.   s   &r(   with_streaming_responseBatches.with_streaming_response&   s     ,D11r+   metadataoutput_expires_afterextra_headersNextra_query
extra_bodytimeoutc               @    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRR/
# r#   completion_windowzLiteral['24h']endpointzLiteral['/v1/responses', '/v1/chat/completions', '/v1/embeddings', '/v1/completions', '/v1/moderations', '/v1/images/generations', '/v1/images/edits', '/v1/videos']input_file_idstrr8   zOptional[Metadata] | Omitr9   z-batch_create_params.OutputExpiresAfter | Omitr:   Headers | Noner;   Query | Noner<   Body | Noner=   'float | httpx.Timeout | None | NotGivenr$   r   r&   )r'   s   "r(   r)   r*   /   }     R
 R
 *R
	
	R
 R
 ,R
  L!R
& &'R
( ")R
*  +R
, 9-R
. 
/R
r+   c       	            V P                  R\        RVRVRVRVRV/\        P                  4      \	        WgWR7      \
        R7      # )	  
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
/batchesr@   rA   rB   r8   r9   r:   r;   r<   r=   bodyoptionscast_to)_postr   r   BatchCreateParamsr   r   
r/   r@   rA   rB   r8   r9   r:   r;   r<   r=   s
   &$$$$$$$$$r(   createBatches.create/   sf    D zz '):#]*,@ $55	 )+Q[   
 	
r+   c               0    V ^8  d   QhRRRRRRRRR	R
RR/# r#   batch_idrC   r:   rD   r;   rE   r<   rF   r=   rG   r$   r   r&   )r'   s   "r(   r)   r*      F     
 

 &
 "
  
 9
 

r+   c          
         V'       g   \        RV: 24      hV P                  \        RVR7      \        W#WER7      \        R7      # )  
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}rX   rL   rO   rP   
ValueError_getr   r   r   r/   rX   r:   r;   r<   r=   s   &&$$$$r(   retrieveBatches.retrieve   sP    . VW_Vbcddyy/(C(+Q[   
 	
r+   afterlimitc               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )r#   rf   
str | Omitrg   
int | Omitr:   rD   r;   rE   r<   rF   r=   rG   r$   zSyncCursorPage[Batch]r&   )r'   s   "r(   r)   r*      sR     2
 2
 2
 	2
 &2
 "2
  2
 92
 
2
r+   c                   V P                  R\        \        ,          \        VVVV\	        RVRV/\
        P                  4      R7      \        R7      # 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
rK   rf   rg   )r:   r;   r<   r=   query)pagerO   model)_get_api_listr   r   r   r   r   BatchListParamsr/   rf   rg   r:   r;   r<   r=   s   &$$$$$$r(   listBatches.list   sc    B !!&(+'%% &55 ! " 
 	
r+   c               0    V ^8  d   QhRRRRRRRRR	R
RR/# rW   r&   )r'   s   "r(   r)   r*      F     "
 "
"
 &"
 ""
  "
 9"
 
"
r+   c          
         V'       g   \        RV: 24      hV P                  \        RVR7      \        W#WER7      \        R7      # )  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
r\   /batches/{batch_id}/cancelr^   rL   r_   ra   rQ   r   r   r   rc   s   &&$$$$r(   cancelBatches.cancel   sP    4 VW_Vbcddzz6J(+Q[   
 	
r+   r&   __name__
__module____qualname____firstlineno____doc__r   r0   r6   r   r   rT   rd   rs   r{   __static_attributes__r&   r+   r(   r   r      s   E, , 2 2R
 /3R
  OS!R
& )-'R
( %))R
* #'+R
, <E-R
h
 )-
 %)
 #'
 <E
B2
 !2
 !	2
 )-2
 %)2
 #'2
 <E2
h"
 )-"
 %)"
 #'"
 <E"
 "
r+   c                      ] tR t^tRt]R R l4       t]R R l4       tR]R]RR	R
R	RR	R]	/R R llt
RR	R
R	RR	R]	/R R lltR]R]RR	R
R	RR	R]	/R R lltRR	R
R	RR	R]	/R R lltRtR	# )r   r!   c                   V ^8  d   QhRR/# )r#   r$   AsyncBatchesWithRawResponser&   )r'   s   "r(   r)   AsyncBatches.__annotate__  s     1 1#> 1r+   c                    \        V 4      # r-   )r   r.   s   &r(   r0   AsyncBatches.with_raw_response   s     +400r+   c                   V ^8  d   QhRR/# )r#   r$   !AsyncBatchesWithStreamingResponser&   )r'   s   "r(   r)   r     s     7 7)J 7r+   c                    \        V 4      # r5   )r   r.   s   &r(   r6   $AsyncBatches.with_streaming_response
  s     166r+   r8   r9   r:   Nr;   r<   r=   c               @    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRR/
# r?   r&   )r'   s   "r(   r)   r     rH   r+   c       	           "   T P                  R\        RVRVRVRVRV/\        P                  4      G Rj  xL
 \	        WgWR7      \
        R	7      G Rj  xL
 #  L" L5i)
rJ   rK   r@   rA   rB   r8   r9   NrL   rM   )rQ   r   r   rR   r   r   rS   s
   &$$$$$$$$$r(   rT   AsyncBatches.create  s}     D ZZ,'):#]*,@ $55	 	 )+Q[    
 
 	
	
s!   4AA
AAAAc               0    V ^8  d   QhRRRRRRRRR	R
RR/# rW   r&   )r'   s   "r(   r)   r   g  rY   r+   c          
        "   V'       g   \        RV: 24      hV P                  \        RVR7      \        W#WER7      \        R7      G Rj  xL
 #  L5i)r[   r\   r]   r^   rL   r_   Nr`   rc   s   &&$$$$r(   rd   AsyncBatches.retrieveg  s]     . VW_VbcddYY/(C(+Q[   
 
 	
 
   A	AAArf   rg   c               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )r#   rf   ri   rg   rj   r:   rD   r;   rE   r<   rF   r=   rG   r$   z-AsyncPaginator[Batch, AsyncCursorPage[Batch]]r&   )r'   s   "r(   r)   r     sR     2
 2
 2
 	2
 &2
 "2
  2
 92
 
72
r+   c                   V P                  R\        \        ,          \        VVVV\	        RVRV/\
        P                  4      R7      \        R7      # rl   )rp   r   r   r   r   r   rq   rr   s   &$$$$$$r(   rs   AsyncBatches.list  sc    B !! '(+'%% &55 ! " 
 	
r+   c               0    V ^8  d   QhRRRRRRRRR	R
RR/# rW   r&   )r'   s   "r(   r)   r     rv   r+   c          
        "   V'       g   \        RV: 24      hV P                  \        RVR7      \        W#WER7      \        R7      G Rj  xL
 #  L5i)rx   r\   ry   r^   rL   r_   Nrz   rc   s   &&$$$$r(   r{   AsyncBatches.cancel  s]     4 VW_VbcddZZ6J(+Q[    
 
 	
 
r   r&   r}   r&   r+   r(   r   r      s   E1 1 7 7R
 /3R
  OS!R
& )-'R
( %))R
* #'+R
, <E-R
h
 )-
 %)
 #'
 <E
B2
 !2
 !	2
 )-2
 %)2
 #'2
 <E2
h"
 )-"
 %)"
 #'"
 <E"
 "
r+   c                  "    ] tR tRtR R ltRtR# )r%   i  c                    V ^8  d   QhRRRR/# r#   batchesr   r$   Noner&   )r'   s   "r(   r)   #BatchesWithRawResponse.__annotate__       
 
 
D 
r+   c                	:   Wn         \        P                  ! VP                  4      V n        \        P                  ! VP                  4      V n        \        P                  ! VP
                  4      V n        \        P                  ! VP                  4      V n        R # N)_batchesr   to_raw_response_wrapperrT   rd   rs   r{   r/   r   s   &&r(   __init__BatchesWithRawResponse.__init__  ss    &>>NN
 )@@
 %<<LL
	 '>>NN
r+   r   r{   rT   rs   rd   Nr~   r   r   r   r   r   r&   r+   r(   r%   r%         
 
r+   r%   c                  "    ] tR tRtR R ltRtR# )r   i  c                    V ^8  d   QhRRRR/# r#   r   r   r$   r   r&   )r'   s   "r(   r)   (AsyncBatchesWithRawResponse.__annotate__       
 
 
 
r+   c                	:   Wn         \        P                  ! VP                  4      V n        \        P                  ! VP                  4      V n        \        P                  ! VP
                  4      V n        \        P                  ! VP                  4      V n        R # r   )r   r   async_to_raw_response_wrapperrT   rd   rs   r{   r   s   &&r(   r   $AsyncBatchesWithRawResponse.__init__  ss    &DDNN
 )FF
 %BBLL
	 'DDNN
r+   r   Nr   r&   r+   r(   r   r     r   r+   r   c                  "    ] tR tRtR R ltRtR# )r3   i  c                    V ^8  d   QhRRRR/# r   r&   )r'   s   "r(   r)   )BatchesWithStreamingResponse.__annotate__  r   r+   c                	    Wn         \        VP                  4      V n        \        VP                  4      V n        \        VP                  4      V n        \        VP
                  4      V n        R # r   )r   r   rT   rd   rs   r{   r   s   &&r(   r   %BatchesWithStreamingResponse.__init__  s[    2NN
 5
 1LL
	 3NN
r+   r   Nr   r&   r+   r(   r3   r3     r   r+   r3   c                  "    ] tR tRtR R ltRtR# )r   i  c                    V ^8  d   QhRRRR/# r   r&   )r'   s   "r(   r)   .AsyncBatchesWithStreamingResponse.__annotate__  r   r+   c                	    Wn         \        VP                  4      V n        \        VP                  4      V n        \        VP                  4      V n        \        VP
                  4      V n        R # r   )r   r   rT   rd   rs   r{   r   s   &&r(   r   *AsyncBatchesWithStreamingResponse.__init__  s[    8NN
 ;
 7LL
	 9NN
r+   r   Nr   r&   r+   r(   r   r     r   r+   r   )1
__future__r   typingr   typing_extensionsr   httpx 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   r3   r   r&   r+   r(   <module>r      s    #  %   : J J J J J % 9 X 8  ? 3n
%a
o a
Ha
# a
H
 
$
 
$
 
$
 
r+   