Ë
    ,Œ:jxk  ã                  óD  — d dl mZ d dlmZmZmZ d dlmZ d dlZddl	m
Z
mZmZmZ ddlmZ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mZ ddlm Z m!Z!m"Z"m#Z#m$Z$ ddl%m&Z&m'Z' erddl(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/y)é    )Úannotations)ÚTYPE_CHECKINGÚListÚOptional)ÚLiteralNé   )ÚFilesÚ
AsyncFilesÚFilesWithRawResponseÚAsyncFilesWithRawResponseé   )Ú	NOT_GIVENÚBodyÚQueryÚHeadersÚNotGiven)Úmaybe_transform)ÚSyncAPIResourceÚAsyncAPIResource)Úto_raw_response_wrapperÚasync_to_raw_response_wrapper)ÚSyncCursorPageÚAsyncCursorPage)Ú	AssistantÚAssistantDeletedÚassistant_list_paramsÚassistant_create_paramsÚassistant_update_params)ÚAsyncPaginatorÚmake_request_options)ÚOpenAIÚAsyncOpenAIÚ
AssistantsÚAsyncAssistantsc                  ój  ‡ — e Zd ZU ded<   ded<   dˆ fd„Zeeeeeedddedœ
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zddded	œ	 	 	 	 	 	 	 	 	 	 	 dd
„Zeeeeeee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
ˆ xZS )r#   r	   ÚfilesÚAssistantsWithRawResponseÚwith_raw_responsec                ód   •— t         ‰| �  |«       t        |«      | _        t	        | «      | _        y ©N)ÚsuperÚ__init__r	   r&   r'   r(   ©ÚselfÚclientÚ	__class__s     €úm/var/www/html/tokenscope/api/venv/lib/python3.12/site-packages/openai/resources/beta/assistants/assistants.pyr,   zAssistants.__init__#   s(   ø€ Ü‰Ñ˜Ô Ü˜6“]ˆŒ
Ü!:¸4Ó!@ˆÕó    N©
ÚdescriptionÚfile_idsÚinstructionsÚmetadataÚnameÚtoolsÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutc               ó¢   — ddi|xs i ¥}| j                  dt        |||||||dœt        j                  «      t	        ||	|
|¬«      t
        ¬«      S )áô  
        Create an assistant with a model and instructions.

        Args:
          model: ID of the model to use. You can use the
              [List models](https://platform.openai.com/docs/api-reference/models/list) API to
              see all of your available models, or see our
              [Model overview](https://platform.openai.com/docs/models/overview) for
              descriptions of them.

          description: The description of the assistant. The maximum length is 512 characters.

          file_ids: A list of [file](https://platform.openai.com/docs/api-reference/files) IDs
              attached to this assistant. There can be a maximum of 20 files attached to the
              assistant. Files are ordered by their creation date in ascending order.

          instructions: The system instructions that the assistant uses. The maximum length is 32768
              characters.

          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. Keys
              can be a maximum of 64 characters long and values can be a maxium of 512
              characters long.

          name: The name of the assistant. The maximum length is 256 characters.

          tools: A list of tool enabled on the assistant. There can be a maximum of 128 tools per
              assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.

          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-Betaúassistants=v1ú/assistants©Úmodelr4   r5   r6   r7   r8   r9   ©r:   r;   r<   r=   ©ÚbodyÚoptionsÚcast_to©Ú_postr   r   ÚAssistantCreateParamsr    r   ©r.   rD   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   s               r1   ÚcreatezAssistants.create(   sy   € ðl '¨ÐQ¸MÒ<OÈRÐQˆØ�z‰zØÜ à"Ø#.Ø (Ø$0Ø (Ø Ø"ñô (×=Ñ=óô )Ø+¸ÐQ[Ðelôô ð# ó 
ð 	
r2   rE   c          	     óf   — ddi|xs i ¥}| j                  d|› �t        ||||¬«      t        ¬«      S )áK  
        Retrieves an assistant.

        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@   rA   ú/assistants/rE   ©rH   rI   ©Ú_getr    r   ©r.   Úassistant_idr:   r;   r<   r=   s         r1   ÚretrievezAssistants.retrieves   sP   € ð. '¨ÐQ¸MÒ<OÈRÐQˆØ�y‰yØ˜<˜.Ð)Ü(Ø+¸ÐQ[Ðelôô ð ó 
ð 	
r2   ©r4   r5   r6   r7   rD   r8   r9   r:   r;   r<   r=   c               ó¨   — ddi|	xs i ¥}	| j                  d|› �t        |||||||dœt        j                  «      t	        |	|
||¬«      t
        ¬«      S )ák  Modifies an assistant.

        Args:
          description: The description of the assistant.

        The maximum length is 512 characters.

          file_ids: A list of [File](https://platform.openai.com/docs/api-reference/files) IDs
              attached to this assistant. There can be a maximum of 20 files attached to the
              assistant. Files are ordered by their creation date in ascending order. If a
              file was previosuly attached to the list but does not show up in the list, it
              will be deleted from the assistant.

          instructions: The system instructions that the assistant uses. The maximum length is 32768
              characters.

          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. Keys
              can be a maximum of 64 characters long and values can be a maxium of 512
              characters long.

          model: ID of the model to use. You can use the
              [List models](https://platform.openai.com/docs/api-reference/models/list) API to
              see all of your available models, or see our
              [Model overview](https://platform.openai.com/docs/models/overview) for
              descriptions of them.

          name: The name of the assistant. The maximum length is 256 characters.

          tools: A list of tool enabled on the assistant. There can be a maximum of 128 tools per
              assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.

          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@   rA   rQ   ©r4   r5   r6   r7   rD   r8   r9   rE   rF   ©rK   r   r   ÚAssistantUpdateParamsr    r   ©r.   rV   r4   r5   r6   r7   rD   r8   r9   r:   r;   r<   r=   s                r1   ÚupdatezAssistants.update“   s€   € ðt '¨ÐQ¸MÒ<OÈRÐQˆØ�z‰zØ˜<˜.Ð)Ü à#.Ø (Ø$0Ø (Ø"Ø Ø"ñô (×=Ñ=óô )Ø+¸ÐQ[Ðelôô ð# ó 
ð 	
r2   ©ÚafterÚbeforeÚlimitÚorderr:   r;   r<   r=   c               ó´   — ddi|xs i ¥}| j                  dt        t           t        ||||t	        ||||dœt
        j                  «      ¬«      t        ¬«      S ©a  Returns a list of assistants.

        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
        r@   rA   rB   )ra   rb   rc   rd   )r:   r;   r<   r=   Úquery)ÚpagerH   rD   )Ú_get_api_listr   r   r    r   r   ÚAssistantListParams©	r.   ra   rb   rc   rd   r:   r;   r<   r=   s	            r1   ÚlistzAssistants.listâ   sy   € ðV '¨ÐQ¸MÒ<OÈRÐQˆØ×!Ñ!ØÜ¤	Ñ*Ü(Ø+Ø'Ø%ØÜ%à!&Ø"(Ø!&Ø!&ñ	ô *×=Ñ=óôô ð% "ó 
