
     `ia                       d dl mZ d dlmZmZmZ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mZmZmZmZ dd
lmZ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+ ddl,m-Z-m.Z. ddl/m0Z0m1Z1 ddl2m3Z3m4Z4 ddl5m6Z6 ddl7m8Z8 ddl9m:Z: ddl;m<Z< ddl=m>Z> ddgZ? G d de'          Z@ G d de(          ZA G d d          ZB G d d          ZC G d d          ZD G d  d!          ZEdS )"    )annotations)ListMappingOptionalcast)chainN   )_legacy_response   )VersionsAsyncVersionsVersionsWithRawResponseAsyncVersionsWithRawResponseVersionsWithStreamingResponse"AsyncVersionsWithStreamingResponse)	BodyOmitQueryHeadersNotGiven	FileTypesSequenceNotStromit	not_given)is_givenextract_filesmaybe_transformstrip_not_givendeepcopy_minimalasync_maybe_transform)cached_property)SyncAPIResourceAsyncAPIResource)to_streamed_response_wrapper"async_to_streamed_response_wrapper)SyncPageCursorAsyncPageCursor)skill_list_paramsskill_create_params)AsyncPaginatormake_request_options)AnthropicBetaParam)SkillListResponse)SkillCreateResponse)SkillDeleteResponse)SkillRetrieveResponseSkillsAsyncSkillsc            	          e Zd Zed(d            Zed)d            Zed*d            Zeeeddded	d+dZ	edddedd,dZ
eeeedddedd-d%Zedddedd.d'ZdS )/r1   returnr   c                *    t          | j                  S N)r   _clientselfs    z/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/anthropic/resources/beta/skills/skills.pyversionszSkills.versions6   s    %%%    SkillsWithRawResponsec                     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/anthropics/anthropic-sdk-python#accessing-raw-response-data-eg-headers
        )r=   r8   s    r:   with_raw_responsezSkills.with_raw_response:   s     %T***r<   SkillsWithStreamingResponsec                     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/anthropics/anthropic-sdk-python#with_streaming_response
        )rA   r8   s    r:   with_streaming_responsezSkills.with_streaming_responseD   s     +4000r<   Ndisplay_titlefilesbetasextra_headersextra_query
extra_bodytimeoutrF   Optional[str] | OmitrG   *Optional[SequenceNotStr[FileTypes]] | OmitrH   List[AnthropicBetaParam] | OmitrI   Headers | NonerJ   Query | NonerK   Body | NonerL   'float | httpx.Timeout | None | NotGivenr.   c                  i t          dt          |          r.d                    t          d |D             dg                    nt          i          |pi }ddi|pi }t          ||d          }t          t          t          t          t          f         |          ddgg          }	d	|d
<   |                     dt          |t          j                  |	t          ||||          t                     S )  
        Create Skill

        Args:
          display_title: Display title for the skill.

              This is a human-readable label that is not included in the prompt sent to the
              model.

          files: Files to upload for the skill.

              All files must be in the same top-level directory and must include a SKILL.md
              file at the root of that directory.

          betas: Optional header to specify the beta version(s) you want to use.

          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
        anthropic-beta,c              3  4   K   | ]}t          |          V  d S r6   str.0es     r:   	<genexpr>z Skills.create.<locals>.<genexpr>u   (      5L5Lc!ff5L5L5L5L5L5Lr<   skills-2025-10-02rF   rG   rG   <array>pathsmultipart/form-dataContent-Type/v1/skills?beta=truerI   rJ   rK   rL   bodyrG   optionscast_to)r   r   joinr   r   r   r   r   r   rZ   object_postr   r)   SkillCreateParamsr+   r.   
r9   rF   rG   rH   rI   rJ   rK   rL   rj   extracted_filess
             r:   createzSkills.createM   s:   J	
$'#chhu5L5Le5L5L5LObNc/d/d&e&e&e" 	
 "	
 *+>X=CVTVX!. 
 
 (WS&[-A4(H(HRY[dQePfggg )>n%zz" ':'LMM!(+Q[el   (  
 
 	
r<   rH   rI   rJ   rK   rL   skill_idrZ   r0   c          
     P   |st          d|          i t          dt          |          r.d                    t	          d |D             dg                    nt
          i          |pi }ddi|pi }|                     d| dt          ||||          t          	          S )
  
        Get Skill

        Args:
          skill_id: Unique identifier for the skill.

              The format and length of IDs may change over time.

          betas: Optional header to specify the beta version(s) you want to use.

          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
        7Expected a non-empty value for `skill_id` but received rV   rW   c              3  4   K   | ]}t          |          V  d S r6   rY   r[   s     r:   r^   z"Skills.retrieve.<locals>.<genexpr>   r_   r<   r`   /v1/skills/
