o
    ¨Ýjã)  ã                   @  s  d dl mZ d dlmZ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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 ddl m!Z! ddgZ"G dd„ deƒZ#G dd„ deƒZ$G dd„ dƒZ%G dd„ dƒZ&G dd„ dƒZ'G dd„ dƒZ(dS )é    )Úannotations)ÚUnionÚIterableÚOptionalNé   )Ú_legacy_response)Údecision_create_params)ÚBodyÚOmitÚQueryÚHeadersÚNotGivenÚomitÚ	not_given)Úmaybe_transformÚasync_maybe_transform)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)Úmake_request_options)ÚDecisionÚ	DecisionsÚAsyncDecisionsc                   @  óD   e Zd Zed dd„ƒZed!dd„ƒZeeeddded	œd"dd„ZdS )#r   ÚreturnÚDecisionsWithRawResponsec                 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
        )r   ©Úself© r"   úU/var/www/html/chatgpt/venv/lib/python3.10/site-packages/openai/resources/decisions.pyÚwith_raw_response   ó   zDecisions.with_raw_responseÚDecisionsWithStreamingResponsec                 C  r   ©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
        )r&   r    r"   r"   r#   Úwith_streaming_response!   ó   z!Decisions.with_streaming_responseN©Úprompt_cache_keyÚprompt_cache_optionsÚsafety_identifierÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutÚinputú>Union[str, Iterable[decision_create_params.InputUnionMember1]]ÚmodelÚstrÚ	questionsú)Iterable[decision_create_params.Question]r+   úOptional[str] | Omitr,   ú:Optional[decision_create_params.PromptCacheOptions] | Omitr-   r.   úHeaders | Noner/   úQuery | Noner0   úBody | Noner1   ú(float | httpx2.Timeout | None | NotGivenr   c       
      
   C  s:   | j dt||||||dœtjƒt|||	|
ddid�td�S )õÝ  
        Use this endpoint to quickly answer classification or scoring questions about
        some input. You can ask multiple questions in one request.

        Args:
          input: The input to evaluate for every question. Provide a text string or an ordered
              array of messages, function calls and outputs, or custom tool calls and outputs.
              Each tool output must identify a matching call by call ID.

          model: The model to use. Only `gpt-6-luna` is supported.

          questions: Ask 1â€“400 questions about the input. Each question can be a predicate, choice,
              or score. Answers come back in the same order.

          prompt_cache_key: Partition prompt cache reuse by caller-provided key.

          prompt_cache_options: Options for prompt caching. Supported for `gpt-5.6` and later models. By
              default, OpenAI automatically chooses one implicit cache breakpoint. You can add
              explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
              request can write up to four breakpoints. For cache matching, OpenAI considers
              up to the latest 80 breakpoints in the conversation, without a content-block
              lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
              `ttl` defaults to `30m`, which is currently the only supported value. See the
              [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
              for current details.

          safety_identifier: Opaque caller-provided end-user identifier, scoped by the verified org. Match
              Responses' limit; this is never the authenticated user identity.

          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
        ú
/decisions©r4   r2   r6   r+   r,   r-   Úbearer_authT©r.   r/   r0   r1   Úsecurity©ÚbodyÚoptionsZcast_to)Ú_postr   r   ÚDecisionCreateParamsr   r   ©r!   r2   r4   r6   r+   r,   r-   r.   r/   r0   r1   r"   r"   r#   Úcreate*   s*   5ú÷ûìzDecisions.create)r   r   )r   r&   ©r2   r3   r4   r5   r6   r7   r+   r8   r,   r9   r-   r8   r.   r:   r/   r;   r0   r<   r1   r=   r   r   ©	Ú__name__Ú
__module__Ú__qualname__r   r$   r(   r   r   rJ   r"   r"   r"   r#   r      ó    	òc                   @  r   )#r   r   ÚAsyncDecisionsWithRawResponsec                 C  r   r   )rQ   r    r"   r"   r#   r$   x   r%   z AsyncDecisions.with_raw_responseÚ#AsyncDecisionsWithStreamingResponsec                 C  r   r'   )rR   r    r"   r"   r#   r(   ‚   r)   z&AsyncDecisions.with_streaming_responseNr*   r2   r3   r4   r5   r6   r7   r+   r8   r,   r9   r-   r.   r:   r/   r;   r0   r<   r1   r=   r   c       
      
   Ã  sH   �| j dt||||||dœtjƒI dH t|||	|
ddid�td�I dH S )r>   r?   r@   NrA   TrB   rD   )rG   r   r   rH   r   r   rI   r"   r"   r#   rJ   ‹   s,   €5ú÷ûìzAsyncDecisions.create)r   rQ   )r   rR   rK   rL   r"   r"   r"   r#   r   w   rP   c                   @  ó   e Zd Zddd„ZdS )	r   Ú	decisionsr   r   ÚNonec                 C  ó   || _ t |j¡| _d S ©N)Ú
_decisionsr   Zto_raw_response_wrapperrJ   ©r!   rT   r"   r"   r#   Ú__init__Ù   ó   
ÿz!DecisionsWithRawResponse.__init__N©rT   r   r   rU   ©rM   rN   rO   rZ   r"   r"   r"   r#   r   Ø   ó    r   c                   @  rS   )	rQ   rT   r   r   rU   c                 C  rV   rW   )rX   r   Zasync_to_raw_response_wrapperrJ   rY   r"   r"   r#   rZ   â   r[   z&AsyncDecisionsWithRawResponse.__init__N©rT   r   r   rU   r]   r"   r"   r"   r#   rQ   á   r^   rQ   c                   @  rS   )	r&   rT   r   r   rU   c                 C  ó   || _ t|jƒ| _d S rW   )rX   r   rJ   rY   r"   r"   r#   rZ   ë   ó   
ÿz'DecisionsWithStreamingResponse.__init__Nr\   r]   r"   r"   r"   r#   r&   ê   r^   r&   c                   @  rS   )	rR   rT   r   r   rU   c                 C  r`   rW   )rX   r   rJ   rY   r"   r"   r#   rZ   ô   ra   z,AsyncDecisionsWithStreamingResponse.__init__Nr_   r]   r"   r"   r"   r#   rR   ó   r^   rR   ))Ú
__future__r   Útypingr   r   r   Zhttpx2Ú r   Útypesr   Ú_typesr	   r
   r   r   r   r   r   Z_utilsr   r   Z_compatr   Z	_resourcer   r   Ú	_responser   r   Z_base_clientr   Ztypes.decisionr   Ú__all__r   r   r   rQ   r&   rR   r"   r"   r"   r#   Ú<module>   s&   $aa			