
    f jL                    j   d dl mZ d dlmZ d dlZddlmZ ddlmZm	Z	m
Z
mZmZ ddl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mZ ddlmZmZ ddlmZm Z m!Z!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)dS )    )annotations)LiteralN   )_legacy_response)	NOT_GIVENBodyQueryHeadersNotGiven)maybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncCursorPageAsyncCursorPage)AsyncPaginatormake_request_options)AssistantFileFileDeleteResponsefile_list_paramsfile_create_paramsFiles
AsyncFilesc            	          e Zd Zed"d            Zed#d            Zdddedd$dZdddedd%dZeeeedddedd&dZ	dddedd'd!Z
dS )(r   returnFilesWithRawResponsec                     t          |           S N)r   selfs    zC:\Users\Terasoftware\OneDrive\Desktop\faahhh\fyndo\fyndo\venv\Lib\site-packages\openai/resources/beta/assistants/files.pywith_raw_responsezFiles.with_raw_response   s    #D)))    FilesWithStreamingResponsec                     t          |           S r!   )r'   r"   s    r$   with_streaming_responsezFiles.with_streaming_response!   s    )$///r&   Nextra_headersextra_query
extra_bodytimeoutassistant_idstrfile_idr+   Headers | Noner,   Query | Noner-   Body | Noner.   'float | httpx.Timeout | None | NotGivenr   c          
         |st          d|          ddi|pi }|                     d| dt          d|it          j                  t          ||||          t                    S )	  
        Create an assistant file by attaching a
        [File](https://platform.openai.com/docs/api-reference/files) to an
        [assistant](https://platform.openai.com/docs/api-reference/assistants).

        Args:
          file_id: A [File](https://platform.openai.com/docs/api-reference/files) ID (with
              `purpose="assistants"`) that the assistant should use. Useful for tools like
              `retrieval` and `code_interpreter` that can access files.

          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
        ;Expected a non-empty value for `assistant_id` but received OpenAI-Betaassistants=v1/assistants//filesr1   r*   bodyoptionscast_to)
ValueError_postr   r   FileCreateParamsr   r   r#   r/   r1   r+   r,   r-   r.   s          r$   createzFiles.create%   s    <  	mk[gkklll&QM<ORQzz/</// )W!57I7Z[[(+Q[el   "  
 
 	
r&   c          	         |st          d|          |st          d|          ddi|pi }|                     d| d| t          ||||          t                    S )	O  
        Retrieves an AssistantFile.

        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
        r8   6Expected a non-empty value for `file_id` but received r9   r:   r;   /files/r*   r?   r@   rA   _getr   r   r#   r1   r/   r+   r,   r-   r.   s          r$   retrievezFiles.retrieveO   s    0  	mk[gkklll 	caV]aabbb&QM<ORQyy9<9999(+Q[el   "  
 
 	
r&   afterbeforelimitorderr+   r,   r-   r.   rP   str | NotGivenrQ   rR   int | NotGivenrS   !Literal['asc', 'desc'] | NotGivenSyncCursorPage[AssistantFile]c                   |st          d|          ddi|pi }|                     d| dt          t                   t	          ||||	t          ||||dt          j                            t                    S 	a  
        Returns a list of assistant files.

        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.

          before: A cursor for use in pagination. `before` 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 before=obj_foo in order to
              fetch the previous 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.

          order: Sort order by the `created_at` timestamp of the objects. `asc` for ascending
              order and `desc` for descending order.

          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
        r8   r9   r:   r;   r<   )rP   rQ   rR   rS   )r+   r,   r-   r.   query)pager?   model)rA   _get_api_listr   r   r   r   r   FileListParams
r#   r/   rP   rQ   rR   rS   r+   r,   r-   r.   s
             r$   listz
