Ë
    Fü´jÒ!  ã                  óL  — d dl mZ d dlmZmZ d dlZddlmZ ddlm	Z	 ddl
mZmZmZmZmZmZ ddlmZmZmZmZ dd	lmZ dd
lmZmZ ddlmZmZ ddlmZ ddl m!Z! ddl"m#Z# ddgZ$ G d„ de«      Z% G d„ de«      Z& G d„ d«      Z' G d„ d«      Z( G d„ d«      Z) G d„ d«      Z*y)é    )Úannotations)ÚMappingÚcastNé   )Ú_legacy_response)Údeepcopy_with_paths)ÚBodyÚQueryÚHeadersÚNotGivenÚ	FileTypesÚ	not_given)Úextract_filesÚpath_templateÚmaybe_transformÚasync_maybe_transform)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)Úmake_request_options)Úpart_create_params)Ú
UploadPartÚPartsÚ
AsyncPartsc                  ób   — e Zd ZdZedd„«       Zedd„«       Zdddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 d	d„Zy)
r   ú4Use Uploads to upload large files in multiple parts.c                ó   — t        | «      S ©a  
        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
        )ÚPartsWithRawResponse©Úselfs    ú\/root/workspace/ytshorts/venv/lib/python3.12/site-packages/openai/resources/uploads/parts.pyÚwith_raw_responsezParts.with_raw_response   s   € ô $ DÓ)Ð)ó    c                ó   — t        | «      S ©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
        )ÚPartsWithStreamingResponser"   s    r$   Úwith_streaming_responsezParts.with_streaming_response$   s   € ô *¨$Ó/Ð/r&   N©Úextra_headersÚextra_queryÚ
extra_bodyÚtimeoutc               óD  — |st        d|›�«      ‚t        d|idgg«      }t        t        t        t
        t        f   |«      dgg¬«      }ddi|xs i ¥}| j                  t        d|¬«      t        |t        j                  «      |t        ||||dd	i¬
