o
    "ch                     @  s  d dl mZ d dlZd dlmZmZmZmZ d dl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mZ dd
l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'm(Z( erddl)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9 ddl:m;Z;m<Z< ddl=m>Z>m?Z? ddl@mAZAmBZB ddlCmDZDmEZE ddlFmGZGmHZH ddlImJZJmKZK ddlLmMZMmNZN ddlOmPZPmQZQ ddlRmSZSmTZT ddlUmVZVmWZW ddlXmYZYmZZZ ddl[m\Z\m]Z] ddl^m_Z_m`Z` ddlambZbmcZc ddldmeZemfZf ddlgmhZhmiZi dd ljmkZkmlZl g d!ZmG d"d# d#e'ZnG d$d% d%e(ZoG d&d' d'ZpG d(d) d)ZqG d*d+ d+ZrG d,d- d-ZsenZteoZudS ).    )annotationsN)TYPE_CHECKINGAnyUnionMapping)Selfoverride   )_exceptionsQuerystring)	NOT_GIVENOmitTimeoutNotGiven	TransportProxiesTypesRequestOptions)is_given
is_mappingget_async_library)cached_property)__version__)StreamAsyncStream)OpenAIErrorAPIStatusError)DEFAULT_MAX_RETRIESSyncAPIClientAsyncAPIClient)betachataudioevalsfilesimagesmodelsbatchesuploads	responses
containers
embeddingscompletionsfine_tuningmoderationsvector_stores)Files
AsyncFiles)ImagesAsyncImages)ModelsAsyncModels)BatchesAsyncBatches)WebhooksAsyncWebhooks)Beta	AsyncBeta)Chat	AsyncChat)
EmbeddingsAsyncEmbeddings)Audio
AsyncAudio)CompletionsAsyncCompletions)Evals
AsyncEvals)ModerationsAsyncModerations)UploadsAsyncUploads)	ResponsesAsyncResponses)
ContainersAsyncContainers)
FineTuningAsyncFineTuning)VectorStoresAsyncVectorStores)r   r   r   r   OpenAIAsyncOpenAIClientAsyncClientc                        e Zd ZU ded< ded< ded< ded< ded< 	 d	d	d	d	d	d	eed	d	d	d
ddq fddZedrddZedsd!d"Z	edtd$d%Z
edud'd(Zedvd*d+Zedwd-d.Zedxd0d1Zedyd3d4Zedzd6d7Zed{d9d:Zed|d<d=Zed}d?d@Zed~dBdCZeddEdFZeddHdIZeddKdLZeddNdOZeddQdRZeddTdUZeeddWdXZeeddZd[Zeed fd]d^Zd	d	d	d	d	d	ed	ed	d	d	d	i d_ddgdhZ e Z!eddodpZ"  Z#S )rR   strapi_key
str | Noneorganizationprojectwebhook_secretstr | httpx.URL | Nonewebsocket_base_urlNFrX   rZ   r[   r\   base_urlr^   timeoutmax_retriesdefault_headersdefault_queryhttp_client_strict_response_validationr`   ra   %Union[float, Timeout, None, NotGiven]rb   intrc   Mapping[str, str] | Nonerd   Mapping[str, object] | Nonere   httpx.Client | Nonerf   boolreturnNonec             
        |du r
t jd}|du rtd|| _|du rt jd}|| _|du r,t jd}|| _|du r9t jd}|| _|| _|du rIt jd}|du rOd}t	 j
t|||||	|
|d	 t| _dS )
a}  Construct a new synchronous OpenAI client instance.

        This automatically infers the following arguments from their corresponding environment variables if they are not provided:
        - `api_key` from `OPENAI_API_KEY`
        - `organization` from `OPENAI_ORG_ID`
        - `project` from `OPENAI_PROJECT_ID`
        - `webhook_secret` from `OPENAI_WEBHOOK_SECRET`
        NOPENAI_API_KEYThe api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variableOPENAI_ORG_IDOPENAI_PROJECT_IDOPENAI_WEBHOOK_SECRETOPENAI_BASE_URLhttps://api.openai.com/v1versionr`   rb   ra   re   custom_headerscustom_queryrf   )osenvirongetr   rX   rZ   r[   r\   r^   super__init__r   r   _default_stream_clsselfrX   rZ   r[   r\   r`   r^   ra   rb   rc   rd   re   rf   	__class__ L/home/air/goalskill/back/venv/lib/python3.10/site-packages/openai/_client.pyr   \   @   #
zOpenAI.__init__rB   c                 C     ddl m} || S )Nr	   )rB   )resources.completionsrB   )r   rB   r   r   r   r,         zOpenAI.completionsr<   c                 C  r   )Nr	   )r<   )resources.chatr<   )r   r<   r   r   r   r!      r   zOpenAI.chatr>   c                 C  r   )Nr	   )r>   )resources.embeddingsr>   )r   r>   r   r   r   r+      r   zOpenAI.embeddingsr0   c                 C  r   )Nr	   )r0   )resources.filesr0   )r   r0   r   r   r   r$      r   zOpenAI.filesr2   c                 C  r   )Nr	   )r2   )resources.imagesr2   )r   r2   r   r   r   r%      r   zOpenAI.imagesr@   c                 C  r   )Nr	   )r@   )resources.audior@   )r   r@   r   r   r   r"      r   zOpenAI.audiorF   c                 C  r   )Nr	   )rF   )resources.moderationsrF   )r   rF   r   r   r   r.      r   zOpenAI.moderationsr4   c                 C  r   )Nr	   )r4   )resources.modelsr4   )r   r4   r   r   r   r&      r   zOpenAI.modelsrN   c                 C  r   )Nr	   )rN   )resources.fine_tuningrN   )r   rN   r   r   r   r-      r   zOpenAI.fine_tuningrP   c                 C  r   )Nr	   )rP   )resources.vector_storesrP   )r   rP   r   r   r   r/      r   zOpenAI.vector_storesr8   c                 C  r   )Nr	   )r8   )resources.webhooksr8   )r   r8   r   r   r   webhooks   r   zOpenAI.webhooksr:   c                 C  r   )Nr	   )r:   )resources.betar:   )r   r:   r   r   r   r       r   zOpenAI.betar6   c                 C  r   )Nr	   )r6   )resources.batchesr6   )r   r6   r   r   r   r'      r   zOpenAI.batchesrH   c                 C  r   )Nr	   )rH   )resources.uploadsrH   )r   rH   r   r   r   r(      r   zOpenAI.uploadsrJ   c                 C  r   )Nr	   )rJ   )resources.responsesrJ   )r   rJ   r   r   r   r)      r   zOpenAI.responsesrD   c                 C  r   )Nr	   )rD   )resources.evalsrD   )r   rD   r   r   r   r#     r   zOpenAI.evalsrL   c                 C  r   )Nr	   )rL   )resources.containersrL   )r   rL   r   r   r   r*     r   zOpenAI.containersOpenAIWithRawResponsec                 C     t | S N)r   r   r   r   r   with_raw_response     zOpenAI.with_raw_responseOpenAIWithStreamedResponsec                 C  r   r   )r   r   r   r   r   with_streaming_response  r   zOpenAI.with_streaming_responser   c                 C  
   t ddS Nbrackets)array_formatr   r   r   r   r   qs     
z	OpenAI.qsdict[str, str]c                 C     | j }|si S dd| iS NAuthorizationzBearer rX   r   rX   r   r   r   auth_headers     zOpenAI.auth_headersdict[str, str | Omit]c                   sB   i t  jd| jd ur| jnt | jd ur| jnt d| jS )NfalsezX-Stainless-AsynczOpenAI-OrganizationzOpenAI-Project)r~   rc   rZ   r   r[   _custom_headersr   r   r   r   rc   #  s   zOpenAI.default_headersrX   rZ   r[   r\   r^   r`   ra   re   rb   rc   set_default_headersrd   set_default_query_extra_kwargs!float | Timeout | None | NotGivenint | NotGivenr   r   r   Mapping[str, Any]r   c                C     |
dur|durt d|dur|durt d| j}|
dur&i ||
}n|dur,|}| j}|dur:i ||}n|dur@|}|pD| j}| jd|pL| j|pP| j|pT| j|pX| j|p\| j	|p`| j
t|trh| jn||t|	rp|	n| j||d|S z~
        Create a new client instance re-using the same options given to the current client with optional overriding.
        NzPThe `default_headers` and `set_default_headers` arguments are mutually exclusivezLThe `default_query` and `set_default_query` arguments are mutually exclusive)rX   rZ   r[   r\   r^   r`   ra   re   rb   rc   rd   r   