?beta=truerh   rk   rl   	
ValueErrorr   r   rm   r   r   _getr+   r0   r9   ru   rH   rI   rJ   rK   rL   s          r:   retrievezSkills.retrieve   s    <  	ecW_ccddd	
$'#chhu5L5Le5L5L5LObNc/d/d&e&e&e" 	
 "	
 *+>X=CVTVXyy.(...(+Q[el   *  
 
 	
r<   limitpagesourcerH   rI   rJ   rK   rL   r   
int | Omitr   r   !SyncPageCursor[SkillListResponse]c               |   i t          dt          |          r.d                    t          d |D             dg                    nt          i          |pi }ddi|pi }|                     dt          t                   t          ||||t          |||dt          j                            t                    S )	  
        List Skills

        Args:
          limit: Number of results to return per page.

              Maximum value is 100. Defaults to 20.

          page: Pagination token for fetching a specific page of results.

              Pass the value from a previous response's `next_page` field to get the next page
              of results.

          source: Filter skills by source.

              If provided, only skills from the specified source will be returned:

              - `"custom"`: only return user-created skills
              - `"anthropic"`: only return Anthropic-created skills

          betas: Optional header to specify the beta version(s) you want to use.

          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
        rV   rW   c              3  4   K   | ]}t          |          V  d S r6   rY   r[   s     r:   r^   zSkills.list.<locals>.<genexpr>   r_   r<   r`   rg   r   r   r   rI   rJ   rK   rL   queryr   rk   model)r   r   rm   r   r   _get_api_listr&   r-   r+   r   r(   SkillListParams	r9   r   r   r   rH   rI   rJ   rK   rL   s	            r:   listzSkills.list   s    X	
$'#chhu5L5Le5L5L5LObNc/d/d&e&e&e" 	
 "	
 *+>X=CVTVX!!" 12(+'%%!& $"( 
 &5    $# " 
 
 	
r<   r/   c          
     P   |st          d|          i t          dt          |          r.d                    t	          d |D             dg                    nt
          i          |pi }ddi|pi }|                     d| dt          ||||          t          	          S )

  
        Delete Skill

        Args:
          skill_id: Unique identifier for the skill.

              The format and length of IDs may change over time.

          betas: Optional header to specify the beta version(s) you want to use.

          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
        rx   rV   rW   c              3  4   K   | ]}t          |          V  d S r6   rY   r[   s     r:   r^   z Skills.delete.<locals>.<genexpr>3  r_   r<   r`   rz   r{   rh   r|   	r~   r   r   rm   r   r   _deleter+   r/   r   s          r:   deletezSkills.delete  s    <  	ecW_ccddd	
$'#chhu5L5Le5L5L5LObNc/d/d&e&e&e" 	
 "	
 *+>X=CVTVX||.(...(+Q[el   (  
 
 	
r<   )r4   r   )r4   r=   )r4   rA   rF   rM   rG   rN   rH   rO   rI   rP   rJ   rQ   rK   rR   rL   rS   r4   r.   ru   rZ   rH   rO   rI   rP   rJ   rQ   rK   rR   rL   rS   r4   r0   )r   r   r   rM   r   rM   rH   rO   rI   rP   rJ   rQ   rK   rR   rL   rS   r4   r   ru   rZ   rH   rO   rI   rP   rJ   rQ   rK   rR   rL   rS   r4   r/   __name__
__module____qualname__r!   r;   r@   rD   r   r   rs   r   r   r    r<   r:   r1   r1   5   sT       & & & _& + + + _+ 1 1 1 _1 /3<@15 )-$("&;DC
 C
 C
 C
 C
 C
R 26 )-$("&;D1
 1
 1
 1
 1
 1
l !%)'+15 )-$("&;DI
 I
 I
 I
 I
 I
^ 26 )-$("&;D1
 1
 1
 1
 1
 1
 1
 1
r<   c            	          e Zd Zed(d            Zed)d            Zed*d            Zeeeddded	d+dZ	edddedd,dZ
eeeedddedd-d%Zedddedd.d'ZdS )/r2   r4   r   c                *    t          | j                  S r6   )r   r7   r8   s    r:   r;   zAsyncSkills.versionsE  s    T\***r<   AsyncSkillsWithRawResponsec                     t          |           S r?   )r   r8   s    r:   r@   zAsyncSkills.with_raw_responseI  s     *$///r<    AsyncSkillsWithStreamingResponsec                     t          |           S rC   )r   r8   s    r:   rD   z#AsyncSkills.with_streaming_responseS  s     0555r<   NrE   rF   rM   rG   rN   rH   rO   rI   rP   rJ   rQ   rK   rR   rL   rS   r.   c                 K   i t          dt          |          r.d                    t          d |D             dg                    nt          i          |pi }ddi|pi }t          ||d          }t          t          t          t          t          f         |          ddgg          }	d	|d
<   |                     dt          |t          j                   d{V |	t          ||||          t                      d{V S )rU   rV   rW   c              3  4   K   | ]}t          |          V  d S r6   rY   r[   s     r:   r^   z%AsyncSkills.create.<locals>.<genexpr>  r_   r<   r`   ra   rG   rb   rc   re   rf   rg   Nrh   ri   )r   r   rm   r   r   r   r   r   r   rZ   rn   ro   r    r)   rp   r+   r.   rq   s
             r:   rs   zAsyncSkills.create\  sn     J	
$'#chhu5L5Le5L5L5LObNc/d/d&e&e&e" 	
 "	
 *+>X=CVTVX!. 
 
 (WS&[-A4(H(HRY[dQePfggg )>n%ZZ",T3F3XYYYYYYYY!(+Q[el   (   
 
 
 
 
 
 
 
 	
r<   rt   ru   rZ   r0   c          
     `  K   |st          d|          i t          dt          |          r.d                    t	          d |D             dg                    nt
          i          |pi }ddi|pi }|                     d| dt          ||||          t          	           d
{V S )rw   rx   rV   rW   c              3  4   K   | ]}t          |          V  d S r6   rY   r[   s     r:   r^   z'AsyncSkills.retrieve.<locals>.<genexpr>  r_   r<   r`   rz   r{   rh   r|   Nr}   r   s          r:   r   zAsyncSkills.retrieve  s     <  	ecW_ccddd	
$'#chhu5L5Le5L5L5LObNc/d/d&e&e&e" 	
 "	
 *+>X=CVTVXYY.(...(+Q[el   *  
 
 
 
 
 
 
 
 	
r<   r   r   r   r   r   EAsyncPaginator[SkillListResponse, AsyncPageCursor[SkillListResponse]]c               |   i t          dt          |          r.d                    t          d |D             dg                    nt          i          |pi }ddi|pi }|                     dt          t                   t          ||||t          |||dt          j                            t                    S )	r   rV   rW   c              3  4   K   | ]}t          |          V  d S r6   rY   r[   s     r:   r^   z#AsyncSkills.list.<locals>.<genexpr>  r_   r<   r`   rg   r   r   r   )r   r   rm   r   r   r   r'   r-   r+   r   r(   r   r   s	            r:   r   zAsyncSkills.list  s    X	
$'#chhu5L5Le5L5L5LObNc/d/d&e&e&e" 	
 "	
 *+>X=CVTVX!!" !23(+'%%!& $"( 
 &5    $# " 
 
 	
r<   r/   c          
     `  K   |st          d|          i t          dt          |          r.d                    t	          d |D             dg                    nt
          i          |pi }ddi|pi }|                     d| dt          ||||          t          	           d
{V S )r   rx   rV   rW   c              3  4   K   | ]}t          |          V  d S r6   rY   r[   s     r:   r^   z%AsyncSkills.delete.<locals>.<genexpr>B  r_   r<   r`   rz   r{   rh   r|   Nr   r   s          r:   r   zAsyncSkills.delete  s     <  	ecW_ccddd	
$'#chhu5L5Le5L5L5LObNc/d/d&e&e&e" 	
 "	
 *+>X=CVTVX\\.(...(+Q[el   ( " 
 
 
 
 
 
 
 
 	
r<   )r4   r   )r4   r   )r4   r   r   r   )r   r   r   rM   r   rM   rH   rO   rI   rP   rJ   rQ   rK   rR   rL   rS   r4   r   r   r   r   r<   r:   r2   r2   D  sT       + + + _+ 0 0 0 _0 6 6 6 _6 /3<@15 )-$("&;DC
 C
 C
 C
 C
 C
R 26 )-$("&;D1
 1
 1
 1
 1
 1
l !%)'+15 )-$("&;DI
 I
 I
 I
 I
 I
^ 26 )-$("&;D1
 1
 1
 1
 1
 1
 1
 1
r<   c                  .    e Zd Zd	dZed
d            ZdS )r=   skillsr1   r4   Nonec                   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r6   )_skillsr
   to_raw_response_wrapperrs   r   r   r   r9   r   s     r:   __init__zSkillsWithRawResponse.__init__T  sw    &>M
 
 )@O
 
 %<K
 
	 '>M
 
