
    pia                       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!      ZEy)"    )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y)r1   c                ,    t        | j                        S N)r   _clientselfs    h/opt/services/ai/voice_agent/venv/lib/python3.12/site-packages/anthropic/resources/beta/skills/skills.pyversionszSkills.versions6   s    %%    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/anthropics/anthropic-sdk-python#accessing-raw-response-data-eg-headers
        )SkillsWithRawResponser7   s    r9   with_raw_responsezSkills.with_raw_response:   s     %T**r;   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/anthropics/anthropic-sdk-python#with_streaming_response
        )SkillsWithStreamingResponser7   s    r9   with_streaming_responsezSkills.with_streaming_responseD   s     +400r;   Ndisplay_titlefilesbetasextra_headersextra_query
extra_bodytimeoutc                  i t        dt        |      r#dj                  t        d |D        dg            nt        i      |xs i }ddi|xs i }t        ||d      }t        t        t        t        t        f   |      ddgg      }	d	|d
<   | j                  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  2   K   | ]  }t        |        y wr5   str.0es     r9   	<genexpr>z Skills.create.<locals>.<genexpr>u        5Lc!f5L   skills-2025-10-02rE   rF   rF   <array>pathsmultipart/form-dataContent-Type/v1/skills?beta=truerH   rI   rJ   rK   bodyrF   optionscast_to)r   r   joinr   r   r   r   r   r   rR   object_postr   r)   SkillCreateParamsr+   r.   
r8   rE   rF   rG   rH   rI   rJ   rK   rc   extracted_filess
             r9   createzSkills.createM   s    J	
$ '*hhu5Le5LObNc/d&e"	
 "	
 *+>X=CVTVX!.
 (WS&[-A4(HRY[dQePfg )>n%zz" ':'L'LM!(+Q[el (  
 	
r;   rG   rH   rI   rJ   rK   c          
        |st        d|      i t        dt        |      r#dj                  t	        d |D        dg            nt
        i      |xs i }ddi|xs i }| j                  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 rN   rO   c              3  2   K   | ]  }t        |        y wr5   rQ   rS   s     r9   rV   z"Skills.retrieve.<locals>.<genexpr>   rW   rX   rY   /v1/skills/
