Ë
    îO´jE  ã                  ót  — d dl mZ d dlZ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mZmZ ddl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" ddl#m$Z$m%Z% ddl&m'Z' ddl(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«      Z0y)é    )ÚannotationsN)ÚList)ÚLiteralé   )Ú_legacy_response)ÚBodyÚOmitÚQueryÚHeadersÚNotGivenÚomitÚ	not_given)Úpath_templateÚmaybe_transformÚasync_maybe_transform)Úcached_property)ÚSyncAPIResourceÚAsyncAPIResource)Úto_streamed_response_wrapperÚ"async_to_streamed_response_wrapper)ÚSyncCursorPageÚAsyncCursorPage)ÚAsyncPaginatorÚmake_request_options)Ústep_list_paramsÚstep_retrieve_params)ÚRunStep)ÚRunStepIncludeÚStepsÚ
AsyncStepsc                  ó  — e Zd ZdZed
d„«       Zedd„«       Z ej                  d«      e	ddde
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Z ej                  d«      e	e	e	e	e	ddde
dœ		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd	„«       Zy)r   ú4Build Assistants that can call models and use tools.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
        )ÚStepsWithRawResponse©Úselfs    ú/var/www/origus_pro_usr/data/www/origus.pro/core/.venv/lib/python3.12/site-packages/openai/resources/beta/threads/runs/steps.pyÚwith_raw_responsezSteps.with_raw_response   s   € ô $ DÓ)Ð)ó    c                ó   — t        | «      S ©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
        )ÚStepsWithStreamingResponser&   s    r(   Úwith_streaming_responsezSteps.with_streaming_response'   s   € ô *¨$Ó/Ð/r*   ú>The Assistants API is deprecated in favor of the Responses APIN©ÚincludeÚextra_headersÚextra_queryÚ
extra_bodyÚtimeoutc               ó  — |st        d|›�«      ‚|st        d|›�«      ‚|st        d|›�«      ‚ddi|xs i ¥}| j                  t        d|||¬«      t        ||||t	        d|it
        j                  «      d	d
i¬«      t        ¬«      S )áÿ  
        Retrieves a run step.

        Args:
          include: A list of additional fields to include in the response. Currently the only
              supported value is `step_details.tool_calls[*].file_search.results[*].content`
              to fetch the file search result content.

              See the
              [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization)
              for more information.

          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
        ú8Expected a non-empty value for `thread_id` but received ú5Expected a non-empty value for `run_id` but received ú6Expected a non-empty value for `step_id` but received úOpenAI-Betaúassistants=v2ú2/threads/{thread_id}/runs/{run_id}/steps/{step_id}©Ú	thread_idÚrun_idÚstep_idr1   Úbearer_authT©r2   r3   r4   r5   ÚqueryÚsecurity©ÚoptionsÚcast_to)Ú
ValueErrorÚ_getr   r   r   r   ÚStepRetrieveParamsr   ©	r'   rA   r?   r@   r1   r2   r3   r4   r5   s	            r(   ÚretrievezSteps.retrieve0   sÄ   € ñF ÜÐWÐXaÐWdÐeÓfÐfÙÜÐTÐU[ÐT^Ð_Ó`Ð`ÙÜÐUÐV]ÐU`ÐaÓbÐbØ&¨ÐQ¸MÒ<OÈRÐQˆØ�y‰yÜØDØ#ØØô	ô )Ø+Ø'Ø%ØÜ% y°'Ð&:Ô<P×<cÑ<cÓdØ'¨Ð.ôô ð ó 
ð 	
r*   ©	ÚafterÚbeforer1   ÚlimitÚorderr2   r3   r4   r5   c       
        ó  — |st        d|›�«      ‚|st        d|›�«      ‚ddi|xs i ¥}| j                  t        d||¬«      t        t           t        ||	|
|t        |||||dœt        j                  «      dd	i¬
«      t        ¬«      S ©aÙ  
        Returns a list of run steps belonging to a run.

        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,
              starting with obj_foo, your subsequent call can include before=obj_foo in order
              to fetch the previous page of the list.

          include: A list of additional fields to include in the response. Currently the only
              supported value is `step_details.tool_calls[*].file_search.results[*].content`
              to fetch the file search result content.

              See the
              [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization)
              for more information.

          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<   z(/threads/{thread_id}/runs/{run_id}/steps)r?   r@   )rO   rP   r1   rQ   rR   rB   TrC   )ÚpagerG   Úmodel)	rI   Ú_get_api_listr   r   r   r   r   r   ÚStepListParams©r'   r@   r?   rO   rP   r1   rQ   rR   r2   r3   r4   r5   s               r(   Úlistz
