o
    j
                    @  s  d dl mZ d dlmZmZm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 dd
l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/m0Z0m1Z1 ddl2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8 ddl9m:Z:m;Z;m<Z<m=Z=m>Z> ddgZ?G dd de!Z@G dd de"ZAG dd dZBG dd dZCG dd dZDG dd  d ZEdS )!    )annotations)IterableOptionaloverload)partial)LiteralN   )_legacy_response   )Steps
AsyncStepsStepsWithRawResponseAsyncStepsWithRawResponseStepsWithStreamingResponseAsyncStepsWithStreamingResponse)	NOT_GIVENBodyQueryHeadersNotGiven)required_argsmaybe_transformasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)StreamAsyncStream)SyncCursorPageAsyncCursorPage)AssistantToolParamAssistantStreamEvent)AsyncPaginatormake_request_options)AssistantEventHandlerAssistantEventHandlerTAssistantStreamManagerAsyncAssistantEventHandlerAsyncAssistantEventHandlerTAsyncAssistantStreamManager)Runrun_list_paramsrun_create_paramsrun_update_paramsrun_submit_tool_outputs_paramsRuns	AsyncRunsc                   @  h  e Zd Zed[ddZed\ddZed]d	d
Zeeeeeeeddded
d^d#d$Z	eeeeeeddded%	d_d(d$Z	eeeeeeddded%	d`d+d$Z	e
dgddgeeeeeeddded
dad-d$Z	ddded.dbd0d1Zeddded2dcd3d4Zeeeeddded5ddd>d?Zddded.dbd@dAZeeeeeeddded%	dedCdDZeeeeeeddded%	dfdHdDZeeeeeddddedI
dgdLdDZeedddedMdhdPdQZeddded.didRdQZeddded.djdSdQZe
ddNgg dTedddedMdkdUdQZeddded.dldVdWZeddded.dmdXdWZddddedYdndZdWZdS )or1   returnr   c                 C  
   t | jS N)r   _clientself r:   m/var/www/html/fyndo/pharma/fyndo/venv/lib/python3.10/site-packages/openai/resources/beta/threads/runs/runs.pysteps8      