ð 	
r2   c          	     óf   — ddi|xs i ¥}| j                  d|› �t        ||||¬«      t        ¬«      S )áH  
        Delete an assistant.

        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@   rA   rQ   rE   rR   ©Ú_deleter    r   rU   s         r1   ÚdeletezAssistants.delete#  sP   € ð. '¨ÐQ¸MÒ<OÈRÐQˆØ�|‰|Ø˜<˜.Ð)Ü(Ø+¸ÐQ[Ðelôô %ð ó 
ð 	
r2   )r/   r!   ÚreturnÚNone©rD   Ústrr4   úOptional[str] | NotGivenr5   úList[str] | NotGivenr6   rv   r7   úOptional[object] | NotGivenr8   rv   r9   z-List[assistant_create_params.Tool] | NotGivenr:   úHeaders | Noner;   úQuery | Noner<   úBody | Noner=   ú'float | httpx.Timeout | None | NotGivenrr   r   ©rV   ru   r:   ry   r;   rz   r<   r{   r=   r|   rr   r   ©rV   ru   r4   rv   r5   rw   r6   rv   r7   rx   rD   ústr | NotGivenr8   rv   r9   z-List[assistant_update_params.Tool] | NotGivenr:   ry   r;   rz   r<   r{   r=   r|   rr   r   )ra   r   rb   r   rc   úint | NotGivenrd   ú!Literal['asc', 'desc'] | NotGivenr:   ry   r;   rz   r<   r{   r=   r|   rr   zSyncCursorPage[Assistant]©rV   ru   r:   ry   r;   rz   r<   r{   r=   r|   rr   r   ©Ú__name__Ú
__module__Ú__qualname__Ú__annotations__r,   r   rN   rW   r_   rl   rq   Ú__classcell__©r0   s   @r1   r#   r#      s‘  ø… ØƒLØ0Ó0õAð 1:Ø)2Ø1:Ø09Ø)2Ø?Hð )-Ø$(Ø"&Ø;DñI
ð ðI
ð .ð	I
ð
 'ðI
