
    _i8                    p   S SK Jr  S SKJrJrJr  S SKJr  S SKrSSK	J
r
  SSKJrJrJrJrJrJrJr  SSKJrJr  SS	KJr  SS
KJrJr  SSKJrJr  SSKJr  SSK J!r!  SSK"J#r#  SSK$J%r%  SSK&J'r'  SSK(J)r)  SS/r* " S S\5      r+ " S S\5      r, " S S5      r- " S S5      r. " S S5      r/ " S S5      r0g)    )annotations)UnionIterableOptional)LiteralN   )_legacy_response)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)input_token_count_params)	ToolParam)	Reasoning)ResponseInputItemParam)InputTokenCountResponseInputTokensAsyncInputTokensc                      \ rS rSr\SS j5       r\S	S j5       r\\\\\\\\\\\SSS\S.                               S
S jjr	Sr
g)r      c                    [        U 5      $ z
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
)InputTokensWithRawResponseselfs    c/var/www/html/land-ocr/venv/lib/python3.13/site-packages/openai/resources/responses/input_tokens.pywith_raw_responseInputTokens.with_raw_response   s     *$//    c                    [        U 5      $ 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
) InputTokensWithStreamingResponser%   s    r'   with_streaming_response#InputTokens.with_streaming_response%   s     055r*   Nconversationinputinstructionsmodelparallel_tool_callsprevious_response_id	reasoningtexttool_choicetools
truncationextra_headersextra_query
extra_bodytimeoutc                   U R                  S[        UUUUUUUUU	U
US.[        R                  5      [	        XXS9[
        S9$ )C  
Get input token counts

Args:
  conversation: The conversation that this response belongs to. Items from this conversation are
      prepended to `input_items` for this response request. Input items and output
      items from this response are automatically added to this conversation after this
      response completes.

  input: Text, image, or file inputs to the model, used to generate a response

  instructions: A system (or developer) message inserted into the model's context. When used
      along with `previous_response_id`, the instructions from a previous response
      will not be carried over to the next response. This makes it simple to swap out
      system (or developer) messages in new responses.

  model: Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a
      wide range of models with different capabilities, performance characteristics,
      and price points. Refer to the
      [model guide](https://platform.openai.com/docs/models) to browse and compare
      available models.

  parallel_tool_calls: Whether to allow the model to run tool calls in parallel.

  previous_response_id: The unique ID of the previous response to the model. Use this to create
      multi-turn conversations. Learn more about
      [conversation state](https://platform.openai.com/docs/guides/conversation-state).
      Cannot be used in conjunction with `conversation`.

  reasoning: **gpt-5 and o-series models only** Configuration options for
      [reasoning models](https://platform.openai.com/docs/guides/reasoning).

  text: Configuration options for a text response from the model. Can be plain text or
      structured JSON data. Learn more:

      - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
      - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)

  tool_choice: How the model should select which tool (or tools) to use when generating a
      response. See the `tools` parameter to see how to specify which tools the model
      can call.

  tools: An array of tools the model may call while generating a response. You can
      specify which tool to use by setting the `tool_choice` parameter.

  truncation: The truncation strategy to use for the model response. - `auto`: If the input to
      this Response exceeds the model's context window size, the model will truncate
      the response to fit the context window by dropping items from the beginning of
      the conversation. - `disabled` (default): If the input size will exceed the
      context window size for a model, the request will fail with a 400 error.

  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
/responses/input_tokensr1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   bodyoptionscast_to)_postr   r   InputTokenCountParamsr   r   r&   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   s                   r'   countInputTokens.count.   sl    ` zz% $0"$0"+>,@!* #."", )>>  )+Q[ ,+  
 	
r*    )returnr$   )rO   r-    r1   z6Optional[input_token_count_params.Conversation] | Omitr2   z9Union[str, Iterable[ResponseInputItemParam], None] | Omitr3   Optional[str] | Omitr4   rQ   r5   zOptional[bool] | Omitr6   rQ   r7   zOptional[Reasoning] | Omitr8   z.Optional[input_token_count_params.Text] | Omitr9   z4Optional[input_token_count_params.ToolChoice] | Omitr:   z$Optional[Iterable[ToolParam]] | Omitr;   z"Literal['auto', 'disabled'] | Omitr<   zHeaders | Noner=   zQuery | Noner>   zBody | Noner?   z'float | httpx.Timeout | None | NotGivenrO   r   __name__
__module____qualname____firstlineno__r   r(   r.   r   r   rL   __static_attributes__rN   r*   r'   r   r      s   0 0 6 6 PTKO-1&*595904?CLP6:9= )-$("&;D'f
 Mf
 I	f

 +f
 $f
 3f
 3f
 .f
 =f
 Jf
 4f
 7f
  &!f
" "#f
$  %f
& 9'f
( 
!)f
 f
r*   c                      \ rS rSr\SS j5       r\S	S j5       r\\\\\\\\\\\SSS\S.                               S
S jjr	Sr
g)r      c                    [        U 5      $ r#   )AsyncInputTokensWithRawResponser%   s    r'   r(   "AsyncInputTokens.with_raw_response   s     /t44r*   c                    [        U 5      $ r,   )%AsyncInputTokensWithStreamingResponser%   s    r'   r.   (AsyncInputTokens.with_streaming_response   s     5T::r*   Nr0   c                  #    U R                  S[        UUUUUUUUU	U
US.[        R                  5      I Sh  vN [	        XXS9[
        S9I Sh  vN $  N N7f)rA   rB   rC   NrD   rE   )rI   r   r   rJ   r   r   rK   s                   r'   rL   AsyncInputTokens.count   s     ` ZZ%,$0"$0"+>,@!* #."", )>>   )+Q[ ,+   
 
 	

s!   6AA
AAAArN   )rO   r[   )rO   r^   rP   rR   rN   r*   r'   r   r      s   5 5 ; ; PTKO-1&*595904?CLP6:9= )-$("&;D'f
 Mf
 I	f

 +f
 $f
 3f
 3f
 .f
 =f
 Jf
 4f
 7f
  &!f
" "#f
$  %f
& 9'f
( 
!)f
 f
r*   c                      \ rS rSrSS jrSrg)r$   i  c                Z    Xl         [        R                  " UR                  5      U l        g N)_input_tokensr	   to_raw_response_wrapperrL   r&   input_tokenss     r'   __init__#InputTokensWithRawResponse.__init__  s#    )%==

r*   re   rL   Nrh   r   rO   NonerS   rT   rU   rV   ri   rW   rN   r*   r'   r$   r$         
r*   r$   c                      \ rS rSrSS jrSrg)r[   i  c                Z    Xl         [        R                  " UR                  5      U l        g rd   )re   r	   async_to_raw_response_wrapperrL   rg   s     r'   ri   (AsyncInputTokensWithRawResponse.__init__  s#    )%CC

r*   rk   Nrh   r   rO   rm   rn   rN   r*   r'   r[   r[     ro   r*   r[   c                      \ rS rSrSS jrSrg)r-   i&  c                D    Xl         [        UR                  5      U l        g rd   )re   r   rL   rg   s     r'   ri   )InputTokensWithStreamingResponse.__init__'  s    )1

r*   rk   Nrl   rn   rN   r*   r'   r-   r-   &  ro   r*   r-   c                      \ rS rSrSS jrSrg)r^   i/  c                D    Xl         [        UR                  5      U l        g rd   )re   r   rL   rg   s     r'   ri   .AsyncInputTokensWithStreamingResponse.__init__0  s    )7

r*   rk   Nrt   rn   rN   r*   r'   r^   r^   /  ro   r*   r^   )1
__future__r   typingr   r   r   typing_extensionsr   httpx r	   _typesr
   r   r   r   r   r   r   _utilsr   r   _compatr   	_resourcer   r   	_responser   r   _base_clientr   types.responsesr   types.responses.tool_paramr   types.shared_params.reasoningr   )types.responses.response_input_item_paramr   *types.responses.input_token_count_responser   __all__r   r   r$   r[   r-   r^   rN   r*   r'   <module>r      s    # , , %    K K K < & : Y 0 7 3 6 O Q,
-z
/ z
zz
' z
z
 

 

 

 
r*   