ValueErrorr   _custom_query_clientr   rX   rZ   r[   r\   r^   r`   
isinstancer   ra   r   rb   r   rX   rZ   r[   r\   r^   r`   ra   re   rb   rc   r   rd   r   r   headersparamsr   r   r   copy.  <   
zOpenAI.copyerr_msgbodyobjectresponsehttpx.Responser   c                C     t |r
|d|n|}|jdkrtj|||dS |jdkr&tj|||dS |jdkr3tj|||dS |jdkr@tj|||dS |jdkrMtj|||dS |jdkrZtj	|||dS |jd	krgtj
|||dS |jd
krttj|||dS t|||dS Nerrori  )r   r   i  i  i  i  i  i  i  r   r}   status_coder
   BadRequestErrorAuthenticationErrorPermissionDeniedErrorNotFoundErrorConflictErrorUnprocessableEntityErrorRateLimitErrorInternalServerErrorr   r   r   r   r   datar   r   r   _make_status_errori  $   







zOpenAI._make_status_error)rX   rY   rZ   rY   r[   rY   r\   rY   r`   r]   r^   r]   ra   rg   rb   rh   rc   ri   rd   rj   re   rk   rf   rl   rm   rn   )rm   rB   )rm   r<   )rm   r>   )rm   r0   )rm   r2   )rm   r@   )rm   rF   )rm   r4   )rm   rN   )rm   rP   )rm   r8   )rm   r:   )rm   r6   )rm   rH   )rm   rJ   )rm   rD   )rm   rL   )rm   r   )rm   r   rm   r   rm   r   rm   r   )rX   rY   rZ   rY   r[   rY   r\   rY   r^   r]   r`   r]   ra   r   re   rk   rb   r   rc   ri   r   ri   rd   rj   r   rj   r   r   rm   r   r   rW   r   r   r   r   rm   r   $__name__
__module____qualname____annotations__r   r   r   r   r,   r!   r+   r$   r%   r"   r.   r&   r-   r/   r   r    r'   r(   r)   r#   r*   r   r   propertyr   r   r   rc   r   with_optionsr   __classcell__r   r   r   r   rR   M      
 
	K9rR   c                      rV   )rS   rW   rX   rY   rZ   r[   r\   r]   r^   NFr_   r`   ra   rg   rb   rh   rc   ri   rd   rj   re   httpx.AsyncClient | Nonerf   rl   rm   rn   c             
     ro   )
a|  Construct a new async AsyncOpenAI client instance.

        This automatically infers the following arguments from their corresponding environment variables if they are not provided:
        - `api_key` from `OPENAI_API_KEY`
        - `organization` from `OPENAI_ORG_ID`
        - `project` from `OPENAI_PROJECT_ID`
        - `webhook_secret` from `OPENAI_WEBHOOK_SECRET`
        Nrp   rq   rr   rs   rt   ru   rv   rw   )r{   r|   r}   r   rX   rZ   r[   r\   r^   r~   r   r   r   r   r   r   r   r   r     r   zAsyncOpenAI.__init__rC   c                 C  r   )Nr	   )rC   )r   rC   )r   rC   r   r   r   r,     r   zAsyncOpenAI.completionsr=   c                 C  r   )Nr	   )r=   )r   r=   )r   r=   r   r   r   r!     r   zAsyncOpenAI.chatr?   c                 C  r   )Nr	   )r?   )r   r?   )r   r?   r   r   r   r+     r   zAsyncOpenAI.embeddingsr1   c                 C  r   )Nr	   )r1   )r   r1   )r   r1   r   r   r   r$     r   zAsyncOpenAI.filesr3   c                 C  r   )Nr	   )r3   )r   r3   )r   r3   r   r   r   r%     r   zAsyncOpenAI.imagesrA   c                 C  r   )Nr	   )rA   )r   rA   )r   rA   r   r   r   r"     r   zAsyncOpenAI.audiorG   c                 C  r   )Nr	   )rG   )r   rG   )r   rG   r   r   r   r.   
  r   zAsyncOpenAI.moderationsr5   c                 C  r   )Nr	   )r5   )r   r5   )r   r5   r   r   r   r&     r   zAsyncOpenAI.modelsrO   c                 C  r   )Nr	   )rO   )r   rO   )r   rO   r   r   r   r-     r   zAsyncOpenAI.fine_tuningrQ   c                 C  r   )Nr	   )rQ   )r   rQ   )r   rQ   r   r   r   r/     r   zAsyncOpenAI.vector_storesr9   c                 C  r   )Nr	   )r9   )r   r9   )r   r9   r   r   r   r   "  r   zAsyncOpenAI.webhooksr;   c                 C  r   )Nr	   )r;   )r   r;   )r   r;   r   r   r   r    (  r   zAsyncOpenAI.betar7   c                 C  r   )Nr	   )r7   )r   r7   )r   r7   r   r   r   r'   .  r   zAsyncOpenAI.batchesrI   c                 C  r   )Nr	   )rI   )r   rI   )r   rI   r   r   r   r(   4  r   zAsyncOpenAI.uploadsrK   c                 C  r   )Nr	   )rK   )r   rK   )r   rK   r   r   r   r)   :  r   zAsyncOpenAI.responsesrE   c                 C  r   )Nr	   )rE   )r   rE   )r   rE   r   r   r   r#   @  r   zAsyncOpenAI.evalsrM   c                 C  r   )Nr	   )rM   )r   rM   )r   rM   r   r   r   r*   F  r   zAsyncOpenAI.containersAsyncOpenAIWithRawResponsec                 C  r   r   )r   r   r   r   r   r   L  r   zAsyncOpenAI.with_raw_responseAsyncOpenAIWithStreamedResponsec                 C  r   r   )r   r   r   r   r   r   P  r   z#AsyncOpenAI.with_streaming_responser   c                 C  r   r   r   r   r   r   r   r   T  r   zAsyncOpenAI.qsr   c                 C  r   r   r   r   r   r   r   r   Y  r   zAsyncOpenAI.auth_headersr   c                   sJ   i t  jdt  | jd ur| jnt | jd ur| jnt d| jS )Nzasync:r   )r~   rc   r   rZ   r   r[   r   r   r   r   r   rc   b  s   
zAsyncOpenAI.default_headersr   r   r   r   r   r   r   r   c                C  r   r   r   r   r   r   r   r   m  r   zAsyncOpenAI.copyr   r   r   r   r   r   c                C  r   r   r   r   r   r   r   r     r   zAsyncOpenAI._make_status_error)rX   rY   rZ   rY   r[   rY   r\   rY   r`   r]   r^   r]   ra   rg   rb   rh   rc   ri   rd   rj   re   r   rf   rl   rm   rn   )rm   rC   )rm   r=   )rm   r?   )rm   r1   )rm   r3   )rm   rA   )rm   rG   )rm   r5   )rm   rO   )rm   rQ   )rm   r9   )rm   r;   )rm   r7   )rm   rI   )rm   rK   )rm   rE   )rm   rM   )rm   r   )rm   r   r   r   r   )rX   rY   rZ   rY   r[   rY   r\   rY   r^   r]   r`   r]   ra   r   re   r   rb   r   rc   ri   r   ri   rd   rj   r   rj   r   r   rm   r   r   r   r   r   r   r   rS     r   rS   c                   @     e Zd ZU ded< d9ddZed:d	d
Zed;ddZed<ddZed=ddZ	ed>ddZ
ed?ddZed@ddZedAddZedBd!d"ZedCd$d%ZedDd'd(ZedEd*d+ZedFd-d.ZedGd0d1ZedHd3d4ZedId6d7Zd8S )Jr   rR   r   clientrm   rn   c                 C  
   || _ d S r   r   r   r   r   r   r   r        
zOpenAIWithRawResponse.__init__&completions.CompletionsWithRawResponsec                 C     ddl m} || jjS )Nr	   )CompletionsWithRawResponse)r   r   r   r,   )r   r   r   r   r   r,        z!OpenAIWithRawResponse.completionschat.ChatWithRawResponsec                 C  r   )Nr	   )ChatWithRawResponse)r   r   r   r!   )r   r   r   r   r   r!     r   zOpenAIWithRawResponse.chat$embeddings.EmbeddingsWithRawResponsec                 C  r   )Nr	   )EmbeddingsWithRawResponse)r   r   r   r+   )r   r   r   r   r   r+     r   z OpenAIWithRawResponse.embeddingsfiles.FilesWithRawResponsec                 C  r   )Nr	   )FilesWithRawResponse)r   r   r   r$   )r   r   r   r   r   r$     r   zOpenAIWithRawResponse.filesimages.ImagesWithRawResponsec                 C  r   )Nr	   )ImagesWithRawResponse)r   r   r   r%   )r   r   r   r   r   r%     r   zOpenAIWithRawResponse.imagesaudio.AudioWithRawResponsec                 C  r   )Nr	   )AudioWithRawResponse)r   r  r   r"   )r   r  r   r   r   r"     r   zOpenAIWithRawResponse.audio&moderations.ModerationsWithRawResponsec                 C  r   )Nr	   )ModerationsWithRawResponse)r   r  r   r.   )r   r  r   r   r   r.     r   z!OpenAIWithRawResponse.moderationsmodels.ModelsWithRawResponsec                 C  r   )Nr	   )ModelsWithRawResponse)r   r  r   r&   )r   r  r   r   r   r&     r   zOpenAIWithRawResponse.models%fine_tuning.FineTuningWithRawResponsec                 C  r   )Nr	   )FineTuningWithRawResponse)r   r  r   r-   )r   r  r   r   r   r-     r   z!OpenAIWithRawResponse.fine_tuning)vector_stores.VectorStoresWithRawResponsec                 C  r   )Nr	   )VectorStoresWithRawResponse)r   r
  r   r/   )r   r
  r   r   r   r/     r   z#OpenAIWithRawResponse.vector_storesbeta.BetaWithRawResponsec                 C  r   )Nr	   )BetaWithRawResponse)r   r  r   r    )r   r  r   r   r   r      r   zOpenAIWithRawResponse.betabatches.BatchesWithRawResponsec                 C  r   )Nr	   )BatchesWithRawResponse)r   r  r   r'   )r   r  r   r   r   r'     r   zOpenAIWithRawResponse.batchesuploads.UploadsWithRawResponsec                 C  r   )Nr	   )UploadsWithRawResponse)r   r  r   r(   )r   r  r   r   r   r(     r   zOpenAIWithRawResponse.uploads"responses.ResponsesWithRawResponsec                 C  r   )Nr	   )ResponsesWithRawResponse)r   r  r   r)   )r   r  r   r   r   r)     r   zOpenAIWithRawResponse.responsesevals.EvalsWithRawResponsec                 C  r   )Nr	   )EvalsWithRawResponse)r   r  r   r#   )r   r  r   r   r   r#   %  r   zOpenAIWithRawResponse.evals$containers.ContainersWithRawResponsec                 C  r   )Nr	   )ContainersWithRawResponse)r   r  r   r*   )r   r  r   r   r   r*   +  r   z OpenAIWithRawResponse.containersNr   rR   rm   rn   )rm   r   )rm   r   )rm   r   )rm   r   )rm   r   )rm   r  )rm   r  )rm   r  )rm   r  )rm   r	  )rm   r  )rm   r  )rm   r  )rm   r  )rm   r  )rm   r  r   r   r   r   r   r   r,   r!   r+   r$   r%   r"   r.   r&   r-   r/   r    r'   r(   r)   r#   r*   r   r   r   r   r     F   
 
r   c                   @  r   )Jr   rS   r   r   rm   rn   c                 C  r   r   r   r   r   r   r   r   5  r   z#AsyncOpenAIWithRawResponse.__init__+completions.AsyncCompletionsWithRawResponsec                 C  r   )Nr	   )AsyncCompletionsWithRawResponse)r   r  r   r,   )r   r  r   r   r   r,   8  r   z&AsyncOpenAIWithRawResponse.completionschat.AsyncChatWithRawResponsec                 C  r   )Nr	   )AsyncChatWithRawResponse)r   r  r   r!   )r   r  r   r   r   r!   >  r   zAsyncOpenAIWithRawResponse.chat)embeddings.AsyncEmbeddingsWithRawResponsec                 C  r   )Nr	   )AsyncEmbeddingsWithRawResponse)r   r  r   r+   )r   r  r   r   r   r+   D  r   z%AsyncOpenAIWithRawResponse.embeddingsfiles.AsyncFilesWithRawResponsec                 C  r   )Nr	   )AsyncFilesWithRawResponse)r   r!  r   r$   )r   r!  r   r   r   r$   J  r   z AsyncOpenAIWithRawResponse.files!images.AsyncImagesWithRawResponsec                 C  r   )Nr	   )AsyncImagesWithRawResponse)r   r#  r   r%   )r   r#  r   r   r   r%   P  r   z!AsyncOpenAIWithRawResponse.imagesaudio.AsyncAudioWithRawResponsec                 C  r   )Nr	   )AsyncAudioWithRawResponse)r   r%  r   r"   )r   r%  r   r   r   r"   V  r   z AsyncOpenAIWithRawResponse.audio+moderations.AsyncModerationsWithRawResponsec                 C  r   )Nr	   )AsyncModerationsWithRawResponse)r   r'  r   r.   )r   r'  r   r   r   r.   \  r   z&AsyncOpenAIWithRawResponse.moderations!models.AsyncModelsWithRawResponsec                 C  r   )Nr	   )AsyncModelsWithRawResponse)r   r)  r   r&   )r   r)  r   r   r   r&   b  r   z!AsyncOpenAIWithRawResponse.models*fine_tuning.AsyncFineTuningWithRawResponsec                 C  r   )Nr	   )AsyncFineTuningWithRawResponse)r   r+  r   r-   )r   r+  r   r   r   r-   h  r   z&AsyncOpenAIWithRawResponse.fine_tuning.vector_stores.AsyncVectorStoresWithRawResponsec                 C  r   )Nr	   ) AsyncVectorStoresWithRawResponse)r   r-  r   r/   )r   r-  r   r   r   r/   n  r   z(AsyncOpenAIWithRawResponse.vector_storesbeta.AsyncBetaWithRawResponsec                 C  r   )Nr	   )AsyncBetaWithRawResponse)r   r/  r   r    )r   r/  r   r   r   r    t  r   zAsyncOpenAIWithRawResponse.beta#batches.AsyncBatchesWithRawResponsec                 C  r   )Nr	   )AsyncBatchesWithRawResponse)r   r1  r   r'   )r   r1  r   r   r   r'   z  r   z"AsyncOpenAIWithRawResponse.batches#uploads.AsyncUploadsWithRawResponsec                 C  r   )Nr	   )AsyncUploadsWithRawResponse)r   r3  r   r(   )r   r3  r   r   r   r(     r   z"AsyncOpenAIWithRawResponse.uploads'responses.AsyncResponsesWithRawResponsec                 C  r   )Nr	   )AsyncResponsesWithRawResponse)r   r5  r   r)   )r   r5  r   r   r   r)     r   z$AsyncOpenAIWithRawResponse.responsesevals.AsyncEvalsWithRawResponsec                 C  r   )Nr	   )AsyncEvalsWithRawResponse)r   r7  r   r#   )r   r7  r   r   r   r#     r   z AsyncOpenAIWithRawResponse.evals)containers.AsyncContainersWithRawResponsec                 C  r   )Nr	   )AsyncContainersWithRawResponse)r   r9  r   r*   )r   r9  r   r   r   r*     r   z%AsyncOpenAIWithRawResponse.containersNr   rS   rm   rn   )rm   r  )rm   r  )rm   r  )rm   r   )rm   r"  )rm   r$  )rm   r&  )rm   r(  )rm   r*  )rm   r,  )rm   r.  )rm   r0  )rm   r2  )rm   r4  )rm   r6  )rm   r8  r  r   r   r   r   r   2  r  r   c                   @  r   )Jr   rR   r   r   rm   rn   c                 C  r   r   r   r   r   r   r   r     r   z#OpenAIWithStreamedResponse.__init__,completions.CompletionsWithStreamingResponsec                 C  r   )Nr	   ) CompletionsWithStreamingResponse)r   r<  r   r,   )r   r<  r   r   r   r,     r   z&OpenAIWithStreamedResponse.completionschat.ChatWithStreamingResponsec                 C  r   )Nr	   )ChatWithStreamingResponse)r   r>  r   r!   )r   r>  r   r   r   r!     r   zOpenAIWithStreamedResponse.chat*embeddings.EmbeddingsWithStreamingResponsec                 C  r   )Nr	   )EmbeddingsWithStreamingResponse)r   r@  r   r+   )r   r@  r   r   r   r+     r   z%OpenAIWithStreamedResponse.embeddings files.FilesWithStreamingResponsec                 C  r   )Nr	   )FilesWithStreamingResponse)r   rB  r   r$   )r   rB  r   r   r   r$     r   z OpenAIWithStreamedResponse.files"images.ImagesWithStreamingResponsec                 C  r   )Nr	   )ImagesWithStreamingResponse)r   rD  r   r%   )r   rD  r   r   r   r%     r   z!OpenAIWithStreamedResponse.images audio.AudioWithStreamingResponsec                 C  r   )Nr	   )AudioWithStreamingResponse)r   rF  r   r"   )r   rF  r   r   r   r"     r   z OpenAIWithStreamedResponse.audio,moderations.ModerationsWithStreamingResponsec                 C  r   )Nr	   ) ModerationsWithStreamingResponse)r   rH  r   r.   )r   rH  r   r   r   r.     r   z&OpenAIWithStreamedResponse.moderations"models.ModelsWithStreamingResponsec                 C  r   )Nr	   )ModelsWithStreamingResponse)r   rJ  r   r&   )r   rJ  r   r   r   r&     r   z!OpenAIWithStreamedResponse.models+fine_tuning.FineTuningWithStreamingResponsec                 C  r   )Nr	   )FineTuningWithStreamingResponse)r   rL  r   r-   )r   rL  r   r   r   r-     r   z&OpenAIWithStreamedResponse.fine_tuning/vector_stores.VectorStoresWithStreamingResponsec                 C  r   )Nr	   )!VectorStoresWithStreamingResponse)r   rN  r   r/   )r   rN  r   r   r   r/     r   z(OpenAIWithStreamedResponse.vector_storesbeta.BetaWithStreamingResponsec                 C  r   )Nr	   )BetaWithStreamingResponse)r   rP  r   r    )r   rP  r   r   r   r      r   zOpenAIWithStreamedResponse.beta$batches.BatchesWithStreamingResponsec                 C  r   )Nr	   )BatchesWithStreamingResponse)r   rR  r   r'   )r   rR  r   r   r   r'     r   z"OpenAIWithStreamedResponse.batches$uploads.UploadsWithStreamingResponsec                 C  r   )Nr	   )UploadsWithStreamingResponse)r   rT  r   r(   )r   rT  r   r   r   r(     r   z"OpenAIWithStreamedResponse.uploads(responses.ResponsesWithStreamingResponsec                 C  r   )Nr	   )ResponsesWithStreamingResponse)r   rV  r   r)   )r   rV  r   r   r   r)     r   z$OpenAIWithStreamedResponse.responses evals.EvalsWithStreamingResponsec                 C  r   )Nr	   )EvalsWithStreamingResponse)r   rX  r   r#   )r   rX  r   r   r   r#     r   z OpenAIWithStreamedResponse.evals*containers.ContainersWithStreamingResponsec                 C  r   )Nr	   )ContainersWithStreamingResponse)r   rZ  r   r*   )r   rZ  r   r   r   r*     r   z%OpenAIWithStreamedResponse.containersNr  )rm   r;  )rm   r=  )rm   r?  )rm   rA  )rm   rC  )rm   rE  )rm   rG  )rm   rI  )rm   rK  )rm   rM  )rm   rO  )rm   rQ  )rm   rS  )rm   rU  )rm   rW  )rm   rY  r  r   r   r   r   r     r  r   c                   @  r   )Jr   rS   r   r   rm   rn   c                 C  r   r   r   r   r   r   r   r     r   z(AsyncOpenAIWithStreamedResponse.__init__1completions.AsyncCompletionsWithStreamingResponsec                 C  r   )Nr	   )%AsyncCompletionsWithStreamingResponse)r   r\  r   r,   )r   r\  r   r   r   r,     r   z+AsyncOpenAIWithStreamedResponse.completions#chat.AsyncChatWithStreamingResponsec                 C  r   )Nr	   )AsyncChatWithStreamingResponse)r   r^  r   r!   )r   r^  r   r   r   r!     r   z$AsyncOpenAIWithStreamedResponse.chat/embeddings.AsyncEmbeddingsWithStreamingResponsec                 C  r   )Nr	   )$AsyncEmbeddingsWithStreamingResponse)r   r`  r   r+   )r   r`  r   r   r   r+     r   z*AsyncOpenAIWithStreamedResponse.embeddings%files.AsyncFilesWithStreamingResponsec                 C  r   )Nr	   )AsyncFilesWithStreamingResponse)r   rb  r   r$   )r   rb  r   r   r   r$     r   z%AsyncOpenAIWithStreamedResponse.files'images.AsyncImagesWithStreamingResponsec                 C  r   )Nr	   ) AsyncImagesWithStreamingResponse)r   rd  r   r%   )r   rd  r   r   r   r%     r   z&AsyncOpenAIWithStreamedResponse.images%audio.AsyncAudioWithStreamingResponsec                 C  r   )Nr	   )AsyncAudioWithStreamingResponse)r   rf  r   r"   )r   rf  r   r   r   r"   $  r   z%AsyncOpenAIWithStreamedResponse.audio1moderations.AsyncModerationsWithStreamingResponsec                 C  r   )Nr	   )%AsyncModerationsWithStreamingResponse)r   rh  r   r.   )r   rh  r   r   r   r.   *  r   z+AsyncOpenAIWithStreamedResponse.moderations'models.AsyncModelsWithStreamingResponsec                 C  r   )Nr	   ) AsyncModelsWithStreamingResponse)r   rj  r   r&   )r   rj  r   r   r   r&   0  r   z&AsyncOpenAIWithStreamedResponse.models0fine_tuning.AsyncFineTuningWithStreamingResponsec                 C  r   )Nr	   )$AsyncFineTuningWithStreamingResponse)r   rl  r   r-   )r   rl  r   r   r   r-   6  r   z+AsyncOpenAIWithStreamedResponse.fine_tuning4vector_stores.AsyncVectorStoresWithStreamingResponsec                 C  r   )Nr	   )&AsyncVectorStoresWithStreamingResponse)r   rn  r   r/   )r   rn  r   r   r   r/   <  r   z-AsyncOpenAIWithStreamedResponse.vector_stores#beta.AsyncBetaWithStreamingResponsec                 C  r   )Nr	   )AsyncBetaWithStreamingResponse)r   rp  r   r    )r   rp  r   r   r   r    B  r   z$AsyncOpenAIWithStreamedResponse.beta)batches.AsyncBatchesWithStreamingResponsec                 C  r   )Nr	   )!AsyncBatchesWithStreamingResponse)r   rr  r   r'   )r   rr  r   r   r   r'   H  r   z'AsyncOpenAIWithStreamedResponse.batches)uploads.AsyncUploadsWithStreamingResponsec                 C  r   )Nr	   )!AsyncUploadsWithStreamingResponse)r   rt  r   r(   )r   rt  r   r   r   r(   N  r   z'AsyncOpenAIWithStreamedResponse.uploads-responses.AsyncResponsesWithStreamingResponsec                 C  r   )Nr	   )#AsyncResponsesWithStreamingResponse)r   rv  r   r)   )r   rv  r   r   r   r)   T  r   z)AsyncOpenAIWithStreamedResponse.responses%evals.AsyncEvalsWithStreamingResponsec                 C  r   )Nr	   )AsyncEvalsWithStreamingResponse)r   rx  r   r#   )r   rx  r   r   r   r#   Z  r   z%AsyncOpenAIWithStreamedResponse.evals/containers.AsyncContainersWithStreamingResponsec                 C  r   )Nr	   )$AsyncContainersWithStreamingResponse)r   rz  r   r*   )r   rz  r   r   r   r*   `  r   z*AsyncOpenAIWithStreamedResponse.containersNr:  )rm   r[  )rm   r]  )rm   r_  )rm   ra  )rm   rc  )rm   re  )rm   rg  )rm   ri  )rm   rk  )rm   rm  )rm   ro  )rm   rq  )rm   rs  )rm   ru  )rm   rw  )rm   ry  r  r   r   r   r   r      r  r   )v
__future__r   r{   typingr   r   r   r   typing_extensionsr   r   httpx r
   _qsr   _typesr   r   r   r   r   r   r   _utilsr   r   r   _compatr   _versionr   
_streamingr   r   r   r   _base_clientr   r   r   	resourcesr    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r   r0   r1   r   r2   r3   r   r4   r5   r   r6   r7   r   r8   r9   resources.beta.betar:   r;   resources.chat.chatr<   r=   r   r>   r?   resources.audio.audior@   rA   r   rB   rC   resources.evals.evalsrD   rE   r   rF   rG   resources.uploads.uploadsrH   rI   resources.responses.responsesrJ   rK   resources.containers.containersrL   rM   !resources.fine_tuning.fine_tuningrN   rO   %resources.vector_stores.vector_storesrP   rQ   __all__rR   rS   r   r   r   r   rT   rU   r   r   r   r   <module>   s\   $	H  A  Agggg