Ë
    ,Œ:jy  ã                  ó  — d dl mZ d dl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 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 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)é    )ÚannotationsN)ÚTYPE_CHECKINGÚUnionÚOptional)ÚLiteralé   )ÚEditÚedit_create_params)Ú	NOT_GIVENÚBodyÚQueryÚHeadersÚNotGiven)Úmaybe_transform)ÚSyncAPIResourceÚAsyncAPIResource)Úto_raw_response_wrapperÚasync_to_raw_response_wrapper)Úmake_request_options)ÚOpenAIÚAsyncOpenAIÚEditsÚ
AsyncEditsc            
      óœ   ‡ — e Zd ZU ded<   dˆ fd„Z ej                  d«      eeeedddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	d„«       Zˆ xZ	S )
r   ÚEditsWithRawResponseÚwith_raw_responsec                óD   •— t         ‰| �  |«       t        | «      | _        y ©N)ÚsuperÚ__init__r   r   ©ÚselfÚclientÚ	__class__s     €úX/var/www/html/tokenscope/api/venv/lib/python3.12/site-packages/openai/resources/edits.pyr    zEdits.__init__   s   ø€ Ü‰Ñ˜Ô Ü!5°dÓ!;ˆÕó    ú—The Edits API is deprecated; please use Chat Completions instead.

https://openai.com/blog/gpt-4-api-general-availability#deprecation-of-the-edits-api
N©ÚinputÚnÚtemperatureÚtop_pÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutc       
        óŒ   — | j                  dt        ||||||dœt        j                  «      t	        |||	|
¬«      t
        ¬«      S )áš  
        Creates a new edit for the provided input, instruction, and parameters.

        Args:
          instruction: The instruction that tells the model how to edit the prompt.

          model: ID of the model to use. You can use the `text-davinci-edit-001` or
              `code-davinci-edit-001` model with this endpoint.

          input: The input text to use as a starting point for the edit.

          n: How many edits to generate for the input and instruction.

          temperature: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
              make the output more random, while lower values like 0.2 will make it more
              focused and deterministic.

              We generally recommend altering this or `top_p` but not both.

          top_p: An alternative to sampling with temperature, called nucleus sampling, where the
              model considers the results of the tokens with top_p probability mass. So 0.1
              means only the tokens comprising the top 10% probability mass are considered.

              We generally recommend altering this or `temperature` but not both.

          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
        ú/edits©ÚinstructionÚmodelr)   r*   r+   r,   ©r-   r.   r/   r0   ©ÚbodyÚoptionsÚcast_to©Ú_postr   r
   ÚEditCreateParamsr   r	   ©r"   r5   r6   r)   r*   r+   r,   r-   r.   r/   r0   s              r%   ÚcreatezEdits.create   sb   € ðh �z‰zØÜ à#.Ø"Ø"ØØ#.Ø"ñô #×3Ñ3ó
ô )Ø+¸ÐQ[Ðelôô ð! ó 
ð 	
r&   )r#   r   ÚreturnÚNone©r5   Ústrr6   zEUnion[str, Literal['text-davinci-edit-001', 'code-davinci-edit-001']]r)   zOptional[str] | NotGivenr*   zOptional[int] | NotGivenr+   úOptional[float] | NotGivenr,   rE   r-   zHeaders | Noner.   zQuery | Noner/   zBody | Noner0   z'float | httpx.Timeout | None | NotGivenrA   r	   ©
Ú__name__Ú
__module__Ú__qualname__Ú__annotations__r    Útyping_extensionsÚ
deprecatedr   r@   Ú__classcell__©r$   s   @r%   r   r      sÎ   ø… Ø+Ó+õ<ð "Ð×!Ñ!ð 	eóð +4Ø&/Ø2;Ø,5ð )-Ø$(Ø"&Ø;DñB
ð ðB
ð Uð	B
ð
 (ðB
ð $ðB
ð 0ðB
ð *ðB
ð &ðB
ð "ðB
ð  ðB
ð 9ðB
ð 
òB
óôB
r&   c            
      óœ   ‡ — e Zd ZU ded<   dˆ fd„Z ej                  d«      eeeedddedœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	d„«       Zˆ xZ	S )
r   ÚAsyncEditsWithRawResponser   c                óD   •— t         ‰| �  |«       t        | «      | _        y r   )r   r    rP   r   r!   s     €r%   r    zAsyncEdits.__init__j   s   ø€ Ü‰Ñ˜Ô Ü!:¸4Ó!@ˆÕr&   r'   Nr(   c       
      ƒ  ó¨   K  — | j                  dt        ||||||dœt        j                  «      t	        |||	|
¬«      t
        ¬«      ƒ d{  –—† S 7 Œ­w)r2   r3   r4   r7   r8   Nr<   r?   s              r%   r@   zAsyncEdits.createn   sp   è ø€ ðh —Z‘ZØÜ à#.Ø"Ø"ØØ#.Ø"ñô #×3Ñ3ó
ô )Ø+¸ÐQ[Ðelôô ð!  ó 
÷ 
ð 	
ð 
ús   ‚A	AÁAÁA)r#   r   rA   rB   rC   rF   rN   s   @r%   r   r   g   sÏ   ø… Ø0Ó0õAð "Ð×!Ñ!ð 	eóð +4Ø&/Ø2;Ø,5ð )-Ø$(Ø"&Ø;DñB
ð ðB
ð Uð	B
ð
 (ðB
ð $ðB
ð 0ðB
ð *ðB
ð &ðB
ð "ðB
ð  ðB
ð 9ðB
ð 
òB
óôB
r&   c                  ó   — e Zd Zdd„Zy)r   c                ó8   — t        |j                  «      | _        y r   )r   r@   ©r"   Úeditss     r%   r    zEditsWithRawResponse.__init__·   s   € Ü-Ø�L‰Ló
ˆ�r&   N)rV   r   rA   rB   ©rG   rH   rI   r    © r&   r%   r   r   ¶   ó   „ ô
r&   r   c                  ó   — e Zd Zdd„Zy)rP   c                ó8   — t        |j                  «      | _        y r   )r   r@   rU   s     r%   r    z"AsyncEditsWithRawResponse.__init__¾   s   € Ü3Ø�L‰Ló
ˆ�r&   N)rV   r   rA   rB   rW   rX   r&   r%   rP   rP   ½   rY   r&   rP   )$Ú
__future__r   rK   Útypingr   r   r   r   ÚhttpxÚtypesr	   r
   Ú_typesr   r   r   r   r   Ú_utilsr   Ú	_resourcer   r   Ú	_responser   r   Ú_base_clientr   Ú_clientr   r   Ú__all__r   r   r   rP   rX   r&   r%   ú<module>rg      sq   ðõ #ã ß 1Ñ 1Ý %ã ç ,ß >Õ >Ý $ß 9ß NÝ /áß-à�LÐ
!€ôL
ˆOô L
ô^L
Ð!ô L
÷^
ñ 
÷
ò 
r&   