ð /ðI
ð .ðI
ð 'ðI
ð =ðI
ð &ðI
ð "ðI
ð  ðI
ð 9ðI
ð  
ó!I
ðb )-Ø$(Ø"&Ø;Dñ
àð
ð &ð
ð "ð
ð  ð
ð 9ð
ð 
ó
ðH 1:Ø)2Ø1:Ø09Ø )Ø)2Ø?Hð )-Ø$(Ø"&Ø;Dñ!M
àðM
ð .ð	M
ð
 'ðM
ð /ðM
ð .ðM
ð ðM
ð 'ðM
ð =ðM
ð &ðM
ð "ðM
ð  ðM
ð  9ð!M
ð" 
ó#M
ðd !*Ø!*Ø )Ø3<ð )-Ø$(Ø"&Ø;Dñ?
ð ð?
ð ð	?
ð
 ð?
ð 1ð?
ð &ð?
ð "ð?
ð  ð?
ð 9ð?
ð 
#ó?
ðN )-Ø$(Ø"&Ø;Dñ
àð
ð &ð
ð "ð
ð  ð
ð 9ð
ð 
÷
r2   c                  ój  ‡ — e Zd ZU ded<   ded<   dˆ fd„Zeeeeeedddedœ
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zddded	œ	 	 	 	 	 	 	 	 	 	 	 dd
„Zeeeeeee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
ˆ xZS )r$   r
   r&   ÚAsyncAssistantsWithRawResponser(   c                ód   •— t         ‰| �  |«       t        |«      | _        t	        | «      | _        y r*   )r+   r,   r
   r&   r‹   r(   r-   s     €r1   r,   zAsyncAssistants.__init__H  s)   ø€ Ü‰Ñ˜Ô Ü Ó'ˆŒ
Ü!?ÀÓ!EˆÕr2   Nr3   c             ƒ  ó¾   K  — ddi|xs i ¥}| j                  dt        |||||||dœt        j                  «      t	        ||	|
|¬«      t
        ¬«      ƒ d{  –—† S 7 Œ­w)r?   r@   rA   rB   rC   rE   rF   NrJ   rM   s               r1   rN   zAsyncAssistants.createM  s‡   è ø€ ðl '¨ÐQ¸MÒ<OÈRÐQˆØ—Z‘ZØÜ à"Ø#.Ø (Ø$0Ø (Ø Ø"ñô (×=Ñ=óô )Ø+¸ÐQ[Ðelôô ð#  ó 