?beta=truera   rd   re   	
ValueErrorr   r   rf   r   r   _getr+   r0   r8   skill_idrG   rH   rI   rJ   rK   s          r9   retrievezSkills.retrieve   s    < VW_Vbcdd	
$ '*hhu5Le5LObNc/d&e"	
 "	
 *+>X=CVTVXyy(:.(+Q[el *  
 	
r;   limitpagesourcerG   rH   rI   rJ   rK   c               @   i t        dt        |      r#dj                  t        d |D        dg            nt        i      |xs i }ddi|xs i }| j                  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
        rN   rO   c              3  2   K   | ]  }t        |        y wr5   rQ   rS   s     r9   rV   zSkills.list.<locals>.<genexpr>   rW   rX   rY   r`   r|   r}   r~   rH   rI   rJ   rK   queryr}   rd   model)r   r   rf   r   r   _get_api_listr&   r-   r+   r   r(   SkillListParams	r8   r|   r}   r~   rG   rH   rI   rJ   rK   s	            r9   listzSkills.list   s    X	
$ '*hhu5Le5LObNc/d&e"	
 "	
 *+>X=CVTVX!!" 12(+'%%!& $"(
 &55 $# " 
 	
r;   c          
        |st        d|      i t        dt        |      r#dj                  t	        d |D        dg            nt
        i      |xs i }ddi|xs i }| j                  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
        rp   rN   rO   c              3  2   K   | ]  }t        |        y wr5   rQ   rS   s     r9   rV   z Skills.delete.<locals>.<genexpr>3  rW   rX   rY   rr   rs   ra   rt   	rv   r   r   rf   r   r   _deleter+   r/   rx   s          r9   deletezSkills.delete  s    < VW_Vbcdd	
$ '*hhu5Le5LObNc/d&e"	
 "	
 *+>X=CVTVX||(:.(+Q[el (  
 	
r;   )returnr   )r   r>   )r   rB   rE   Optional[str] | OmitrF   z*Optional[SequenceNotStr[FileTypes]] | OmitrG   List[AnthropicBetaParam] | OmitrH   Headers | NonerI   Query | NonerJ   Body | NonerK   'float | httpx.Timeout | None | NotGivenr   r.   ry   rR   rG   r   rH   r   rI   r   rJ   r   rK   r   r   r0   )r|   
int | Omitr}   r   r~   r   rG   r   rH   r   rI   r   rJ   r   rK   r   r   z!SyncPageCursor[SkillListResponse]ry   rR   rG   r   rH   r   rI   r   rJ   r   rK   r   r   r/   __name__
__module____qualname__r!   r:   r?   rC   r   r   rl   rz   r   r    r;   r9   r1   r1   5   s   & & + + 1 1 /3<@15 )-$("&;DC
 ,C
 :	C

 /C
 &C
 "C
  C
 9C
 
C
R 26 )-$("&;D1
1
 /	1
 &1
 "1
  1
 91
 
1
l !%)'+15 )-$("&;DI
 I
 #	I

 %I
 /I
 &I
 "I
  I
 9I
 
+I
^ 26 )-$("&;D1
1
 /	1
 &1
 "1
  1
 9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y)r2   c                ,    t        | j                        S r5   )r   r6   r7   s    r9   r:   zAsyncSkills.versionsE  s    T\\**r;   c                    t        |       S r=   )AsyncSkillsWithRawResponser7   s    r9   r?   zAsyncSkills.with_raw_responseI  s     *$//r;   c                    t        |       S rA   ) AsyncSkillsWithStreamingResponser7   s    r9   rC   z#AsyncSkills.with_streaming_responseS  s     055r;   NrD   c                 K   i t        dt        |      r#dj                  t        d |D        dg            nt        i      |xs i }ddi|xs i }t        ||d      }t        t        t        t        t        f   |      ddgg      }	d	|d
<   | j                  dt        |t        j                         d{   |	t        ||||      t                d{   S 7 %7 w)rM   rN   rO   c              3  2   K   | ]  }t        |        y wr5   rQ   rS   s     r9   rV   z%AsyncSkills.create.<locals>.<genexpr>  rW   rX   rY   rZ   rF   r[   r\   r^   r_   r`   Nra   rb   )r   r   rf   r   r   r   r   r   r   rR   rg   rh   r    r)   ri   r+   r.   rj   s
             r9   rl   zAsyncSkills.create\  s    J	
$ '*hhu5Le5LObNc/d&e"	
 "	
 *+>X=CVTVX!.
 (WS&[-A4(HRY[dQePfg )>n%ZZ",T3F3X3XYY!(+Q[el (   
 
 	
Y
s$   B9C%;C!
< C%C#C%#C%rm   c          
     2  K   |st        d|      i t        dt        |      r#dj                  t	        d |D        dg            nt
        i      |xs i }ddi|xs i }| j                  d| dt        ||||      t        	       d
{   S 7 w)ro   rp   rN   rO   c              3  2   K   | ]  }t        |        y wr5   rQ   rS   s     r9   rV   z'AsyncSkills.retrieve.<locals>.<genexpr>  rW   rX   rY   rr   rs   ra   rt   Nru   rx   s          r9   rz   zAsyncSkills.retrieve  s     < VW_Vbcdd	
$ '*hhu5Le5LObNc/d&e"	
 "	
 *+>X=CVTVXYY(:.(+Q[el *  
 
 	
 
   BBBBr{   c               @   i t        dt        |      r#dj                  t        d |D        dg            nt        i      |xs i }ddi|xs i }| j                  dt        t           t        ||||t        |||dt        j                              t              S )	r   rN   rO   c              3  2   K   | ]  }t        |        y wr5   rQ   rS   s     r9   rV   z#AsyncSkills.list.<locals>.<genexpr>  rW   rX   rY   r`   r   r   r   )r   r   rf   r   r   r   r'   r-   r+   r   r(   r   r   s	            r9   r   zAsyncSkills.list  s    X	
$ '*hhu5Le5LObNc/d&e"	
 "	
 *+>X=CVTVX!!" !23(+'%%!& $"(
 &55 $# " 
 	
r;   c          
     2  K   |st        d|      i t        dt        |      r#dj                  t	        d |D        dg            nt
        i      |xs i }ddi|xs i }| j                  d| dt        ||||      t        	       d
{   S 7 w)r   rp   rN   rO   c              3  2   K   | ]  }t        |        y wr5   rQ   rS   s     r9   rV   z%AsyncSkills.delete.<locals>.<genexpr>B  rW   rX   rY   rr   rs   ra   rt   Nr   rx   s          r9   r   zAsyncSkills.delete  s     < VW_Vbcdd	
$ '*hhu5Le5LObNc/d&e"	
 "	
 *+>X=CVTVX\\(:.(+Q[el ( " 
 
 	
 
r   )r   r   )r   r   )r   r   r   r   )r|   r   r}   r   r~   r   rG   r   rH   r   rI   r   rJ   r   rK   r   r   zEAsyncPaginator[SkillListResponse, AsyncPageCursor[SkillListResponse]]r   r   r   r;   r9   r2   r2   D  s   + + 0 0 6 6 /3<@15 )-$("&;DC
 ,C
 :	C

 /C
 &C
 "C
  C
 9C
 
C
R 26 )-$("&;D1
1
 /	1
 &1
 "1
  1
 91
 
1
l !%)'+15 )-$("&;DI
 I
 #	I

 %I
 /I
 &I
 "I
  I
 9I
 