r<   r   c                4    t          | j        j                  S r6   )r   r   r;   r8   s    r:   r;   zSkillsWithRawResponse.versionsd  s    &t|'<===r<   Nr   r1   r4   r   )r4   r   r   r   r   r   r!   r;   r   r<   r:   r=   r=   S  sH        
 
 
 
  > > > _> > >r<   r=   c                  .    e Zd Zd	dZed
d            ZdS )r   r   r2   r4   r   c                   || _         t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        t          j        |j                  | _        d S r6   )r   r
   async_to_raw_response_wrapperrs   r   r   r   r   s     r:   r   z#AsyncSkillsWithRawResponse.__init__j  sw    &DM
 
 )FO
 
 %BK
 
	 'DM
 
r<   r   c                4    t          | j        j                  S r6   )r   r   r;   r8   s    r:   r;   z#AsyncSkillsWithRawResponse.versionsz  s    +DL,ABBBr<   Nr   r2   r4   r   )r4   r   r   r   r<   r:   r   r   i  sN        
 
 
 
  C C C _C C Cr<   r   c                  .    e Zd Zd	dZed
d            ZdS )rA   r   r1   r4   r   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r6   )r   r$   rs   r   r   r   r   s     r:   r   z$SkillsWithStreamingResponse.__init__  sk    2M
 
 5O
 
 1K
 
	 3M
 