Steps.listl   sÂ   € ñl ÜÐWÐXaÐWdÐeÓfÐfÙÜÐTÐU[ÐT^Ð_Ó`Ð`Ø&¨ÐQ¸MÒ<OÈRÐQˆØ×!Ñ!ÜÐDÐPYÐbhÔiÜ¤Ñ(Ü(Ø+Ø'Ø%ØÜ%à!&Ø"(Ø#*Ø!&Ø!&ñô %×3Ñ3ó	ð (¨Ð.ôô" ð) "ó 
ð 	
r*   )Úreturnr%   )r[   r-   ©rA   Ústrr?   r]   r@   r]   r1   úList[RunStepInclude] | Omitr2   úHeaders | Noner3   úQuery | Noner4   úBody | Noner5   ú(float | httpx2.Timeout | None | NotGivenr[   r   )r@   r]   r?   r]   rO   ú
str | OmitrP   rc   r1   r^   rQ   ú
int | OmitrR   úLiteral['asc', 'desc'] | Omitr2   r_   r3   r`   r4   ra   r5   rb   r[   zSyncCursorPage[RunStep]©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r)   r.   Útyping_extensionsÚ
deprecatedr   r   rM   rZ   © r*   r(   r   r      s‚  „ Ù>àò*ó ð*ð ò0ó ð0ð "Ð×!Ñ!Ð"bÓcð 04ð )-Ø$(Ø"&Ø<Eñ9
àð9
ð ð	9
ð
 ð9
ð -ð9
ð &ð9
ð "ð9
ð  ð9
ð :ð9
ð 
ò9
ó dð9
ðv "Ð×!Ñ!Ð"bÓcð !Ø!Ø/3Ø Ø/3ð )-Ø$(Ø"&Ø<EñO
àðO
ð ð	O
ð
 ðO
ð ðO
ð -ðO
ð ðO
ð -ðO
ð &ðO
ð "ðO
ð  ðO
ð :ðO
ð  
!ò!O
ó dñO
r*   c                  ó  — e Zd ZdZed
d„«       Zedd„«       Z ej                  d«      e	ddde
dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„«       Z ej                  d«      e	e	e	e	e	ddde
dœ		 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd	„«       Zy)r    r"   c                ó   — t        | «      S r$   )ÚAsyncStepsWithRawResponser&   s    r(   r)   zAsyncSteps.with_raw_responseÂ   s   € ô )¨Ó.Ð.r*   c                ó   — t        | «      S r,   )ÚAsyncStepsWithStreamingResponser&   s    r(   r.   z"AsyncSteps.with_streaming_responseÌ   s   € ô /¨tÓ4Ð4r*   r/   Nr0   c             ƒ  óF  K  — |st        d|›�«      ‚|st        d|›�«      ‚|st        d|›�«      ‚ddi|xs i ¥}| j                  t        d|||¬«      t        ||||t	        d|it
        j                  «      ƒ d	{  –—† d
di¬«      t        ¬«      ƒ d	{  –—† S 7 Œ7 Œ­w)r7   r8   r9   r:   r;   r<   r=   r>   r1   NrB   TrC   rF   )rI   rJ   r   r   r   r   rK   r   rL   s	            r(   rM   zAsyncSteps.retrieveÕ   sÜ   è ø€ ñF ÜÐWÐXaÐWdÐeÓfÐfÙÜÐTÐU[ÐT^Ð_Ó`Ð`ÙÜÐUÐV]ÐU`ÐaÓbÐbØ&¨ÐQ¸MÒ<OÈRÐQˆØ—Y‘YÜØDØ#ØØô	ô )Ø+Ø'Ø%ØÜ1°9¸gÐ2FÔH\×HoÑHoÓp×pØ'¨Ð.ôô ð ó 
÷ 
ð 	
ð qøð
ús$   ‚A<B!Á>BÁ?B!ÂBÂB!ÂB!rN   c       
        ó  — |st        d|›�«      ‚|st        d|›�«      ‚ddi|xs i ¥}| j                  t        d||¬«      t        t           t        ||	|
