o
    h)                     @  s   d dl mZ d dlZddlmZmZ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mZmZ ddlmZ dd	l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 )    )annotationsN   )	NOT_GIVENBodyQueryHeadersNotGiven)cached_property)SyncAPIResourceAsyncAPIResource)to_raw_response_wrapperto_streamed_response_wrapperasync_to_raw_response_wrapper"async_to_streamed_response_wrapper)Model)make_request_options)ModelDeleted)ModelListResponseModelsAsyncModelsc                   @  j   e Zd ZedddZedddZddded	dddZddded	d ddZddded	d!ddZ	dS )"r   returnModelsWithRawResponsec                 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/groq/groq-python#accessing-raw-response-data-eg-headers
        )r   self r   i/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/groq/resources/models.pywith_raw_response      zModels.with_raw_responseModelsWithStreamingResponsec                 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/groq/groq-python#with_streaming_response
        )r!   r   r   r   r   with_streaming_response#      zModels.with_streaming_responseNextra_headersextra_query
extra_bodytimeoutmodelstrr&   Headers | Noner'   Query | Noner(   Body | Noner)   'float | httpx.Timeout | None | NotGivenr   c                C  4   |s	t d|| jd| t||||dtdS )H  
        Get a specific model

        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
        4Expected a non-empty value for `model` but received /openai/v1/models/r%   optionscast_to
ValueError_getr   r   r   r*   r&   r'   r(   r)   r   r   r   retrieve,      zModels.retriever   c                C  s   | j dt||||dtdS )get all available models/openai/v1/modelsr%   r4   r9   r   r   r   r&   r'   r(   r)   r   r   r   listM   s   zModels.listr   c                C  r0   )B  
        Delete a model

        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
        r2   r3   r%   r4   r8   _deleter   r   r:   r   r   r   delete`   r<   zModels.delete)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+   r&   r,   r'   r-   r(   r.   r)   r/   r   r   
__name__
__module____qualname__r	   r   r#   r   r;   rA   rE   r   r   r   r   r      (    	&c                   @  r   )"r   r   AsyncModelsWithRawResponsec                 C  r   r   )rN   r   r   r   r   r      r    zAsyncModels.with_raw_response AsyncModelsWithStreamingResponsec                 C  r   r"   )rO   r   r   r   r   r#      r$   z#AsyncModels.with_streaming_responseNr%   r*   r+   r&   r,   r'   r-   r(   r.   r)   r/   r   c                  <   |s
t d|| jd| t||||dtdI dH S )r1   r2   r3   r%   r4   Nr7   r:   r   r   r   r;         zAsyncModels.retriever   c                  s$   | j dt||||dtdI dH S )r=   r>   r%   r4   Nr?   r@   r   r   r   rA      s   zAsyncModels.listr   c                  rP   )rB   r2   r3   r%   r4   NrC   r:   r   r   r   rE      rQ   zAsyncModels.delete)r   rN   )r   rO   rF   rG   rH   rI   r   r   r   r   r      rM   c                   @     e Zd ZdddZdS )	r   modelsr   r   Nonec                 C  .   || _ t|j| _t|j| _t|j| _d S N)_modelsr   r;   rA   rE   r   rS   r   r   r   __init__      
zModelsWithRawResponse.__init__NrS   r   r   rT   rJ   rK   rL   rY   r   r   r   r   r          r   c                   @  rR   )	rN   rS   r   r   rT   c                 C  rU   rV   )rW   r   r;   rA   rE   rX   r   r   r   rY      rZ   z#AsyncModelsWithRawResponse.__init__NrS   r   r   rT   r\   r   r   r   r   rN      r]   rN   c                   @  rR   )	r!   rS   r   r   rT   c                 C  rU   rV   )rW   r   r;   rA   rE   rX   r   r   r   rY     rZ   z$ModelsWithStreamingResponse.__init__Nr[   r\   r   r   r   r   r!   
  r]   r!   c                   @  rR   )	rO   rS   r   r   rT   c                 C  rU   rV   )rW   r   r;   rA   rE   rX   r   r   r   rY     rZ   z)AsyncModelsWithStreamingResponse.__init__Nr^   r\   r   r   r   r   rO     r]   rO   )"
__future__r   httpx_typesr   r   r   r   r   _compatr	   	_resourcer
   r   	_responser   r   r   r   types.modelr   _base_clientr   types.model_deletedr   types.model_list_responser   __all__r   r   r   rN   r!   rO   r   r   r   r   <module>   s"   jj