«      t        ¬«      S )áâ  
        Adds a
        [Part](https://developers.openai.com/api/reference/resources/uploads/subresources/parts)
        to an [Upload](https://developers.openai.com/api/reference/resources/uploads)
        object. A Part represents a chunk of bytes from the file you are trying to
        upload.

        Each Part can be at most 64 MB, and you can add Parts until you hit the Upload
        maximum of 8 GB.

        It is possible to add multiple Parts in parallel. You can decide the intended
        order of the Parts when you
        [complete the Upload](https://developers.openai.com/api/reference/resources/uploads/methods/complete).

        Args:
          data: The chunk of bytes for this Part.

          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
        ú8Expected a non-empty value for `upload_id` but received Údata©ÚpathsúContent-Typeúmultipart/form-dataú/uploads/{upload_id}/parts©Ú	upload_idÚbearer_authT©r,   r-   r.   r/   Úsecurity©ÚbodyÚfilesÚoptionsÚcast_to)Ú
ValueErrorr   r   r   r   ÚstrÚobjectÚ_postr   r   r   ÚPartCreateParamsr   r   ©	r#   r:   r3   r,   r-   r.   r/   r?   r@   s	            r$   ÚcreatezParts.create-   s¿   € ñJ ÜÐWÐXaÐWdÐeÓfÐfÜ" F¨D >°V°H°:Ó>ˆÜœd¤7¬3´¨;Ñ#7¸Ó>ÈÀxÀjÔQˆð (Ð)>ÐXÀ=ÒCVÐTVÐXˆØ�z‰zÜÐ6À)ÔLÜ  Ô'9×'JÑ'JÓKØÜ(Ø+Ø'Ø%ØØ'¨Ð.ôô ð ó 
ð 	
r&   )Úreturnr!   )rJ   r)   ©r:   rD   r3   r   r,   zHeaders | Noner-   zQuery | Noner.   zBody | Noner/   z(float | httpx2.Timeout | None | NotGivenrJ   r   ©	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r%   r*   r   rI   © r&   r$   r   r      s‚   „ Ù>àò*ó ð*ð ò0ó ð0ð )-Ø$(Ø"&Ø<Eñ9
àð9
ð ð	9
ð &ð9
ð "ð9
ð  ð9
ð :ð9
ð 
ô9
r&   c                  ób   — e Zd ZdZedd„«       Zedd„«       Zdddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 d	d„Zy)
r   r   c                ó   — t        | «      S r    )ÚAsyncPartsWithRawResponser"   s    r$   r%   zAsyncParts.with_raw_responsel   s   € ô )¨Ó.Ð.r&   c                ó   — t        | «      S r(   )ÚAsyncPartsWithStreamingResponser"   s    r$   r*   z"AsyncParts.with_streaming_responsev   s   € ô /¨tÓ4Ð4r&   Nr+   c             ƒ  ót  K  — |st        d|›�«      ‚t        d|idgg«      }t        t        t        t
        t        f   |«      dgg¬«      }ddi|xs i ¥}| j                  t        d|¬«      t        |t        j                  «      ƒ d{  –—† |t        ||||d	d
i¬«      t        ¬«      ƒ d{  –—† S 7 Œ(7 Œ­w)r1   r2   r3   r4   r6   r7   r8   r9   Nr;   Tr<   r>   )rC   r   r   r   r   rD   rE   rF   r   r   r   rG   r   r   rH   s	            r$   rI   zAsyncParts.create   sÔ   è ø€ ñJ ÜÐWÐXaÐWdÐeÓfÐfÜ" F¨D >°V°H°:Ó>ˆÜœd¤7¬3´¨;Ñ#7¸Ó>ÈÀxÀjÔQˆð (Ð)>ÐXÀ=ÒCVÐTVÐXˆØ—Z‘ZÜÐ6À)ÔLÜ,¨TÔ3E×3VÑ3VÓW×WØÜ(Ø+Ø'Ø%ØØ'¨Ð.ôô ð  ó 
÷ 
ð 	
àWøð
ús$   ‚B	B8ÂB4
Â#B8Â/B6Â0B8Â6B8)rJ   rT   )rJ   rV   rK   rL   rQ   r&   r$   r   r   i   s‚   „ Ù>àò/ó ð/ð ò5ó ð5ð )-Ø$(Ø"&Ø<Eñ9
àð9
ð ð	9
ð &ð9
ð "ð9
ð  ð9
ð :ð9
ð 
ô9
r&   c                  ó   — e Zd Zdd„Zy)r!   c                óZ   — || _         t        j                  |j                  «      | _        y ©N)Ú_partsr   Úto_raw_response_wrapperrI   ©r#   Úpartss     r$   Ú__init__zPartsWithRawResponse.__init__¼   s"   € ØˆŒä&×>Ñ>Ø�L‰Ló
ˆ�r&   N©r^   r   rJ   ÚNone©rM   rN   rO   r_   rQ   r&   r$   r!   r!   »   ó   „ ô
r&   r!   c                  ó   — e Zd Zdd„Zy)rT   c                óZ   — || _         t        j                  |j                  «      | _        y rZ   )r[   r   Úasync_to_raw_response_wrapperrI   r]   s     r$   r_   z"AsyncPartsWithRawResponse.__init__Å   s"   € ØˆŒä&×DÑDØ�L‰Ló
ˆ�r&   N©r^   r   rJ   ra   rb   rQ   r&   r$   rT   rT   Ä   rc   r&   rT   c                  ó   — e Zd Zdd„Zy)r)   c                óF   — || _         t        |j                  «      | _        y rZ   )r[   r   rI   r]   s     r$   r_   z#PartsWithStreamingResponse.__init__Î   s   € ØˆŒä2Ø�L‰Ló
ˆ�r&   Nr`   rb   rQ   r&   r$   r)   r)   Í   rc   r&   r)   c                  ó   — e Zd Zdd„Zy)rV   c                óF   — || _         t        |j                  «      | _        y rZ   )r[   r   rI   r]   s     r$   r_   z(AsyncPartsWithStreamingResponse.__init__×   s   € ØˆŒä8Ø�L‰Ló
ˆ�r&   Nrg   rb   rQ   r&   r$   rV   rV   Ö   rc   r&   rV   )+Ú
__future__r   Útypingr   r   Úhttpx2Ú r   Ú_filesr   Ú_typesr	   r
   r   r   r   r   Ú_utilsr   r   r   r   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   Ú_base_clientr   Útypes.uploadsr   Útypes.uploads.upload_partr   Ú__all__r   r   r!   rT   r)   rV   rQ   r&   r$   ú<module>rz      s…   ðõ #ç  ã å  Ý )ß J× Jß ZÓ ZÝ &ß :ß YÝ 0Ý /Ý 3à�LÐ
!€ôO
ˆOô O
ôdO
Ð!ô O
÷d
ñ 
÷
ñ 
÷
ñ 
÷
ò 
r&   