r<   r   c                4    t          | j        j                  S r6   )r   r   r;   r8   s    r:   r;   z$SkillsWithStreamingResponse.versions  s    ,T\-BCCCr<   Nr   )r4   r   r   r   r<   r:   rA   rA     sN        
 
 
 
  D D D _D D Dr<   rA   c                  .    e Zd Zd	dZed
d            ZdS )r   r   r2   r4   r   c                    || _         t          |j                  | _        t          |j                  | _        t          |j                  | _        t          |j                  | _        d S r6   )r   r%   rs   r   r   r   r   s     r:   r   z)AsyncSkillsWithStreamingResponse.__init__  sk    8M
 
 ;O
 
 7K
 
	 9M
 
r<   r   c                4    t          | j        j                  S r6   )r   r   r;   r8   s    r:   r;   z)AsyncSkillsWithStreamingResponse.versions  s    1$,2GHHHr<   Nr   )r4   r   r   r   r<   r:   r   r     sN        
 
 
 
  I I I _I I Ir<   r   )F
__future__r   typingr   r   r   r   	itertoolsr   httpx r
   r;   r   r   r   r   r   r   _typesr   r   r   r   r   r   r   r   r   _utilsr   r   r   r   r   r    _compatr!   	_resourcer"   r#   	_responser$   r%   
paginationr&   r'   
types.betar(   r)   _base_clientr*   r+   types.anthropic_beta_paramr,   types.beta.skill_list_responser-    types.beta.skill_create_responser.    types.beta.skill_delete_responser/   "types.beta.skill_retrieve_responser0   __all__r1   r2   r=   r   rA   r   r   r<   r:   <module>r      s   # " " " " " 0 0 0 0 0 0 0 0 0 0 0 0        ! ! ! ! ! !               
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                ( ' ' ' ' ' ; ; ; ; ; ; ; ; Z Z Z Z Z Z Z Z : : : : : : : : A A A A A A A A A A A A A A A A = = = = = = @ @ @ @ @ @ D D D D D D D D D D D D H H H H H H]
#L
 L
 L
 L
 L
_ L
 L
 L
^L
 L
 L
 L
 L
" L
 L
 L
^> > > > > > > >,C C C C C C C C,D D D D D D D D,I I I I I I I I I Ir<   