÷ 
ð 	
ð 
ús   ‚AAÁAÁArE   c          	   ƒ  ó‚   K  — ddi|xs i ¥}| j                  d|› �t        ||||¬«      t        ¬«      ƒ d{  –—† S 7 Œ­w)rP   r@   rA   rQ   rE   rR   NrS   rU   s         r1   rW   zAsyncAssistants.retrieve˜  s^   è ø€ ð. '¨ÐQ¸MÒ<OÈRÐQˆØ—Y‘YØ˜<˜.Ð)Ü(Ø+¸ÐQ[Ðelôô ð ó 
÷ 
ð 	
ð 
úó   ‚6?¸=¹?rX   c             ƒ  óÄ   K  — ddi|	xs i ¥}	| j                  d|› �t        |||||||dœt        j                  «      t	        |	|
||¬«      t
        ¬«      ƒ d{  –—† S 7 Œ­w)rZ   r@   rA   rQ   r[   rE   rF   Nr\   r^   s                r1   r_   zAsyncAssistants.update¸  sŽ   è ø€ ðt '¨ÐQ¸MÒ<OÈRÐQˆØ—Z‘ZØ˜<˜.Ð)Ü à#.Ø (Ø$0Ø (Ø"Ø Ø"ñô (×=Ñ=óô )Ø+¸ÐQ[Ðelôô ð#  ó 
÷ 
ð 	
ð 
ús   ‚AA ÁAÁA r`   c               ó´   — ddi|xs i ¥}| j                  dt        t           t        ||||t	        ||||dœt
        j                  «      ¬«      t        ¬«      S rf   )ri   r   r   r    r   r   rj   rk   s	            r1   rl   zAsyncAssistants.list  sy   € ðV '¨ÐQ¸MÒ<OÈRÐQˆØ×!Ñ!ØÜ ¤Ñ+Ü(Ø+Ø'Ø%ØÜ%à!&Ø"(Ø!&Ø!&ñ	ô *×=Ñ=óôô ð% "ó 
ð 	
r2   c          	   ƒ  ó‚   K  — ddi|xs i ¥}| j                  d|› �t        ||||¬«      t        ¬«      ƒ d{  –—† S 7 Œ­w)rn   r@   rA   rQ   rE   rR   Nro   rU   s         r1   rq   zAsyncAssistants.deleteH  s^   è ø€ ð. '¨ÐQ¸MÒ<OÈRÐQˆØ—\‘\Ø˜<˜.Ð)Ü(Ø+¸ÐQ[Ðelôô %ð "ó 
÷ 
ð 	
ð 
úr�   )r/   r"   rr   rs   rt   r}   r~   )ra   r   rb   r   rc   r€   rd   r�   r:   ry   r;   rz   r<   r{   r=   r|   rr   z5AsyncPaginator[Assistant, AsyncCursorPage[Assistant]]r‚   rƒ   r‰   s   @r1   r$   r$   D  s’  ø… ØÓØ5Ó5õFð 1:Ø)2Ø1:Ø09Ø)2Ø?Hð )-Ø$(Ø"&Ø;DñI
ð ðI
ð .ð	I
ð
 'ðI
ð /ðI
ð .ðI
ð 'ðI
ð =ðI
ð &ðI
ð "ðI
ð  ðI
ð 9ðI
ð  
ó!I
ðb )-Ø$(Ø"&Ø;Dñ
àð
ð &ð
ð "ð
ð  ð
ð 9ð
ð 
ó
ðH 1:Ø)2Ø1:Ø09Ø )Ø)2Ø?Hð )-Ø$(Ø"&Ø;Dñ!M
àðM
ð .ð	M
ð
 'ðM
ð /ðM
ð .ðM
ð ðM
ð 'ðM
ð =ðM
ð &ðM
ð "ðM
ð  ðM
ð  9ð!M
ð" 
ó#M
ðd !*Ø!*Ø )Ø3<ð )-Ø$(Ø"&Ø;Dñ?
ð ð?
ð ð	?
ð
 ð?
ð 1ð?
ð &ð?
ð "ð?
ð  ð?
ð 9ð?
ð 
?ó?
ðN )-Ø$(Ø"&Ø;Dñ
àð
ð &ð
ð "ð
ð  ð
ð 9ð
ð 
÷
r2   c                  ó   — e Zd Zdd„Zy)r'   c                ó<  — t        |j                  «      | _        t        |j                  «      | _        t        |j                  «      | _        t        |j
                  «      | _        t        |j                  «      | _        t        |j                  «      | _        y r*   )r   r&   r   rN   rW   r_   rl   rq   ©r.   Ú
assistantss     r1   r,   z"AssistantsWithRawResponse.__init__j  sƒ   € Ü)¨*×*:Ñ*:Ó;ˆŒ
ä-Ø×Ñó
ˆŒô 0Ø×Ñó
ˆŒô .Ø×Ñó
ˆŒô ,Ø�O‰Oó
ˆŒ	ô .Ø×Ñó
ˆ�r2   N)r–   r#   rr   rs   ©r„   r…   r†   r,   © r2   r1   r'   r'   i  ó   „ ô
r2   r'   c                  ó   — e Zd Zdd„Zy)r‹   c                ó<  — t        |j                  «      | _        t        |j                  «      | _        t        |j                  «      | _        t        |j
                  «      | _        t        |j                  «      | _        t        |j                  «      | _        y r*   )r   r&   r   rN   rW   r_   rl   rq   r•   s     r1   r,   z'AsyncAssistantsWithRawResponse.__init__  sƒ   € Ü.¨z×/?Ñ/?Ó@ˆŒ
ä3Ø×Ñó
ˆŒô 6Ø×Ñó
ˆŒô 4Ø×Ñó
ˆŒô 2Ø�O‰Oó
ˆŒ	ô 4Ø×Ñó
ˆ�r2   N)r–   r$   rr   rs   r—   r˜   r2   r1   r‹   r‹   ~  r™   r2   r‹   )0Ú
__future__r   Útypingr   r   r   Útyping_extensionsr   Úhttpxr&   r	   r
   r   r   Ú_typesr   r   r   r   r   Ú_utilsr   Ú	_resourcer   r   Ú	_responser   r   Ú
paginationr   r   Ú
types.betar   r   r   r   r   Ú_base_clientr   r    Ú_clientr!   r"   Ú__all__r#   r$   r'   r‹   r˜   r2   r1   ú<module>r©      s‚   ðõ #ç 0Ñ 0Ý %ã ç UÓ Uß @Õ @Ý &ß ;ß Pß :÷õ ÷ Báß/àÐ*Ð
+€ôb
�ô b
ôJ	b
Ð&ô b
÷J	
ñ 
÷*
ò 
r2   