|t        |||||dœt        j                  «      dd	i¬
«      t        ¬«      S rT   )	rI   rW   r   r   r   r   r   r   rX   rY   s               r(   rZ   zAsyncSteps.list  sÂ   € ñl ÜÐWÐXaÐWdÐeÓfÐfÙÜÐTÐU[ÐT^Ð_Ó`Ð`Ø&¨ÐQ¸MÒ<OÈRÐQˆØ×!Ñ!ÜÐDÐPYÐbhÔiÜ ¤Ñ)Ü(Ø+Ø'Ø%ØÜ%à!&Ø"(Ø#*Ø!&Ø!&ñô %×3Ñ3ó	ð (¨Ð.ôô" ð) "ó 
ð 	
r*   )r[   rp   )r[   rr   r\   )r@   r]   r?   r]   rO   rc   rP   rc   r1   r^   rQ   rd   rR   re   r2   r_   r3   r`   r4   ra   r5   rb   r[   z1AsyncPaginator[RunStep, AsyncCursorPage[RunStep]]rf   rm   r*   r(   r    r    ¿   s‚  „ Ù>àò/ó ð/ð ò5ó ð5ð "Ð×!Ñ!Ð"bÓcð 04ð )-Ø$(Ø"&Ø<Eñ9
àð9
ð ð	9
ð
 ð9
ð -ð9
ð &ð9
ð "ð9
ð  ð9
ð :ð9
ð 
ò9
ó dð9
ðv "Ð×!Ñ!Ð"bÓcð !Ø!Ø/3Ø Ø/3ð )-Ø$(Ø"&Ø<EñO
àðO
ð ð	O
ð
 ðO
ð ðO
ð -ðO
ð ðO
ð -ðO
ð &ðO
ð "ðO
ð  ðO
ð :ðO
ð  
;ò!O
ó dñO
r*   c                  ó   — e Zd Zdd„Zy)r%   c                ó¢   — || _         t        j                  |j                  «      | _        t        j                  |j                  «      | _        y ©N)Ú_stepsr   Úto_raw_response_wrapperrM   rZ   ©r'   Ústepss     r(   Ú__init__zStepsWithRawResponse.__init__e  sE   € ØˆŒô ×4Ñ4Ø—‘óð 	Œô ×4Ñ4Ø—
‘
óð 	�	r*   N©r{   r   r[   ÚNone©rg   rh   ri   r|   rm   r*   r(   r%   r%   d  ó   „ ô
r*   r%   c                  ó   — e Zd Zdd„Zy)rp   c                ó¢   — || _         t        j                  |j                  «      | _        t        j                  |j                  «      | _        y rw   )rx   r   Úasync_to_raw_response_wrapperrM   rZ   rz   s     r(   r|   z"AsyncStepsWithRawResponse.__init__u  sE   € ØˆŒô ×:Ñ:Ø—‘óð 	Œô ×:Ñ:Ø—
‘
óð 	�	r*   N©r{   r    r[   r~   r   rm   r*   r(   rp   rp   t  r€   r*   rp   c                  ó   — e Zd Zdd„Zy)r-   c                óz   — || _         t        |j                  «      | _        t        |j                  «      | _        y rw   )rx   r   rM   rZ   rz   s     r(   r|   z#StepsWithStreamingResponse.__init__…  s9   € ØˆŒô )Ø—‘óð 	Œô )Ø—
‘
óð 	�	r*   Nr}   r   rm   r*   r(   r-   r-   „  r€   r*   r-   c                  ó   — e Zd Zdd„Zy)rr   c                óz   — || _         t        |j                  «      | _        t        |j                  «      | _        y rw   )rx   r   rM   rZ   rz   s     r(   r|   z(AsyncStepsWithStreamingResponse.__init__•  s9   € ØˆŒô /Ø—‘óð 	Œô /Ø—
‘
óð 	�	r*   Nr„   r   rm   r*   r(   rr   rr   ”  r€   r*   rr   )1Ú
__future__r   rk   Útypingr   r   Úhttpx2Ú r   Ú_typesr   r	   r
   r   r   r   r   Ú_utilsr   r   r   Ú_compatr   Ú	_resourcer   r   Ú	_responser   r   Ú
paginationr   r   Ú_base_clientr   r   Útypes.beta.threads.runsr   r   Ú types.beta.threads.runs.run_stepr   Ú(types.beta.threads.runs.run_step_includer   Ú__all__r   r    r%   rp   r-   rr   rm   r*   r(   ú<module>r˜      s‘   ðõ #ã Ý Ý %ã å "ß M× MÑ Mß MÑ MÝ (ß <ß [ß ;ß Bß OÝ 9Ý Hà�LÐ
!€ôb
ˆOô b
ôJb
Ð!ô b
÷J
ñ 
÷ 
ñ 
÷ 
ñ 
÷ 
ò 
r*   