z
Runs.stepsRunsWithRawResponsec                 C     t | S r6   )r>   r8   r:   r:   r;   with_raw_response<      zRuns.with_raw_responseRunsWithStreamingResponsec                 C  r?   r6   )rB   r8   r:   r:   r;   with_streaming_response@   rA   zRuns.with_streaming_responseN
additional_instructionsinstructionsmetadatamodelstreamtoolsextra_headersextra_query
extra_bodytimeout	thread_idstrassistant_idrE   Optional[str] | NotGivenrF   rG   Optional[object] | NotGivenrH   rI   #Optional[Literal[False]] | NotGivenrJ   1Optional[Iterable[AssistantToolParam]] | NotGivenrK   Headers | NonerL   Query | NonerM   Body | NonerN   'float | httpx.Timeout | None | NotGivenr,   c                C     dS a  
        Create a run.

        Args:
          assistant_id: The ID of the
              [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to
              execute this run.

          additional_instructions: Appends additional instructions at the end of the instructions for the run. This
              is useful for modifying the behavior on a per-run basis without overriding other
              instructions.

          instructions: Overrides the
              [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant)
              of the assistant. This is useful for modifying the behavior on a per-run basis.

          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: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to
              be used to execute this run. If a value is provided here, it will override the
              model associated with the assistant. If not, the model associated with the
              assistant will be used.

          stream: If `true`, returns a stream of events that happen during the Run as server-sent
              events, terminating when the Run enters a terminal state with a `data: [DONE]`
              message.

          tools: Override the tools the assistant can use for this run. This is useful for
              modifying the behavior on a per-run basis.

          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
        Nr:   r9   rO   rQ   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   r:   r:   r;   createD      <zRuns.create	rE   rF   rG   rH   rJ   rK   rL   rM   rN   Literal[True]Stream[AssistantStreamEvent]c                C  rZ   a  
        Create a run.

        Args:
          assistant_id: The ID of the
              [assistant](https://platform.openai.com/docs/api-reference/assistants) to use to
              execute this run.

          stream: If `true`, returns a stream of events that happen during the Run as server-sent
              events, terminating when the Run enters a terminal state with a `data: [DONE]`
              message.

          additional_instructions: Appends additional instructions at the end of the instructions for the run. This
              is useful for modifying the behavior on a per-run basis without overriding other
              instructions.

          instructions: Overrides the
              [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant)
              of the assistant. This is useful for modifying the behavior on a per-run basis.

          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: The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to
              be used to execute this run. If a value is provided here, it will override the
              model associated with the assistant. If not, the model associated with the
              assistant will be used.

          tools: Override the tools the assistant can use for this run. This is useful for
              modifying the behavior on a per-run basis.

          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
        Nr:   r9   rO   rQ   rI   rE   rF   rG   rH   rJ   rK   rL   rM   rN   r:   r:   r;   r]      r^   bool"Run | Stream[AssistantStreamEvent]c                C  rZ   rb   r:   rc   r:   r:   r;   r]      r^   3Optional[Literal[False]] | Literal[True] | NotGivenc                C  sl   |s	t d|ddi|	pi }	| jd| dt|||||||dtjt|	|
||dt|p0dtt d	S 
N8Expected a non-empty value for `thread_id` but received OpenAI-Betaassistants=v1	/threads//runsrQ   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   Fbodyoptionscast_torI   
stream_cls)	
ValueError_postr   r.   RunCreateParamsr%   r,   r   r#   r\   r:   r:   r;   r]      s.   
	rn   run_idc                C  s\   |s	t d||st d|ddi|pi }| jd| d| t||||dtdS )	D  
        Retrieves a run.

        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
        rh   5Expected a non-empty value for `run_id` but received ri   rj   rk   /runs/rn   rq   rr   rt   _getr%   r,   r9   rw   rO   rK   rL   rM   rN   r:   r:   r;   retrieve*  s   zRuns.retrieverG   rK   rL   rM   rN   c             	   C  sj   |s	t d||st d|ddi|pi }| jd| d| td|itjt||||dtd	S )
}  
        Modifies a run.

        Args:
          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.

          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
        rh   ry   ri   rj   rk   rz   rG   rn   rp   rq   rr   )rt   ru   r   r/   RunUpdateParamsr%   r,   r9   rw   rO   rG   rK   rL   rM   rN   r:   r:   r;   updateO  s   zRuns.updateafterbeforelimitorderrK   rL   rM   rN   r   str | NotGivenr   r   int | NotGivenr   !Literal['asc', 'desc'] | NotGivenSyncCursorPage[Run]c          
      C  `   |s	t d|ddi|pi }| jd| dtt t||||	t||||dtjdtdS 	a  
        Returns a list of runs belonging to a thread.

        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
        rh   ri   rj   rk   rl   )r   r   r   r   )rK   rL   rM   rN   query)pagerq   rH   )rt   _get_api_listr    r,   r%   r   r-   RunListParams
r9   rO   r   r   r   r   rK   rL   rM   rN   r:   r:   r;   list{  ,   +
z	Runs.listc                C  s^   |s	t d||st d|ddi|pi }| jd| d| dt||||dtd	S )
X  
        Cancels a run that is `in_progress`.

        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
        rh   ry   ri   rj   rk   rz   /cancelrn   r{   rt   ru   r%   r,   r~   r:   r:   r;   cancel  s   zRuns.cancel-AssistantStreamManager[AssistantEventHandler]c                C  rZ   Create a Run streamNr:   r9   rQ   rE   rF   rG   rH   rJ   rO   rK   rL   rM   rN   r:   r:   r;   create_and_stream     zRuns.create_and_streamevent_handlerr'   .AssistantStreamManager[AssistantEventHandlerT]c                C  rZ   r   r:   r9   rQ   rE   rF   rG   rH   rJ   rO   r   rK   rL   rM   rN   r:   r:   r;   r        
rE   rF   rG   rH   rJ   r   rK   rL   rM   rN   AssistantEventHandlerT | None^AssistantStreamManager[AssistantEventHandler] | AssistantStreamManager[AssistantEventHandlerT]c                C  s   |s	t d|dd|rdndd|	pi }	t| jd| dt|||||d	|d
tjt|	|
||dtd	tt	 d}t
||pAt dS r   rh   rj   zthreads.runs.create_and_streamtruefalseri   zX-Stainless-Stream-Helperz X-Stainless-Custom-Event-Handlerrk   rl   Trm   rn   ro   r   )rt   r   ru   r   r.   rv   r%   r,   r   r#   r(   r&   )r9   rQ   rE   rF   rG   rH   rJ   rO   r   rK   rL   rM   rN   make_requestr:   r:   r;   r     s<   

	rI   rK   rL   rM   rN   tool_outputs3Iterable[run_submit_tool_outputs_params.ToolOutput]c          	      C  rZ   am  
        When a run has the `status: "requires_action"` and `required_action.type` is
        `submit_tool_outputs`, this endpoint can be used to submit the outputs from the
        tool calls once they're all completed. All outputs must be submitted in a single
        request.

        Args:
          tool_outputs: A list of tools for which the outputs are being submitted.

          stream: If `true`, returns a stream of events that happen during the Run as server-sent
              events, terminating when the Run enters a terminal state with a `data: [DONE]`
              message.

          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
        Nr:   	r9   rw   rO   r   rI   rK   rL   rM   rN   r:   r:   r;   submit_tool_outputsB     $zRuns.submit_tool_outputsc          	      C  rZ   am  
        When a run has the `status: "requires_action"` and `required_action.type` is
        `submit_tool_outputs`, this endpoint can be used to submit the outputs from the
        tool calls once they're all completed. All outputs must be submitted in a single
        request.

        Args:
          stream: If `true`, returns a stream of events that happen during the Run as server-sent
              events, terminating when the Run enters a terminal state with a `data: [DONE]`
              message.

          tool_outputs: A list of tools for which the outputs are being submitted.

          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
        Nr:   	r9   rw   rO   rI   r   rK   rL   rM   rN   r:   r:   r;   r   h  r   c          	      C  rZ   r   r:   r   r:   r:   r;   r     r   rO   rI   r   c          	   	   C  sz   |s	t d||st d|ddi|pi }| jd| d| dt||dtjt||||d	t|p7d
tt dS Nrh   ry   ri   rj   rk   rz   /submit_tool_outputsr   rI   rn   Fro   )	rt   ru   r   r0   RunSubmitToolOutputsParamsr%   r,   r   r#   r   r:   r:   r;   r     s(   c                C  rZ   m
        Submit the tool outputs from a previous run and stream the run to a terminal
        state.
        Nr:   r9   r   rw   rO   rK   rL   rM   rN   r:   r:   r;   submit_tool_outputs_stream     zRuns.submit_tool_outputs_streamc          	      C  rZ   r   r:   	r9   r   rw   rO   r   rK   rL   rM   rN   r:   r:   r;   r     r   r   rK   rL   rM   rN   c          
   
   C  s   |s	t d||st d|dd|rdndd|pi }t| jd| d	| d
t|ddtjt||||dtdtt	 d}	t
|	|pHt dS r   ry   rh   rj   z'threads.runs.submit_tool_outputs_streamr   r   r   rk   rz   r   Tr   rn   ro   r   )rt   r   ru   r   r0   r   r%   r,   r   r#   r(   r&   
r9   r   rw   rO   r   rK   rL   rM   rN   requestr:   r:   r;   r     s6   
)r4   r   )r4   r>   )r4   rB   rO   rP   rQ   rP   rE   rR   rF   rR   rG   rS   rH   rR   rI   rT   rJ   rU   rK   rV   rL   rW   rM   rX   rN   rY   r4   r,   )rO   rP   rQ   rP   rI   r`   rE   rR   rF   rR   rG   rS   rH   rR   rJ   rU   rK   rV   rL   rW   rM   rX   rN   rY   r4   ra   )rO   rP   rQ   rP   rI   rd   rE   rR   rF   rR   rG   rS   rH   rR   rJ   rU   rK   rV   rL   rW   rM   rX   rN   rY   r4   re   )rO   rP   rQ   rP   rE   rR   rF   rR   rG   rS   rH   rR   rI   rf   rJ   rU   rK   rV   rL   rW   rM   rX   rN   rY   r4   re   rw   rP   rO   rP   rK   rV   rL   rW   rM   rX   rN   rY   r4   r,   rw   rP   rO   rP   rG   rS   rK   rV   rL   rW   rM   rX   rN   rY   r4   r,   )rO   rP   r   r   r   r   r   r   r   r   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )rQ   rP   rE   rR   rF   rR   rG   rS   rH   rR   rJ   rU   rO   rP   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )rQ   rP   rE   rR   rF   rR   rG   rS   rH   rR   rJ   rU   rO   rP   r   r'   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )rQ   rP   rE   rR   rF   rR   rG   rS   rH   rR   rJ   rU   rO   rP   r   r   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   rw   rP   rO   rP   r   r   rI   rT   rK   rV   rL   rW   rM   rX   rN   rY   r4   r,   )rw   rP   rO   rP   rI   r`   r   r   rK   rV   rL   rW   rM   rX   rN   rY   r4   ra   )rw   rP   rO   rP   rI   rd   r   r   rK   rV   rL   rW   rM   rX   rN   rY   r4   re   )rw   rP   rO   rP   r   r   rI   rf   rK   rV   rL   rW   rM   rX   rN   rY   r4   re   )r   r   rw   rP   rO   rP   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )r   r   rw   rP   rO   rP   r   r'   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )r   r   rw   rP   rO   rP   r   r   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   __name__
__module____qualname__r   r<   r@   rC   r   r   r]   r   r   r   r   r   r   r   r   r:   r:   r:   r;   r1   7   s6   ===2*0J%4%
%
%$	
c                   @  r3   )or2   r4   r   c                 C  r5   r6   )r   r7   r8   r:   r:   r;   r<   5  r=   zAsyncRuns.stepsAsyncRunsWithRawResponsec                 C  r?   r6   )r   r8   r:   r:   r;   r@   9  rA   zAsyncRuns.with_raw_responseAsyncRunsWithStreamingResponsec                 C  r?   r6   )r   r8   r:   r:   r;   rC   =  rA   z!AsyncRuns.with_streaming_responseNrD   rO   rP   rQ   rE   rR   rF   rG   rS   rH   rI   rT   rJ   rU   rK   rV   rL   rW   rM   rX   rN   rY   r,   c                     dS r[   r:   r\   r:   r:   r;   r]   A     <zAsyncRuns.creater_   r`   !AsyncStream[AssistantStreamEvent]c                  r   rb   r:   rc   r:   r:   r;   r]     r   rd   'Run | AsyncStream[AssistantStreamEvent]c                  r   rb   r:   rc   r:   r:   r;   r]     r   rf   c                  sz   |s
t d|ddi|	pi }	| jd| dt|||||||dtjI d H t|	|
||dt|p4dtt d	I d H S rg   )	rt   ru   r   r.   rv   r%   r,   r   r#   r\   r:   r:   r;   r]     s0   
	rn   rw   c                  sd   |s
t d||st d|ddi|pi }| jd| d| t||||dtdI d	H S )
rx   rh   ry   ri   rj   rk   rz   rn   r{   Nr|   r~   r:   r:   r;   r   '  s   zAsyncRuns.retriever   c             	     sx   |s
t d||st d|ddi|pi }| jd| d| td|itjI dH t||||d	td
I dH S )r   rh   ry   ri   rj   rk   rz   rG   Nrn   r   )rt   ru   r   r/   r   r%   r,   r   r:   r:   r;   r   L  s   zAsyncRuns.updater   r   r   r   r   r   r   r   )AsyncPaginator[Run, AsyncCursorPage[Run]]c          
      C  r   r   )rt   r   r!   r,   r%   r   r-   r   r   r:   r:   r;   r   x  r   zAsyncRuns.listc                  sf   |s
t d||st d|ddi|pi }| jd| d| dt||||dtd	I d
H S )r   rh   ry   ri   rj   rk   rz   r   rn   r{   Nr   r~   r:   r:   r;   r     s   zAsyncRuns.cancel7AsyncAssistantStreamManager[AsyncAssistantEventHandler]c                C  rZ   r   r:   r   r:   r:   r;   r     r   zAsyncRuns.create_and_streamr   r*   8AsyncAssistantStreamManager[AsyncAssistantEventHandlerT]c                C  rZ   r   r:   r   r:   r:   r;   r     r   r   "AsyncAssistantEventHandlerT | NonerAsyncAssistantStreamManager[AsyncAssistantEventHandler] | AsyncAssistantStreamManager[AsyncAssistantEventHandlerT]c                C  s   |s	t d|dd|rdndd|	pi }	| jd| dt|||||d	|d
tjt|	|
||dtd	tt d}t	||p@t
 dS r   )rt   ru   r   r.   rv   r%   r,   r   r#   r+   r)   )r9   rQ   rE   rF   rG   rH   rJ   rO   r   rK   rL   rM   rN   r   r:   r:   r;   r     s:   

	r   r   r   c          	        r   r   r:   r   r:   r:   r;   r   A     $zAsyncRuns.submit_tool_outputsc          	        r   r   r:   r   r:   r:   r;   r   g  r   c          	        r   r   r:   r   r:   r:   r;   r     r   r   c          	   	     s   |s
t d||st d|ddi|pi }| jd| d| dt||dtjI d H t||||d	t|p;d
tt dI d H S r   )	rt   ru   r   r0   r   r%   r,   r   r#   r   r:   r:   r;   r     s*   c                C  rZ   r   r:   r   r:   r:   r;   r     r   z$AsyncRuns.submit_tool_outputs_streamc          	      C  rZ   r   r:   r   r:   r:   r;   r     r   r   c          
   	   C  s   |s	t d||st d|dd|rdndd|pi }| jd| d	| d
t|ddtjt||||dtdtt d}	t	|	|pGt
 dS r   )rt   ru   r   r0   r   r%   r,   r   r#   r+   r)   r   r:   r:   r;   r     s4   
)r4   r   )r4   r   )r4   r   r   )rO   rP   rQ   rP   rI   r`   rE   rR   rF   rR   rG   rS   rH   rR   rJ   rU   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )rO   rP   rQ   rP   rI   rd   rE   rR   rF   rR   rG   rS   rH   rR   rJ   rU   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )rO   rP   rQ   rP   rE   rR   rF   rR   rG   rS   rH   rR   rI   rf   rJ   rU   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   r   r   )rO   rP   r   r   r   r   r   r   r   r   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )rQ   rP   rE   rR   rF   rR   rG   rS   rH   rR   rJ   rU   rO   rP   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )rQ   rP   rE   rR   rF   rR   rG   rS   rH   rR   rJ   rU   rO   rP   r   r*   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )rQ   rP   rE   rR   rF   rR   rG   rS   rH   rR   rJ   rU   rO   rP   r   r   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   r   )rw   rP   rO   rP   rI   r`   r   r   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )rw   rP   rO   rP   rI   rd   r   r   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )rw   rP   rO   rP   r   r   rI   rf   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )r   r   rw   rP   rO   rP   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )r   r   rw   rP   rO   rP   r   r*   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   )r   r   rw   rP   rO   rP   r   r   rK   rV   rL   rW   rM   rX   rN   rY   r4   r   r   r:   r:   r:   r;   r2   4  s6   ===2*0J%6%
%
%$	
c                   @  $   e Zd ZdddZeddd	Zd
S )r>   runsr1   r4   Nonec                 C  ^   || _ t|j| _t|j| _t|j| _t|j| _t|j| _t|j| _d S r6   )	_runsr	   to_raw_response_wrapperr]   r   r   r   r   r   r9   r   r:   r:   r;   __init__6  &   
zRunsWithRawResponse.__init__r   c                 C     t | jjS r6   )r   r   r<   r8   r:   r:   r;   r<   L     zRunsWithRawResponse.stepsNr   r1   r4   r   )r4   r   r   r   r   r   r   r<   r:   r:   r:   r;   r>   5      
r>   c                   @  r   )r   r   r2   r4   r   c                 C  r   r6   )	r   r	   async_to_raw_response_wrapperr]   r   r   r   r   r   r   r:   r:   r;   r   R  r   z!AsyncRunsWithRawResponse.__init__r   c                 C  r   r6   )r   r   r<   r8   r:   r:   r;   r<   h  r   zAsyncRunsWithRawResponse.stepsNr   r2   r4   r   )r4   r   r   r:   r:   r:   r;   r   Q  r   r   c                   @  r   )rB   r   r1   r4   r   c                 C  R   || _ t|j| _t|j| _t|j| _t|j| _t|j| _t|j| _d S r6   )r   r   r]   r   r   r   r   r   r   r:   r:   r;   r   n  &   
z"RunsWithStreamingResponse.__init__r   c                 C  r   r6   )r   r   r<   r8   r:   r:   r;   r<     r   zRunsWithStreamingResponse.stepsNr   )r4   r   r   r:   r:   r:   r;   rB   m  r   rB   c                   @  r   )r   r   r2   r4   r   c                 C  r   r6   )r   r   r]   r   r   r   r   r   r   r:   r:   r;   r     r   z'AsyncRunsWithStreamingResponse.__init__r   c                 C  r   r6   )r   r   r<   r8   r:   r:   r;   r<     r   z$AsyncRunsWithStreamingResponse.stepsNr   )r4   r   r   r:   r:   r:   r;   r     r   r   )F
__future__r   typingr   r   r   	functoolsr   typing_extensionsr   httpx r	   r<   r   r   r   r   r   r   _typesr   r   r   r   r   _utilsr   r   r   _compatr   	_resourcer   r   	_responser   r   
_streamingr   r   
paginationr    r!   
types.betar"   r#   _base_clientr$   r%   lib.streamingr&   r'   r(   r)   r*   r+   types.beta.threadsr,   r-   r.   r/   r0   __all__r1   r2   r>   r   rB   r   r:   r:   r:   r;   <module>   sJ                 