OI
^ 26 )-$("&;D1
1
 /	1
 &1
 "1
  1
 91
 
1
r;   c                  &    e Zd ZddZedd       Zy)r>   c                2   || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        t        j                  |j                        | _        y r5   )_skillsr
   to_raw_response_wrapperrl   rz   r   r   r8   skillss     r9   __init__zSkillsWithRawResponse.__init__T  ss    &>>MM
 )@@OO
 %<<KK
	 '>>MM
r;   c                @    t        | j                  j                        S r5   )r   r   r:   r7   s    r9   r:   zSkillsWithRawResponse.versionsd  s    &t||'<'<==r;   Nr   r1   r   None)r   r   r   r   r   r   r!   r:   r   r;   r9   r>   r>   S  s    
  > >r;   r>   c                  &    e Zd ZddZedd       Zy)r   c                2   || _         t        j                  |j                        | _        t        j                  |j                        | _        t        j                  |j
                        | _        t        j                  |j                        | _        y r5   )r   r
   async_to_raw_response_wrapperrl   rz   r   r   r   s     r9   r   z#AsyncSkillsWithRawResponse.__init__j  ss    &DDMM
 )FFOO
 %BBKK
	 'DDMM
r;   c                @    t        | j                  j                        S r5   )r   r   r:   r7   s    r9   r:   z#AsyncSkillsWithRawResponse.versionsz  s    +DLL,A,ABBr;   Nr   r2   r   r   )r   r   r   r   r;   r9   r   r   i  s    
  C Cr;   r   c                  &    e Zd ZddZedd       Zy)rB   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r5   )r   r$   rl   rz   r   r   r   s     r9   r   z$SkillsWithStreamingResponse.__init__  s[    2MM
 5OO
 1KK
	 3MM
r;   c                @    t        | j                  j                        S r5   )r   r   r:   r7   s    r9   r:   z$SkillsWithStreamingResponse.versions  s    ,T\\-B-BCCr;   Nr   )r   r   r   r   r;   r9   rB   rB     s    
  D Dr;   rB   c                  &    e Zd ZddZedd       Zy)r   c                    || _         t        |j                        | _        t        |j                        | _        t        |j                        | _        t        |j
                        | _        y r5   )r   r%   rl   rz   r   r   r   s     r9   r   z)AsyncSkillsWithStreamingResponse.__init__  s[    8MM
 ;OO
 7KK
	 9MM
r;   c                @    t        | j                  j                        S r5   )r   r   r:   r7   s    r9   r:   z)AsyncSkillsWithStreamingResponse.versions  s    1$,,2G2GHHr;   Nr   )r   r   r   r   r;   r9   r   r     s    
  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   rB   r   r   r;   r9   <module>r      s    # 0 0   ! 
 
 
  ( ; Z : A A = @ D D H]
#L
_ L
^L
" L
^> >,C C,D D,I Ir;   