Files.listt   s    V  	mk[gkklll&QM<ORQ!!/<///.(+'%%!&"(!&!&	  %3     % " 
 
 	
r&   r   c          	         |st          d|          |st          d|          ddi|pi }|                     d| d| t          ||||          t                    S )	M  
        Delete an assistant 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
        r8   rH   r9   r:   r;   rI   r*   rJ   rA   _deleter   r   rM   s          r$   deletezFiles.delete   s    0  	mk[gkklll 	caV]aabbb&QM<ORQ||9<9999(+Q[el   '  
 
 	
r&   )r   r   )r   r'   r/   r0   r1   r0   r+   r2   r,   r3   r-   r4   r.   r5   r   r   r1   r0   r/   r0   r+   r2   r,   r3   r-   r4   r.   r5   r   r   )r/   r0   rP   rT   rQ   rT   rR   rU   rS   rV   r+   r2   r,   r3   r-   r4   r.   r5   r   rW   r1   r0   r/   r0   r+   r2   r,   r3   r-   r4   r.   r5   r   r   __name__
__module____qualname__r   r%   r)   r   rE   rN   r`   re    r&   r$   r   r      s       * * * _* 0 0 0 _0 )-$("&;D(
 (
 (
 (
 (
 (
b )-$("&;D#
 #
 #
 #
 #
 #
R !*!* )3< )-$("&;DA
 A
 A
 A
 A
 A
T )-$("&;D#
 #
 #
 #
 #
 #
 #
 #
r&   c            	          e Zd Zed"d            Zed#d            Zdddedd$dZdddedd%dZeeeedddedd&dZ	dddedd'd!Z
dS )(r   r   AsyncFilesWithRawResponsec                     t          |           S r!   )ro   r"   s    r$   r%   zAsyncFiles.with_raw_response   s    (...r&   AsyncFilesWithStreamingResponsec                     t          |           S r!   )rq   r"   s    r$   r)   z"AsyncFiles.with_streaming_response   s    .t444r&   Nr*   r/   r0   r1   r+   r2   r,   r3   r-   r4   r.   r5   r   c          
        K   |st          d|          ddi|pi }|                     d| dt          d|it          j                   d{V t          ||||          t          	           d{V S )
r7   r8   r9   r:   r;   r<   r1   Nr*   r=   )rA   rB   r   r   rC   r   r   rD   s          r$   rE   zAsyncFiles.create   s      <  	mk[gkklll&QM<ORQZZ/<///,i-ACUCfgggggggg(+Q[el   "   
 
 
 
 
 
 
 
 	
r&   c          	        K   |st          d|          |st          d|          ddi|pi }|                     d| d| t          ||||          t                     d	{V S )
rG   r8   rH   r9   r:   r;   rI   r*   rJ   NrK   rM   s          r$   rN   zAsyncFiles.retrieve  s      0  	mk[gkklll 	caV]aabbb&QM<ORQYY9<9999(+Q[el   "  
 
 
 
 
 
 
 
 	
r&   rO   rP   rT   rQ   rR   rU   rS   rV   =AsyncPaginator[AssistantFile, AsyncCursorPage[AssistantFile]]c                   |st          d|          ddi|pi }|                     d| dt          t                   t	          ||||	t          ||||dt          j                            t                    S rY   )rA   r]   r   r   r   r   r   r^   r_   s
             r$   r`   zAsyncFiles.list5  s    V  	mk[gkklll&QM<ORQ!!/</// /(+'%%!&"(!&!&	  %3     % " 
 
 	
r&   r   c          	        K   |st          d|          |st          d|          ddi|pi }|                     d| d| t          ||||          t                     d	{V S )
rb   r8   rH   r9   r:   r;   rI   r*   rJ   Nrc   rM   s          r$   re   zAsyncFiles.deletex  s      0  	mk[gkklll 	caV]aabbb&QM<ORQ\\9<9999(+Q[el   ' " 
 
 
 
 
 
 
 
 	
r&   )r   ro   )r   rq   rf   rg   )r/   r0   rP   rT   rQ   rT   rR   rU   rS   rV   r+   r2   r,   r3   r-   r4   r.   r5   r   ru   rh   ri   rm   r&   r$   r   r      s       / / / _/ 5 5 5 _5 )-$("&;D(
 (
 (
 (
 (
 (
b )-$("&;D#
 #
 #
 #
 #
 #
R !*!* )3< )-$("&;DA
 A
 A
 A
 A
 A
T )-$("&;D#
 #
 #
 #
 #
 #
 #
 #
r&   c                      e Zd ZddZdS )r   filesr   r   Nonec                   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r!   )_filesr   to_raw_response_wrapperrE   rN   r`   re   r#   ry   s     r$   __init__zFilesWithRawResponse.__init__  sw    &>L
 
 )@N
 
 %<J
 
	 '>L
 
r&   Nry   r   r   rz   rj   rk   rl   r   rm   r&   r$   r   r     (        
 
 
 
 
 
r&   r   c                      e Zd ZddZdS )ro   ry   r   r   rz   c                   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r!   )r|   r   async_to_raw_response_wrapperrE   rN   r`   re   r~   s     r$   r   z"AsyncFilesWithRawResponse.__init__  sw    &DL
 
 )FN
 
 %BJ
 
	 'DL
 
r&   Nry   r   r   rz   r   rm   r&   r$   ro   ro     r   r&   ro   c                      e Zd ZddZdS )r'   ry   r   r   rz   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r!   )r|   r   rE   rN   r`   re   r~   s     r$   r   z#FilesWithStreamingResponse.__init__  sk    2L
 
 5N
 
 1J
 
	 3L
 
r&   Nr   r   rm   r&   r$   r'   r'     r   r&   r'   c                      e Zd ZddZdS )rq   ry   r   r   rz   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r!   )r|   r   rE   rN   r`   re   r~   s     r$   r   z(AsyncFilesWithStreamingResponse.__init__  sk    8L
 
 ;N
 
 7J
 
	 9L
 
r&   Nr   r   rm   r&   r$   rq   rq     r   r&   rq   )*
__future__r   typing_extensionsr   httpx r   _typesr   r   r	   r
   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   
paginationr   r   _base_clientr   r   types.beta.assistantsr   r   r   r   __all__r   r   r   ro   r'   rq   rm   r&   r$   <module>r      s^   # " " " " " % % % % % %  ! ! ! ! ! ! @ @ @ @ @ @ @ @ @ @ @ @ @ @        ( ' ' ' ' ' ; ; ; ; ; ; ; ; Z Z Z Z Z Z Z Z : : : : : : : :        n m m m m m m m m m m mL
!~
 ~
 ~
 ~
 ~
O ~
 ~
 ~
B~
 ~
 ~
 ~
 ~
! ~
 ~
 ~
B
 
 
 
 
 
 
 
$
 
 
 
 
 
 
 
$
 
 
 
 
 
 
 
$
 
 
 
 
 
 
 
 
 
r&   