+
    ^eòjsy  ã                  ó¼  a € 0 t $ ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	 ^ RI
HtHtHtHtHtHtHtHtHtHt ^ RIHtHtHtHt ^ RIt^ RIt^ RIt^RIHt ^RIH t H!t!H"t"H#t#H$t$ ^RI%H&t&H't'H(t( ^R	I)H*t*H+t+ ^R
I,H-t-H.t.H/t/H0t0 ^RI1H2t2H3t3 ^RI4H5t5H6t6 ]'       d   ^RI%H7t7 ^RI8H9t9 ]! R4      t:]! R4      t;]! R4      t<]! RRR7      t=]! RRR7      t>]P~                  ! ]@4      tAR]BR&    ! R R]];,          4      tC ! R R]C];,          4      tD ! R R]C];,          4      tE ! R R ]D]F,          4      tG ! R! R"]E]F,          4      tH ! R# R$]D]F,          4      tI ! R% R&]E]F,          4      tJ ! R' R(]K4      tL ! R) R*]24      tM ! R+ R,]]=,          4      tN ! R- R.]]>,          4      tOR/ R0 ltPR1 R2 ltQR3 R4 ltRR5 R6 ltSR7 R8 ltTR9 R: ltUR; R< ltVR= R> ltWR? R@ ltXR# )Aé    )ÚannotationsN)ÚTracebackType)
ÚTYPE_CHECKINGÚAnyÚUnionÚGenericÚTypeVarÚCallableÚIteratorÚAsyncIteratorÚcastÚoverload)Ú	AwaitableÚ	ParamSpecÚoverrideÚ
get_origin)ÚNoneType)Úis_givenÚextract_type_argÚis_annotated_typeÚis_type_alias_typeÚextract_type_var_from_base)Ú	BaseModelÚis_basemodelÚadd_response_ids)ÚRAW_RESPONSE_HEADERÚOVERRIDE_CAST_TO_HEADER)ÚStreamÚAsyncStreamÚis_stream_class_typeÚextract_stream_chunk_type)ÚAnthropicErrorÚAPIResponseValidationError)ÚJSONLDecoderÚAsyncJSONLDecoder)ÚFinalRequestOptions)Ú
BaseClientÚPÚRÚ_TÚ_APIResponseTzAPIResponse[Any])ÚboundÚ_AsyncAPIResponseTzAsyncAPIResponse[Any]zlogging.LoggerÚlogc                  óX  € ] tR t^1t$ R]R&   R]R&   R]R&   R]R&   R	]R
&   R]R&   R]R&   R]R&    R^ /R R llt]R R l4       t]R R l4       t]R R l4       t	]R R l4       t
]R R l4       t]R R l4       t]R R  l4       t]R! R" l4       t]R# R$ l4       tR%R&/R' R( lltR)tR&# )*ÚBaseAPIResponseútype[R]Ú_cast_toúBaseClient[Any, Any]Ú_clientzdict[type[Any], Any]Ú_parsed_by_typeÚboolÚ_is_sse_streamú1type[Stream[Any]] | type[AsyncStream[Any]] | NoneÚ_stream_clsr&   Ú_optionsúhttpx.ResponseÚhttp_responseÚintÚretries_takenc               ó8   € V ^8„  d   QhRRRRRRRRR	R
RRRRRR/# )é   Úrawr;   Úcast_tor1   Úclientr3   Ústreamr6   Ú
stream_clsr8   Úoptionsr&   r>   r=   ÚreturnÚNone© )Úformats   "ÚŠ/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/anthropic/_response.pyÚ__annotate__ÚBaseAPIResponse.__annotate__>   s]   € ÷ +ñ +ð ð+ð ð	+ð
 %ð+ð ð+ð Fð+ð %ð+ð ð+ð 
ñ+ó    c               	óh   € W n         W0n        / V n        W@n        WPn        W`n        Wn        Wpn        R # ©N)r2   r4   r5   r7   r9   r:   r<   r>   )ÚselfrA   rB   rC   rD   rE   rF   r>   s   &$$$$$$$rK   Ú__init__ÚBaseAPIResponse.__init__>   s3   € ð  ŒØŒØ!ˆÔØ$ÔØ%ÔØŒØ ÔØ*ÖrN   c               ó   € V ^8„  d   QhRR/# )r@   rG   zhttpx.HeadersrI   )rJ   s   "rK   rL   rM   S   s   € ÷ *ñ *˜ñ *rN   c                	ó.   € V P                   P                  # rP   )r<   Úheaders©rQ   s   &rK   rV   ÚBaseAPIResponse.headersR   s   € à×!Ñ!×)Ñ)Ð)rN   c               ó   € V ^8„  d   QhRR/# )r@   rG   zhttpx.RequestrI   )rJ   s   "rK   rL   rM   W   s   € ÷ *ñ *˜mñ *rN   c                ó.   € V P                   P                  # )zHReturns the httpx Request instance associated with the current response.)r<   ÚrequestrW   s   &rK   Úhttp_requestÚBaseAPIResponse.http_requestV   ó   € ð ×!Ñ!×)Ñ)Ð)rN   c               ó   € V ^8„  d   QhRR/# )r@   rG   r=   rI   )rJ   s   "rK   rL   rM   \   s   € ÷ .ñ .˜Sñ .rN   c                	ó.   € V P                   P                  # rP   )r<   Ústatus_coderW   s   &rK   ra   ÚBaseAPIResponse.status_code[   s   € à×!Ñ!×-Ñ-Ð-rN   c               ó   € V ^8„  d   QhRR/# )r@   rG   z	httpx.URLrI   )rJ   s   "rK   rL   rM   `   s   € ÷ &ñ &�Yñ &rN   c                ó.   € V P                   P                  # )z/Returns the URL for which the request was made.)r<   ÚurlrW   s   &rK   re   ÚBaseAPIResponse.url_   s   € ð ×!Ñ!×%Ñ%Ð%rN   c               ó   € V ^8„  d   QhRR/# ©r@   rG   ÚstrrI   )rJ   s   "rK   rL   rM   e   s   € ÷ (ñ (˜ñ (rN   c                	ó.   € V P                   P                  # rP   )r\   ÚmethodrW   s   &rK   rk   ÚBaseAPIResponse.methodd   s   € à× Ñ ×'Ñ'Ð'rN   c               ó   € V ^8„  d   QhRR/# rh   rI   )rJ   s   "rK   rL   rM   i   s   € ÷ /ñ /˜cñ /rN   c                	ó.   € V P                   P                  # rP   )r<   Úhttp_versionrW   s   &rK   ro   ÚBaseAPIResponse.http_versionh   s   € à×!Ñ!×.Ñ.Ð.rN   c               ó   € V ^8„  d   QhRR/# )r@   rG   zdatetime.timedeltarI   )rJ   s   "rK   rL   rM   m   s   € ÷ *ñ *Ð+ñ *rN   c                ó.   € V P                   P                  # )zCThe time taken for the complete request/response cycle to complete.)r<   ÚelapsedrW   s   &rK   rs   ÚBaseAPIResponse.elapsedl   r^   rN   c               ó   € V ^8„  d   QhRR/# )r@   rG   r6   rI   )rJ   s   "rK   rL   rM   r   s   € ÷ ,ñ ,˜4ñ ,rN   c                ó.   € V P                   P                  # )zùWhether or not the response body has been closed.

If this is False then there is response data that has not been read yet.
You must either fully consume the response body or call `.close()`
before discarding the response to prevent resource leaks.
)r<   Ú	is_closedrW   s   &rK   rw   ÚBaseAPIResponse.is_closedq   s   € ð ×!Ñ!×+Ñ+Ð+rN   c               ó   € V ^8„  d   QhRR/# rh   rI   )rJ   s   "rK   rL   rM   |   s   € ÷ 
ñ 
˜#ñ 
rN   c           	     	ó˜   € R V P                   P                   RV P                   RV P                  P                   RV P
                   R2	# )Ú<z [Ú z] type=Ú>)Ú	__class__Ú__name__ra   r<   Úreason_phraser2   rW   s   &rK   Ú__repr__ÚBaseAPIResponse.__repr__{   sP   € ð �—‘×'Ñ'Ð(¨¨4×+;Ñ+;Ð*<¸A¸d×>PÑ>P×>^Ñ>^Ð=_Ð_fÐgk×gtÑgtÐfuÐuvÐwð	
rN   ÚtoNc               ó    € V ^8„  d   QhRRRR/# ©r@   rƒ   ztype[_T] | NonerG   zR | _TrI   )rJ   s   "rK   rL   rM   �   s   € ÷ i
ñ i
˜Oð i
°vñ i
rN   c               	óŽ  € Ve   TMV P                   p\        V4      '       d   VP                  pV'       d   \        V4      '       d   \	        V^ 4      p\        V4      ;'       g    Tp\        P                  ! V4      '       dë   \        \        \        V4      \        4      '       dR   \        \        \        RV4      ! V P                  P                  ^@R7      \	        V^ 4      V P                  R7      4      # \        \        \        V4      \        4      '       dR   \        \        \        RV4      ! V P                  P!                  ^@R7      \	        V^ 4      V P                  R7      4      # V P"                  '       Edl   V'       d|   \%        V4      '       g   \'        R\(         R\*         24      h\        \,        V! \/        VRR7      V P                  \        \        V P0                  4      V P2                  R	7      4      # V P4                  '       dc   \        \        V P5                  \/        V P4                  4      V P                  \        \        V P0                  4      V P2                  R	7      4      # \        R
V P0                  P6                  4      pVf   \9        4       h\        \        V! VV P                  \        \        V P0                  4      V P2                  R	7      4      # V\:        J d   \        \        R 4      # V P                  pV\<        8X  d   \        \        VP>                  4      # V\@        8X  d   \        \        VPB                  4      # V\D        8X  d$   \        \        \E        VP>                  4      4      # V\F        8X  d$   \        \        \G        VP>                  4      4      # V\H        8X  d,   \        \        VP>                  PK                  4       R8H  4      # \        P                  ! V4      '       d(   VPL                  R8X  d   \        \        V! V4      4      # V\N        8X  d   \Q        R4      h\        P                  ! V4      '       dQ   \        V\R        PT                  4      '       d1   V\R        PT                  8w  d   \W        R4      h\        \        V4      # \        P                  ! V4      '       dB   \        V\X        4      '       g,   \        V\Z        PX                  4      '       d   \'        R4      hV\\        Jd   V\^        J gu   V\`        J gk   V\b        J ga   \        V\X        4      '       gK   \Q        RV R\X         R\`         R\^         R\b         R\:         R\<         R\R        PT                   R24      hVPd                  Pg                  RR4      Pi                  R4      vrgVPk                  R4      '       g…   \m        V4      '       d0    VPo                  4       pV P0                  Pq                  VVVR7      # V P0                  Pz                  '       d   \}        VRV R2VP>                  R7      hVP>                  # VPo                  4       pV P0                  Pq                  VVVR7      #   \r         d+   p	\t        Pw                  R\y        T	4      T	4        R p	?	L¢R p	?	ii ; i)Nztype[JSONLDecoder[Any]])Ú
chunk_size)Úraw_iteratorÚ	line_typer<   ztype[AsyncJSONLDecoder[Any]]z/Expected custom parse type to be a subclass of z or zUExpected custom stream type to be passed with a type argument, e.g. Stream[ChunkType])Úfailure_message)rB   ÚresponserC   rF   r8   ÚtrueÚHttpxBinaryResponseContentz+Unexpected state - cast_to is `APIResponse`z:Subclasses of httpx.Response cannot be passed to `cast_to`zYPydantic models must subclass our base model type, e.g. `from anthropic import BaseModel`zUnsupported type, expected z to be a subclass of z, Ú.zcontent-typeÚ*Ú;Újson)ÚdatarB   r‹   z5Could not read JSON from response data due to %s - %szMExpected Content-Type response header to be `application/json` but received `z
` instead.)r‹   ÚmessageÚbody)?r2   r   Ú	__value__r   r   r   ÚinspectÚisclassÚ
issubclassr   r   r$   r)   r<   Ú
iter_bytesr%   Úaiter_bytesr7   r    Ú	TypeErrorr   r   r*   r!   r4   r:   r9   Ú_default_stream_clsÚMissingStreamClassErrorr   ri   ÚtextÚbytesÚcontentr=   Úfloatr6   Úlowerr   ÚAPIResponseÚRuntimeErrorÚhttpxÚResponseÚ
ValueErrorr   ÚpydanticÚobjectÚlistÚdictr   rV   ÚgetÚsplitÚendswithr   r‘   Ú_process_response_dataÚ	Exceptionr.   ÚdebugÚtypeÚ_strict_response_validationr#   )
rQ   rƒ   rB   ÚoriginrE   r‹   Úcontent_typeÚ_r’   Úexcs
   &$        rK   Ú_parseÚBaseAPIResponse._parse�   sÅ  € Øš‘"¨D¯M©Mˆô ˜g×&Ò&Ø×'Ñ'ˆG÷ Ô(¨×1Ò1Ü& w°Ó2ˆGä˜GÓ$×/Ð/¨ˆä�?Š?˜6×"Ò"Üœ$œs FÓ+¬\×:Ò:ÜÜÜÐ2°GÔ<Ø%)×%7Ñ%7×%BÑ%BÈbÐ%BÓ%QÜ"2°7¸AÓ">Ø&*×&8Ñ&8ôóð ô œ$œs FÓ+Ô->×?Ò?ÜÜÜÐ7¸ÔAØ%)×%7Ñ%7×%CÑ%CÈrÐ%CÓ%RÜ"2°7¸AÓ">Ø&*×&8Ñ&8ôóð ð ××ÑßÜ+¨B×/Ò/Ü#Ð&UÔV\ÐU]Ð]aÔbmÐanÐ$oÓpÐpäÜÙÜ 9Øð -Dô!ð "&×!3Ñ!3Ü#¤C¨¯©Ó6Ø $§¡ôóð ð ××ÐÜÜØ×$Ñ$Ü 9¸$×:JÑ:JÓ KØ!%×!3Ñ!3Ü#¤C¨¯©Ó6Ø $§¡ð	 %ó óð ô ÐQÐSW×S_ÑS_×SsÑSsÓtˆJØÒ!Ü-Ó/Ð/äÜÙØ#Ø!×/Ñ/Ü¤ T§\¡\Ó2Ø ŸM™Mô	óð ð ”hÓÜœ˜4“=Ð à×%Ñ%ˆØ”cŒ>Üœ˜8Ÿ=™=Ó)Ð)à”eÔÜœ˜8×+Ñ+Ó,Ð,à”cŒ>Üœœ3˜xŸ}™}Ó-Ó.Ð.à”eÔÜœœ5 §¡Ó/Ó0Ð0à”dŒ?Üœ˜8Ÿ=™=×.Ñ.Ó0°FÑ:Ó;Ð;ô �?Š?˜7×#Ò#¨×(8Ñ(8Ð<XÔ(XÜœ™7 8Ó,Ó-Ð-à”[Ô ÜÐLÓMÐMä�?Š?Ø÷
ò 
ä˜¤§¡×0Ò0ð œ%Ÿ.™.Ô(Ü Ð#]Ó_Ð_Üœ˜8Ó$Ð$ô �OŠOØ÷ò ô ˜v¤y×1Ò1Ü˜6¤8×#5Ñ#5×6Ò6äÐwÓxÐxð œ6Ó!Øœd“NØœd“NØœe“OÜ˜v¤y×1Ò1äØ-¨g¨YÐ6KÌIÈ;ÐVXÔY]ÐX^Ð^`ÔaeÐ`fÐfhÔinÐhoÐoqÔrzÐq{Ð{}ô  Bð  ~Cð  CGô  HM÷  HVñ  HVð  GWð  WXð  Yóð ð $×+Ñ+×/Ñ/°ÀÓD×JÑJÈ3ÓOÐˆØ×$Ñ$ V×,Ò,Ü˜G×$Ò$ð	Ø#Ÿ=™=›?�Dð  Ÿ<™<×>Ñ>Ø!Ø 'Ø!)ð ?ó ð ð �|‰|×7×7Ð7Ü0Ø%ØkÐlxÐkyð  zDð  EØ!Ÿ™ôð ð —=‘=Ð à�}‰}‹ˆà�|‰|×2Ñ2ØØØð 3ó 
ð 	
øô/ !ô gÜ—I‘IÐUÔW[Ð\_ÓW`Ðbe×fÑfûðgús   ×/Z Ú[Ú Z?Ú?[)r2   r4   r7   r:   r5   r9   r<   r>   )r   Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotations__rR   ÚpropertyrV   r\   ra   re   rk   ro   rs   rw   r   r�   r¸   Ú__static_attributes__rI   rN   rK   r0   r0   1   s  ‡ ØÓØ!Ó!Ø)Ó)ØÓØBÓBØ!Ó!à!Ó!àÓØMð+ð ÷+ð( ô*ó ð*ð ô*ó ð*ð ô.ó ð.ð ô&ó ð&ð ô(ó ð(ð ô/ó ð/ð ô*ó ð*ð ô,ó ð,ð ô
ó ð
ð
i
¨d÷ i
ó i
rN   r0   c                  óÞ   € ] tR tRt]R R l4       t]R R l4       t]R R l4       t]R R	 l4       tR
R/R R lltR R lt	R R lt
R R ltR R ltRR R lltRR R lltR R ltRtR# )r£   i-  c               ó   € V ^8„  d   QhRR/# ©r@   rG   z
str | NonerI   )rJ   s   "rK   rL   ÚAPIResponse.__annotate__/  ó   € ÷ <ñ <˜Jñ <rN   c                	óL   € V P                   P                  P                  R 4      # ©z
request-id©r<   rV   r¬   rW   s   &rK   Ú
request_idÚAPIResponse.request_id.  ó   € à×!Ñ!×)Ñ)×-Ñ-¨lÓ;Ð;rN   c               ó   € V ^8„  d   QhRR/# rÂ   rI   )rJ   s   "rK   rL   rÃ   3  ó   € ÷ Hñ H˜jñ HrN   c                	óL   € V P                   P                  P                  R 4      # ©zanthropic-workspace-idrÇ   rW   s   &rK   Úworkspace_idÚAPIResponse.workspace_id2  ó    € à×!Ñ!×)Ñ)×-Ñ-Ð.FÓGÐGrN   c               ó    € V ^8„  d   QhRRRR/# ©r@   rƒ   ztype[_T]rG   r*   rI   )rJ   s   "rK   rL   rÃ   7  s   € ×/Ñ/˜8Ð/¨Ñ/rN   c               	ó   € R # rP   rI   ©rQ   rƒ   s   &$rK   ÚparseÚAPIResponse.parse6  s   € Ù,/rN   c               ó   € V ^8„  d   QhRR/# ©r@   rG   r)   rI   )rJ   s   "rK   rL   rÃ   :  s   € ×Ñ�qÑrN   c                	ó   € R # rP   rI   rW   s   &rK   rÖ   r×   9  s   € ÙrN   rƒ   Nc               ó    € V ^8„  d   QhRRRR/# r…   rI   )rJ   s   "rK   rL   rÃ   <  s   € ÷ .ñ .˜?ð .°fñ .rN   c               óú  € Ve   TMV P                   pV P                  P                  V4      pVe   V# V P                  '       g   V P	                  4        V P                  VR7      p\        V P                  P                  4      '       d   V P                  P                  V4      p\        V\        4      '       d"   \        W@P                  V P                  R7       W@P                  V&   \        \        V4      # )aä  Returns the rich python representation of this response's data.

For lower-level control, see `.read()`, `.json()`, `.iter_bytes()`.

You can customise the type that the response is parsed into through
the `to` argument, e.g.

```py
from anthropic import BaseModel


class MyModel(BaseModel):
    foo: str


obj = response.parse(to=MyModel)
print(obj.foo)
```

We support parsing:
  - `BaseModel`
  - `dict`
  - `list`
  - `Union`
  - `str`
  - `int`
  - `float`
  - `httpx.Response`
©rƒ   ©rÈ   rÏ   ©r2   r5   r¬   r7   Úreadr¸   r   r:   Úpost_parserÚ
isinstancer   r   rÈ   rÏ   r   r)   ©rQ   rƒ   Ú	cache_keyÚcachedÚparseds   &$   rK   rÖ   r×   <  s½   € ð< š.‘B¨d¯m©mˆ	Ø×%Ñ%×)Ñ)¨)Ó4ˆØÒØˆMà×"×"Ð"Ø�I‰IŒKà—‘ �Ó#ˆÜ�D—M‘M×-Ñ-×.Ò.Ø—]‘]×.Ñ.¨vÓ6ˆFä�fœi×(Ò(Ü˜V·±Èd×N_ÑN_Õ`à*0×Ñ˜YÑ'Ü”A�v‹ÐrN   c               ó   € V ^8„  d   QhRR/# ©r@   rG   rŸ   rI   )rJ   s   "rK   rL   rÃ   l  s   € ÷ 3ñ 3�eñ 3rN   c                óˆ   €  V P                   P                  4       #   \        P                   d   p\	        4       ThRp?ii ; i©z,Read and return the binary response content.N)r<   rà   r¥   ÚStreamConsumedÚStreamAlreadyConsumed©rQ   r·   s   & rK   rà   ÚAPIResponse.readl  s?   € ð	3Ø×%Ñ%×*Ñ*Ó,Ð,øÜ×#Ñ#ô 	3ô (Ó)¨sÐ2ûð		3ús   ‚ œA±<¼Ac               ó   € V ^8„  d   QhRR/# rh   rI   )rJ   s   "rK   rL   rÃ   v  s   € ÷ 'ñ '�cñ 'rN   c                óN   € V P                  4        V P                  P                  # )ú3Read and decode the response content into a string.©rà   r<   rž   rW   s   &rK   rž   ÚAPIResponse.textv  s   € à�	‰	ŒØ×!Ñ!×&Ñ&Ð&rN   c               ó   € V ^8„  d   QhRR/# ©r@   rG   r©   rI   )rJ   s   "rK   rL   rÃ   {  s   € ÷ )ñ )�fñ )rN   c                óV   € V P                  4        V P                  P                  4       # )ú*Read and decode the JSON response content.©rà   r<   r‘   rW   s   &rK   r‘   ÚAPIResponse.json{  s    € à�	‰	ŒØ×!Ñ!×&Ñ&Ó(Ð(rN   c               ó   € V ^8„  d   QhRR/# ©r@   rG   rH   rI   )rJ   s   "rK   rL   rÃ   €  s   € ÷ #ñ #�tñ #rN   c                ó:   € V P                   P                  4        R# ©zqClose the response and release the connection.

Automatically called if the response body is read to completion.
N)r<   ÚcloserW   s   &rK   rþ   ÚAPIResponse.close€  s   € ð
 	×Ñ× Ñ Ö"rN   c               ó    € V ^8„  d   QhRRRR/# )r@   r‡   ú
int | NonerG   zIterator[bytes]rI   )rJ   s   "rK   rL   rÃ   ‡  s   € ÷ ñ  Zð ¸?ñ rN   c              #  óZ   "  € V P                   P                  V4       F  pVx € K	  	  R# 5i©z|
A byte-iterator over the decoded response content.

This automatically handles gzip, deflate and brotli encoded responses.
N)r<   r™   ©rQ   r‡   Úchunks   && rK   r™   ÚAPIResponse.iter_bytes‡  s'   é € ð ×'Ñ'×2Ñ2°:Ö>ˆEØŒKó ?ùó   ‚)+c               ó    € V ^8„  d   QhRRRR/# )r@   r‡   r  rG   úIterator[str]rI   )rJ   s   "rK   rL   rÃ   �  s   € ÷ ñ  Jð ¸-ñ rN   c              #  óZ   "  € V P                   P                  V4       F  pVx € K	  	  R# 5i©z†A str-iterator over the decoded response content
that handles both gzip, deflate, etc but also detects the content's
string encoding.
N)r<   Ú	iter_textr  s   && rK   r  ÚAPIResponse.iter_text�  s'   é € ð
 ×'Ñ'×1Ñ1°*Ö=ˆEØŒKó >ùr  c               ó   € V ^8„  d   QhRR/# )r@   rG   r	  rI   )rJ   s   "rK   rL   rÃ   ˜  s   € ÷ ñ ˜Mñ rN   c              #  óX   "  € V P                   P                  4        F  pVx € K	  	  R# 5i©z;Like `iter_text()` but will only yield chunks for each lineN)r<   Ú
iter_lines©rQ   r  s   & rK   r  ÚAPIResponse.iter_lines˜  s#   é € à×'Ñ'×2Ñ2Ö4ˆEØŒKó 5ùs   ‚(*rI   rP   ©r   rº   r»   r¼   r¾   rÈ   rÏ   r   rÖ   rà   rž   r‘   rþ   r™   r  r  r¿   rI   rN   rK   r£   r£   -  s}   † Øô<ó ð<ð ôHó ðHð Ü/ó Ø/àÜó Øð.¨T÷ .õ`3õ'õ
)õ
#÷÷÷ñ rN   r£   c                  óÞ   € ] tR tRt]R R l4       t]R R l4       t]R R l4       t]R R	 l4       tR
R/R R lltR R lt	R R lt
R R ltR R ltRR R lltRR R lltR R ltRtR# )ÚAsyncAPIResponseiž  c               ó   € V ^8„  d   QhRR/# rÂ   rI   )rJ   s   "rK   rL   ÚAsyncAPIResponse.__annotate__   rÄ   rN   c                	óL   € V P                   P                  P                  R 4      # rÆ   rÇ   rW   s   &rK   rÈ   ÚAsyncAPIResponse.request_idŸ  rÊ   rN   c               ó   € V ^8„  d   QhRR/# rÂ   rI   )rJ   s   "rK   rL   r  ¤  rÌ   rN   c                	óL   € V P                   P                  P                  R 4      # rÎ   rÇ   rW   s   &rK   rÏ   ÚAsyncAPIResponse.workspace_id£  rÑ   rN   c               ó    € V ^8„  d   QhRRRR/# rÓ   rI   )rJ   s   "rK   rL   r  ¨  s   € ×5Ñ5 Ð5¨bÑ5rN   c             ƒ  	ó   "  € R # 5irP   rI   rÕ   s   &$rK   rÖ   ÚAsyncAPIResponse.parse§  s   é € Ù25ùó   ‚c               ó   € V ^8„  d   QhRR/# rÙ   rI   )rJ   s   "rK   rL   r  «  s   € ×#Ñ#˜QÑ#rN   c              ƒ  	ó   "  € R # 5irP   rI   rW   s   &rK   rÖ   r   ª  s   é € Ù #ùr!  rƒ   Nc               ó    € V ^8„  d   QhRRRR/# r…   rI   )rJ   s   "rK   rL   r  ­  s   € ÷ ,ñ , ð ,¸Fñ ,rN   c             ƒ  ó  "  € Ve   TMV P                   pV P                  P                  V4      pVe   V# V P                  '       g   V P	                  4       G Rj  x€L
  V P                  VR7      p\        V P                  P                  4      '       d   V P                  P                  V4      p\        V\        4      '       d"   \        W@P                  V P                  R7       W@P                  V&   \        \        V4      #  L«5i)aÎ  Returns the rich python representation of this response's data.

For lower-level control, see `.read()`, `.json()`, `.iter_bytes()`.

You can customise the type that the response is parsed into through
the `to` argument, e.g.

```py
from anthropic import BaseModel


class MyModel(BaseModel):
    foo: str


obj = response.parse(to=MyModel)
print(obj.foo)
```

We support parsing:
  - `BaseModel`
  - `dict`
  - `list`
  - `Union`
  - `str`
  - `httpx.Response`
NrÝ   rÞ   rß   rã   s   &$   rK   rÖ   r   ­  sË   é € ð8 š.‘B¨d¯m©mˆ	Ø×%Ñ%×)Ñ)¨)Ó4ˆØÒØˆMà×"×"Ð"Ø—)‘)“+×Ðà—‘ �Ó#ˆÜ�D—M‘M×-Ñ-×.Ò.Ø—]‘]×.Ñ.¨vÓ6ˆFä�fœi×(Ò(Ü˜V·±Èd×N_ÑN_Õ`à*0×Ñ˜YÑ'Ü”A�v‹Ðñ ùs   ‚AD	ÁD	ÁDÁB,D	c               ó   € V ^8„  d   QhRR/# rè   rI   )rJ   s   "rK   rL   r  Û  s   € ÷ 3ñ 3˜Eñ 3rN   c              ƒ  ó¤   "  €  V P                   P                  4       G Rj  x€L
 #  L  \        P                   d   p\	        4       ThRp?ii ; i5irê   )r<   Úareadr¥   rë   rì   rí   s   & rK   rà   ÚAsyncAPIResponse.readÛ  sG   é € ð	3Ø×+Ñ+×1Ñ1Ó3×3Ð3Ñ3øÜ×#Ñ#ô 	3ô (Ó)¨sÐ2ûð		3üs0   ‚A„( ¡&¢( ¥A¦( ¨A½AÁAÁAc               ó   € V ^8„  d   QhRR/# rh   rI   )rJ   s   "rK   rL   r  å  s   € ÷ 'ñ '˜Cñ 'rN   c              ƒ  ój   "  € V P                  4       G Rj  x€L
  V P                  P                  #  L5i)rñ   Nrò   rW   s   &rK   rž   ÚAsyncAPIResponse.textå  s+   é € à�i‰i‹k×ÐØ×!Ñ!×&Ñ&Ð&ñ 	ùs   ‚3–1—3c               ó   € V ^8„  d   QhRR/# rõ   rI   )rJ   s   "rK   rL   r  ê  s   € ÷ )ñ )˜Fñ )rN   c              ƒ  ór   "  € V P                  4       G Rj  x€L
  V P                  P                  4       #  L5i)r÷   Nrø   rW   s   &rK   r‘   ÚAsyncAPIResponse.jsonê  s.   é € à�i‰i‹k×ÐØ×!Ñ!×&Ñ&Ó(Ð(ñ 	ùs   ‚7–5—7c               ó   € V ^8„  d   QhRR/# rû   rI   )rJ   s   "rK   rL   r  ï  s   € ÷ *ñ *˜Tñ *rN   c              ƒ  óV   "  € V P                   P                  4       G Rj  x€L
  R#  L5irý   )r<   ÚacloserW   s   &rK   rþ   ÚAsyncAPIResponse.closeï  s   é € ð
 × Ñ ×'Ñ'Ó)×)Ô)ùs   ‚) '¡)c               ó    € V ^8„  d   QhRRRR/# )r@   r‡   r  rG   zAsyncIterator[bytes]rI   )rJ   s   "rK   rL   r  ö  s   € ÷ ñ ¨:ð ÐAUñ rN   c               ól   "  € V P                   P                  V4        Rj  x€L
  pV5x € K   LDR# 5ir  )r<   rš   r  s   && rK   r™   ÚAsyncAPIResponse.iter_bytesö  s4   é € ð  ×-Ñ-×9Ñ9¸*ÔE÷ 	ð 	�%Ø�Kñ	ÒEùó   ‚4ž1¢/£1¦	4¯1±4c               ó    € V ^8„  d   QhRRRR/# )r@   r‡   r  rG   úAsyncIterator[str]rI   )rJ   s   "rK   rL   r  ÿ  s   € ÷ ñ ¨*ð Ð@Rñ rN   c               ól   "  € V P                   P                  V4        Rj  x€L
  pV5x € K   LDR# 5ir  )r<   Ú
aiter_textr  s   && rK   r  ÚAsyncAPIResponse.iter_textÿ  s4   é € ð
  ×-Ñ-×8Ñ8¸ÔD÷ 	ð 	�%Ø�Kñ	ÒDùr7  c               ó   € V ^8„  d   QhRR/# )r@   rG   r9  rI   )rJ   s   "rK   rL   r    s   € ÷ ñ Ð"4ñ rN   c               ój   "  € V P                   P                  4         Rj  x€L
  pV5x € K   LDR# 5ir  )r<   Úaiter_linesr  s   & rK   r  ÚAsyncAPIResponse.iter_lines  s0   é € à×-Ñ-×9Ñ9Ô;÷ 	ð 	�%Ø�Kñ	Ò;ùs   ‚3�0¡.¢0¥	3®0°3rI   rP   r  rI   rN   rK   r  r  ž  s}   † Øô<ó ð<ð ôHó ðHð Ü5ó Ø5àÜ#ó Ø#ð,°4÷ ,õ\3õ'õ
)õ
*÷÷÷ñ rN   r  c                  ó&   € ] tR tRtRtR R ltRtR# )ÚBinaryAPIResponsei  á#  Subclass of APIResponse providing helpers for dealing with binary data.

Note: If you want to stream the response data instead of eagerly reading it
all at once then you should use `.with_streaming_response` when making
the API request, e.g. `.with_streaming_response.get_binary_response()`
c               ó    € V ^8„  d   QhRRRR/# ©r@   Úfileústr | os.PathLike[str]rG   rH   rI   )rJ   s   "rK   rL   ÚBinaryAPIResponse.__annotate__  s   € ÷ ñ à$ðð 
ñrN   c                óº   € \        VRR7      ;_uu_ 4       pV P                  4        F  pVP                  V4       K  	  RRR4       R#   + '       g   i     R# ; i©a6  Write the output to the given file.

Accepts a filename or any path-like object, e.g. pathlib.Path

Note: if you want to stream the data to the file instead of writing
all at once then you should use `.with_streaming_response` when making
the API request, e.g. `.with_streaming_response.get_binary_response()`
Úwb©ÚmodeN©Úopenr™   Úwrite)rQ   rF  Úfr’   s   &&  rK   Úwrite_to_fileÚBinaryAPIResponse.write_to_file  s>   € ô �$˜T×"Õ" aØŸ™Ö)�Ø—‘˜–ñ *÷ #×"×"Ò"ús   –)A	Á	A	rI   N©r   rº   r»   r¼   Ú__doc__rR  r¿   rI   rN   rK   rB  rB    s   † ñ÷ñ rN   rB  c                  ó&   € ] tR tRtRtR R ltRtR# )ÚAsyncBinaryAPIResponsei&  rC  c               ó    € V ^8„  d   QhRRRR/# rE  rI   )rJ   s   "rK   rL   Ú#AsyncBinaryAPIResponse.__annotate__.  s   € ÷ $ñ $à$ð$ð 
ñ$rN   c              ƒ  óh  "  € \         P                  ! V4      pVP                  RR7      G Rj  x€L
 ;_uu_4       GRj  x€L
 pV P                  4         Rj  x€L
  pVP	                  V4      G Rj  x€L
  K%   LJ L; L$ LD'RRR4      GRj  x€L 
  R#   + GRj  x€L 
 '       g   i     R# ; i5irJ  ©ÚanyioÚPathrO  r™   rP  )rQ   rF  ÚpathrQ  r’   s   &&   rK   rR  Ú$AsyncBinaryAPIResponse.write_to_file.  s~   é € ô �zŠz˜$ÓˆØŸ™¨˜Ó-×-×-×-Ð-°Ø"Ÿo™oÔ/÷ $ð $�dØ—g‘g˜d“m×#Ò#ó .ñ$Ù#ð 0÷ .×-×-×-×-Ô-üs’   ‚,B2®A9¯B2¿A;Á B2ÁBÁBÁA=
ÁBÁBÁ2A?
Á3BÁ9B2Á;B2Á=BÁ?BÂBÂB2ÂBÂB2ÂB/	ÂBÂ
B/	Â'B/	Â)	B2rI   NrT  rI   rN   rK   rW  rW  &  s   † ñ÷$ñ $rN   rW  c                  ó*   € ] tR tRtRR/R R lltRtR# )ÚStreamedBinaryAPIResponsei@  r‡   Nc               ó$   € V ^8„  d   QhRRRRRR/# ©r@   rF  rG  r‡   r  rG   rH   rI   )rJ   s   "rK   rL   Ú&StreamedBinaryAPIResponse.__annotate__A  s(   € ÷ ñ à$ðð ð	ð
 
ñrN   c               ó¼   € \        VRR7      ;_uu_ 4       pV P                  V4       F  pVP                  V4       K  	  RRR4       R#   + '       g   i     R# ; i©zeStreams the output to the given file.

Accepts a filename or any path-like object, e.g. pathlib.Path
rK  rL  NrN  )rQ   rF  r‡   rQ  r’   s   &&$  rK   Ústream_to_fileÚ(StreamedBinaryAPIResponse.stream_to_fileA  s@   € ô �$˜T×"Õ" aØŸ™¨
Ö3�Ø—‘˜–ñ 4÷ #×"×"Ò"ús   –*A
Á
A	rI   ©r   rº   r»   r¼   rg  r¿   rI   rN   rK   ra  ra  @  s   † ðð "&÷	ó rN   ra  c                  ó*   € ] tR tRtRR/R R lltRtR# )ÚAsyncStreamedBinaryAPIResponseiP  r‡   Nc               ó$   € V ^8„  d   QhRRRRRR/# rc  rI   )rJ   s   "rK   rL   Ú+AsyncStreamedBinaryAPIResponse.__annotate__Q  s(   € ÷ $ñ $à$ð$ð ð	$ð
 
ñ$rN   c             ƒ  ój  "  € \         P                  ! V4      pVP                  RR7      G Rj  x€L
 ;_uu_4       GRj  x€L
 pV P                  V4        Rj  x€L
  pVP	                  V4      G Rj  x€L
  K%   LK L< L$ LD'RRR4      GRj  x€L 
  R#   + GRj  x€L 
 '       g   i     R# ; i5irf  r[  )rQ   rF  r‡   r^  rQ  r’   s   &&$   rK   rg  Ú-AsyncStreamedBinaryAPIResponse.stream_to_fileQ  s€   é € ô �zŠz˜$ÓˆØŸ™¨˜Ó-×-×-×-Ð-°Ø"Ÿo™o¨jÔ9÷ $ð $�dØ—g‘g˜d“m×#Ò#ó .ñ$Ù#ð :÷ .×-×-×-×-Ô-üs’   ‚,B3®A:¯B3¿A<Á B3ÁBÁBÁA>
ÁBÁBÁ3B 
Á4BÁ:B3Á<B3Á>BÂ BÂBÂB3ÂBÂB3ÂB0	ÂBÂ
B0	Â(B0	Â*	B3rI   ri  rI   rN   rK   rk  rk  P  s   † ð$ð "&÷	$ó $rN   rk  c                  ó.   a € ] tR tRtR V 3R lltRtV ;t# )r�   ia  c               ó   € V ^8„  d   QhRR/# rû   rI   )rJ   s   "rK   rL   Ú$MissingStreamClassError.__annotate__b  s   € ÷ 
ñ 
˜$ñ 
rN   c                	ó&   <€ \         SV `  R 4       R# )z}The `stream` argument was set to `True` but the `stream_cls` argument was not given. See `anthropic._streaming` for referenceN©ÚsuperrR   )rQ   r~   s   &€rK   rR   Ú MissingStreamClassError.__init__b  s   ø€ Ü‰Ñð Lö	
rN   rI   )r   rº   r»   r¼   rR   r¿   Ú__classcell__©r~   s   @rK   r�   r�   a  s   ø† ÷
ö 
rN   r�   c                  ó2   a € ] tR tRtRtR V 3R lltRtV ;t# )rì   ih  a  
Attempted to read or stream content, but the content has already
been streamed.

This can happen if you use a method like `.iter_lines()` and then attempt
to read th entire response body afterwards, e.g.

```py
response = await client.post(...)
async for line in response.iter_lines():
    ...  # do something with `line`

content = await response.read()
# ^ error
```

If you want this behaviour you'll need to either manually accumulate the response
content or call `await response.read()` before iterating over the stream.
c               ó   € V ^8„  d   QhRR/# rû   rI   )rJ   s   "rK   rL   Ú"StreamAlreadyConsumed.__annotate__}  s   € ÷ 
"ñ 
"˜$ñ 
"rN   c                	ó*   <€ R p\         SV `  V4       R# )a&  Attempted to read or stream some content, but the content has already been streamed. This could be due to attempting to stream the response content more than once.

You can fix this by manually accumulating the response content while streaming or by calling `.read()` before starting to stream.Nrt  )rQ   r“   r~   s   & €rK   rR   ÚStreamAlreadyConsumed.__init__}  s   ø€ ðAð 	ô 	‰Ñ˜Ö!rN   rI   )r   rº   r»   r¼   rU  rR   r¿   rw  rx  s   @rK   rì   rì   h  s   ø† ñ÷(
"ö 
"rN   rì   c                  ó>   € ] tR tRtRtR R ltR R ltR R ltR	tR
# )ÚResponseContextManageriŠ  ú—Context manager for ensuring that a request is not made
until it is entered and that the response will always be closed
when the context manager exits
c               ó    € V ^8„  d   QhRRRR/# )r@   Úrequest_funczCallable[[], _APIResponseT]rG   rH   rI   )rJ   s   "rK   rL   Ú#ResponseContextManager.__annotate__�  s   € ÷ 5ñ 5Ð%@ð 5ÀTñ 5rN   c                	ó    € Wn         R V n        R # rP   ©Ú_request_funcÚ!_ResponseContextManager__response)rQ   r‚  s   &&rK   rR   ÚResponseContextManager.__init__�  s   € Ø)ÔØ04ˆŽrN   c               ó   € V ^8„  d   QhRR/# )r@   rG   r+   rI   )rJ   s   "rK   rL   rƒ  ”  s   € ÷ ñ ˜=ñ rN   c                	óD   € V P                  4       V n        V P                  # rP   r…  rW   s   &rK   Ú	__enter__Ú ResponseContextManager.__enter__”  s   € Ø×,Ñ,Ó.ˆŒØ�‰ÐrN   c               ó(   € V ^8„  d   QhRRRRRRRR/# ©	r@   Úexc_typeztype[BaseException] | Noner·   zBaseException | NoneÚexc_tbzTracebackType | NonerG   rH   rI   )rJ   s   "rK   rL   rƒ  ˜  s2   € ÷ $ñ $à,ð$ð "ð$ð %ð	$ð
 
ñ$rN   c                	óZ   € V P                   e   V P                   P                  4        R # R # rP   )r‡  rþ   ©rQ   r�  r·   r�  s   &&&&rK   Ú__exit__ÚResponseContextManager.__exit__˜  s#   € ð �?‰?Ò&Ø�O‰O×!Ñ!Ö#ñ 'rN   )Ú
__responser†  N)	r   rº   r»   r¼   rU  rR   r‹  r“  r¿   rI   rN   rK   r  r  Š  s   † ñõ
5õ÷$ñ $rN   r  c                  ó>   € ] tR tRtRtR R ltR R ltR R ltR	tR
# )ÚAsyncResponseContextManageri¢  r€  c               ó    € V ^8„  d   QhRRRR/# )r@   Úapi_requestúAwaitable[_AsyncAPIResponseT]rG   rH   rI   )rJ   s   "rK   rL   Ú(AsyncResponseContextManager.__annotate__¨  s   € ÷ :ñ :Ð$Að :Àdñ :rN   c                	ó    € Wn         R V n        R # rP   ©Ú_api_requestÚ&_AsyncResponseContextManager__response)rQ   r™  s   &&rK   rR   Ú$AsyncResponseContextManager.__init__¨  s   € Ø'ÔØ59ˆŽrN   c               ó   € V ^8„  d   QhRR/# )r@   rG   r-   rI   )rJ   s   "rK   rL   r›  ¬  s   € ÷ ñ Ð"4ñ rN   c              ƒ  	óX   "  € V P                   G R j  x€L
 V n        V P                  #  L5irP   r�  rW   s   &rK   Ú
__aenter__Ú&AsyncResponseContextManager.__aenter__¬  s$   é € Ø $× 1Ñ 1×1ˆŒØ�‰Ðñ 2ùs   ‚*’(“*c               ó(   € V ^8„  d   QhRRRRRRRR/# rŽ  rI   )rJ   s   "rK   rL   r›  °  s2   € ÷ *ñ *à,ð*ð "ð*ð %ð	*ð
 
ñ*rN   c              ƒ  	óv   "  € V P                   e%   V P                   P                  4       G R j  x€L
  R # R #  L5irP   )rŸ  rþ   r’  s   &&&&rK   Ú	__aexit__Ú%AsyncResponseContextManager.__aexit__°  s/   é € ð �?‰?Ò&Ø—/‘/×'Ñ'Ó)×)Ò)ñ 'Ù)ùs   ‚,9®7¯	9)r•  rž  N)	r   rº   r»   r¼   rU  rR   r£  r§  r¿   rI   rN   rK   r—  r—  ¢  s   † ñõ
:õ÷*ñ *rN   r—  c               ó    € V ^8„  d   QhRRRR/# )r@   ÚfuncúCallable[P, R]rG   z3Callable[P, ResponseContextManager[APIResponse[R]]]rI   )rJ   s   "rK   rL   rL   º  s   € ÷ ñ  ~ð Ð:mñ rN   c                óL   a € \         P                  ! S 4      R V 3R ll4       pV# )ú•Higher order function that takes one of our bound API methods and wraps it
to support streaming and returning the raw `APIResponse` object directly.
c               ó$   € V ^8„  d   QhRRRRRR/# )r@   ÚargsúP.argsÚkwargsúP.kwargsrG   z&ResponseContextManager[APIResponse[R]]rI   )rJ   s   "rK   rL   Ú2to_streamed_response_wrapper.<locals>.__annotate__À  s'   € ÷ Xñ X�vð X¨ð XÐ6\ñ XrN   c                 ó
  <€ / \        \        VP                  R 4      4      ;'       g    / CpRV\        &   W!R &   \        P
                  ! S.V O5/ VB p\        \        \        . \        \        ,          3,          V4      4      # ©Úextra_headersrD   )
r   r   r¬   r   Ú	functoolsÚpartialr  r
   r£   r)   ©r¯  r±  r¶  Úmake_requestrª  s   *,  €rK   ÚwrappedÚ-to_streamed_response_wrapper.<locals>.wrapped¿  ss   ø€ à(Z¬D´°f·j±jÀÓ6QÓ,R×,XÐ,XÐVXÐ(ZˆØ-5ˆÔ)Ñ*à"/ˆÑä ×(Ò(¨Ð?°Ò?¸Ñ?ˆä%¤d¬8°B¼ÄA½Ð4FÕ+GÈÓ&VÓWÐWrN   ©r·  Úwraps©rª  r»  s   f rK   Úto_streamed_response_wrapperrÀ  º  s)   ø€ ô
 ‡_‚_�TÓ÷Xó ðXð €NrN   c               ó    € V ^8„  d   QhRRRR/# )r@   rª  úCallable[P, Awaitable[R]]rG   z=Callable[P, AsyncResponseContextManager[AsyncAPIResponse[R]]]rI   )rJ   s   "rK   rL   rL   Í  s   € ÷ ñ Ø
#ðàBñrN   c                óL   a € \         P                  ! S 4      R V 3R ll4       pV# )r­  c               ó$   € V ^8„  d   QhRRRRRR/# )r@   r¯  r°  r±  r²  rG   z0AsyncResponseContextManager[AsyncAPIResponse[R]]rI   )rJ   s   "rK   rL   Ú8async_to_streamed_response_wrapper.<locals>.__annotate__Õ  s'   € ÷ _ñ _�vð _¨ð _Ð6fñ _rN   c                 óâ   <€ / \        \        VP                  R 4      4      ;'       g    / CpRV\        &   W!R &   S! V / VB p\	        \        \
        \        \        ,          ,          V4      4      # rµ  )r   r   r¬   r   r—  r   r  r)   r¹  s   *,  €rK   r»  Ú3async_to_streamed_response_wrapper.<locals>.wrappedÔ  sf   ø€ à(Z¬D´°f·j±jÀÓ6QÓ,R×,XÐ,XÐVXÐ(ZˆØ-5ˆÔ)Ñ*à"/ˆÑá˜TÐ, VÑ,ˆä*¬4´	Ô:JÌ1Õ:MÕ0NÐP\Ó+]Ó^Ð^rN   r½  r¿  s   f rK   Ú"async_to_streamed_response_wrapperrÈ  Í  s)   ø€ ô ‡_‚_�TÓ÷_ó ð_ð €NrN   c               ó$   € V ^8„  d   QhRRRRRR/# )r@   rª  úCallable[P, object]Úresponse_clsútype[_APIResponseT]rG   z2Callable[P, ResponseContextManager[_APIResponseT]]rI   )rJ   s   "rK   rL   rL   â  s&   € ÷ ñ Ø
ðà%ðð 8ñrN   c                óP   a a€ \         P                  ! S 4      R V V3R ll4       pV# )á  Higher order function that takes one of our bound API methods and an `APIResponse` class
and wraps the method to support streaming and returning the given response class directly.

Note: the given `response_cls` *must* be concrete, e.g. `class BinaryAPIResponse(APIResponse[bytes])`
c               ó$   € V ^8„  d   QhRRRRRR/# )r@   r¯  r°  r±  r²  rG   z%ResponseContextManager[_APIResponseT]rI   )rJ   s   "rK   rL   Ú9to_custom_streamed_response_wrapper.<locals>.__annotate__í  s'   € ÷ 	Wñ 	W�vð 	W¨ð 	WÐ6[ñ 	WrN   c                 ó  <€ / \        \        VP                  R 4      4      ;'       g    / CpRV\        &   SV\        &   W!R &   \
        P                  ! S.V O5/ VB p\        \        \        . \        3,          V4      4      # rµ  )
r   r   r¬   r   r   r·  r¸  r  r
   r+   ©r¯  r±  r¶  rº  rª  rË  s   *,  €€rK   r»  Ú4to_custom_streamed_response_wrapper.<locals>.wrappedì  sz   ø€ à(Z¬D´°f·j±jÀÓ6QÓ,R×,XÐ,XÐVXÐ(ZˆØ-5ˆÔ)Ñ*Ø1=ˆÔ-Ñ.à"/ˆÑä ×(Ò(¨Ð?°Ò?¸Ñ?ˆä%¤d¬8°B¼Ð4EÕ+FÈÓ&UÓVÐVrN   r½  ©rª  rË  r»  s   ff rK   Ú#to_custom_streamed_response_wrapperrÕ  â  s/   ù€ ô ‡_‚_�TÓ÷	Wð 	Wó ð	Wð €NrN   c               ó$   € V ^8„  d   QhRRRRRR/# )r@   rª  úCallable[P, Awaitable[object]]rË  útype[_AsyncAPIResponseT]rG   z<Callable[P, AsyncResponseContextManager[_AsyncAPIResponseT]]rI   )rJ   s   "rK   rL   rL   û  s'   € ÷ ñ Ø
(ðà*ðð BñrN   c                óP   a a€ \         P                  ! S 4      R V V3R ll4       pV# )rÎ  c               ó$   € V ^8„  d   QhRRRRRR/# )r@   r¯  r°  r±  r²  rG   z/AsyncResponseContextManager[_AsyncAPIResponseT]rI   )rJ   s   "rK   rL   Ú?async_to_custom_streamed_response_wrapper.<locals>.__annotate__  s'   € ÷ 	^ñ 	^�vð 	^¨ð 	^Ð6eñ 	^rN   c                 óÞ   <€ / \        \        VP                  R 4      4      ;'       g    / CpRV\        &   SV\        &   W!R &   S! V / VB p\        \        \        \        ,          V4      4      # rµ  )r   r   r¬   r   r   r—  r   r-   rÒ  s   *,  €€rK   r»  Ú:async_to_custom_streamed_response_wrapper.<locals>.wrapped  sk   ø€ à(Z¬D´°f·j±jÀÓ6QÓ,R×,XÐ,XÐVXÐ(ZˆØ-5ˆÔ)Ñ*Ø1=ˆÔ-Ñ.à"/ˆÑá˜TÐ, VÑ,ˆä*¬4´	Ô:LÕ0MÈ|Ó+\Ó]Ð]rN   r½  rÔ  s   ff rK   Ú)async_to_custom_streamed_response_wrapperrÞ  û  s/   ù€ ô ‡_‚_�TÓ÷	^ð 	^ó ð	^ð €NrN   c               ó    € V ^8„  d   QhRRRR/# )r@   rª  r«  rG   zCallable[P, APIResponse[R]]rI   )rJ   s   "rK   rL   rL     s   € ÷ ñ  .ð Ð5Pñ rN   c                óL   a € \         P                  ! S 4      R V 3R ll4       pV# )ú‡Higher order function that takes one of our bound API methods and wraps it
to support returning the raw `APIResponse` object directly.
c               ó$   € V ^8„  d   QhRRRRRR/# )r@   r¯  r°  r±  r²  rG   zAPIResponse[R]rI   )rJ   s   "rK   rL   Ú-to_raw_response_wrapper.<locals>.__annotate__  s!   € ÷ ;ñ ;�vð ;¨ð ;°nñ ;rN   c                 ó¶   <€ / \        \        VP                  R 4      4      ;'       g    / CpRV\        &   W!R &   \        \        \
        ,          S! V / VB 4      # ©r¶  rA   )r   r   r¬   r   r£   r)   ©r¯  r±  r¶  rª  s   *, €rK   r»  Ú(to_raw_response_wrapper.<locals>.wrapped  sT   ø€ à(Z¬D´°f·j±jÀÓ6QÓ,R×,XÐ,XÐVXÐ(ZˆØ-2ˆÔ)Ñ*à"/ˆÑä”K¤•N¡D¨$Ð$9°&Ñ$9Ó:Ð:rN   r½  r¿  s   f rK   Úto_raw_response_wrapperrè    s'   ø€ ô
 ‡_‚_�TÓ÷;ó ð;ð €NrN   c               ó    € V ^8„  d   QhRRRR/# )r@   rª  rÂ  rG   z+Callable[P, Awaitable[AsyncAPIResponse[R]]]rI   )rJ   s   "rK   rL   rL   %  s   € ÷ ñ Ð(Að ÐFqñ rN   c                óL   a € \         P                  ! S 4      R V 3R ll4       pV# )rá  c               ó$   € V ^8„  d   QhRRRRRR/# )r@   r¯  r°  r±  r²  rG   zAsyncAPIResponse[R]rI   )rJ   s   "rK   rL   Ú3async_to_raw_response_wrapper.<locals>.__annotate__+  s'   € ÷ Fñ F˜Vð F¨xð FÐ<Oñ FrN   c               Ÿ  óÒ   <"  € / \        \        VP                  R 4      4      ;'       g    / CpRV\        &   W!R &   \        \        \
        ,          S! V / VB G Rj  x€L
 4      #  L5i)r¶  rA   N)r   r   r¬   r   r  r)   ræ  s   *, €rK   r»  Ú.async_to_raw_response_wrapper.<locals>.wrapped*  s_   øé € à(Z¬D´°f·j±jÀÓ6QÓ,R×,XÐ,XÐVXÐ(ZˆØ-2ˆÔ)Ñ*à"/ˆÑäÔ$¤QÕ'©t°TÐ/D¸VÑ/D×)DÓEÐEÑ)Dùs   ƒAA'ÁA%
Á	A'r½  r¿  s   f rK   Úasync_to_raw_response_wrapperrï  %  s)   ø€ ô
 ‡_‚_�TÓ÷Fó ðFð €NrN   c               ó$   € V ^8„  d   QhRRRRRR/# )r@   rª  rÊ  rË  rÌ  rG   zCallable[P, _APIResponseT]rI   )rJ   s   "rK   rL   rL   6  s&   € ÷ ñ Ø
ðà%ðð  ñrN   c                óP   a a€ \         P                  ! S 4      R V V3R ll4       pV# )á  Higher order function that takes one of our bound API methods and an `APIResponse` class
and wraps the method to support returning the given response class directly.

Note: the given `response_cls` *must* be concrete, e.g. `class BinaryAPIResponse(APIResponse[bytes])`
c               ó$   € V ^8„  d   QhRRRRRR/# )r@   r¯  r°  r±  r²  rG   r+   rI   )rJ   s   "rK   rL   Ú4to_custom_raw_response_wrapper.<locals>.__annotate__A  s!   € ÷ :ñ :�vð :¨ð :°mñ :rN   c                 ó²   <€ / \        \        VP                  R 4      4      ;'       g    / CpRV\        &   SV\        &   W!R &   \        \
        S! V / VB 4      # rå  )r   r   r¬   r   r   r+   ©r¯  r±  r¶  rª  rË  s   *, €€rK   r»  Ú/to_custom_raw_response_wrapper.<locals>.wrapped@  s[   ø€ à(Z¬D´°f·j±jÀÓ6QÓ,R×,XÐ,XÐVXÐ(ZˆØ-2ˆÔ)Ñ*Ø1=ˆÔ-Ñ.à"/ˆÑä”M¡4¨Ð#8°Ñ#8Ó9Ð9rN   r½  rÔ  s   ff rK   Úto_custom_raw_response_wrapperrø  6  s,   ù€ ô ‡_‚_�TÓ÷:ð :ó ð:ð €NrN   c               ó$   € V ^8„  d   QhRRRRRR/# )r@   rª  r×  rË  rØ  rG   z*Callable[P, Awaitable[_AsyncAPIResponseT]]rI   )rJ   s   "rK   rL   rL   M  s&   € ÷ ñ Ø
(ðà*ðð 0ñrN   c                óP   a a€ \         P                  ! S 4      R V V3R ll4       pV# )rò  c               ó$   € V ^8„  d   QhRRRRRR/# )r@   r¯  r°  r±  r²  rG   rš  rI   )rJ   s   "rK   rL   Ú:async_to_custom_raw_response_wrapper.<locals>.__annotate__X  s'   € ÷ Jñ J�vð J¨ð JÐ6Sñ JrN   c                 óÈ   <€ / \        \        VP                  R 4      4      ;'       g    / CpRV\        &   SV\        &   W!R &   \        \
        \        ,          S! V / VB 4      # rå  )r   r   r¬   r   r   r   r-   rö  s   *, €€rK   r»  Ú5async_to_custom_raw_response_wrapper.<locals>.wrappedW  sa   ø€ à(Z¬D´°f·j±jÀÓ6QÓ,R×,XÐ,XÐVXÐ(ZˆØ-2ˆÔ)Ñ*Ø1=ˆÔ-Ñ.à"/ˆÑä”IÔ0Õ1±4¸Ð3HÀÑ3HÓIÐIrN   r½  rÔ  s   ff rK   Ú$async_to_custom_raw_response_wrapperrÿ  M  s/   ù€ ô ‡_‚_�TÓ÷Jð Jó ðJð €NrN   c               ó    € V ^8„  d   QhRRRR/# )r@   Útypztype[BaseAPIResponse[Any]]rG   r²   rI   )rJ   s   "rK   rL   rL   d  s   € ÷ ñ Ð9ð ¸dñ rN   c           	     óP   € \        V \        R\        \        \        34      ^ R7      # )zôGiven a type like `APIResponse[T]`, returns the generic type variable `T`.

This also handles the case where a concrete subclass is given, e.g.
```py
class MyResponse(APIResponse[bytes]):
    ...

extract_response_type(MyResponse) -> bytes
```
ztuple[type, ...])Úgeneric_basesÚindex)r   r   r0   r£   r  )r  s   &rK   Úextract_response_typer  d  s*   € ô &ØÜÐ-´ÄÔN^Ð/_Ó`Øôð rN   )YÚ__conditional_annotations__Ú
__future__r   Úosr–   ÚloggingÚdatetimer·  Útypesr   Útypingr   r   r   r   r	   r
   r   r   r   r   Útyping_extensionsr   r   r   r   r\  r¥   r¨   Ú_typesr   Ú_utilsr   r   r   r   r   Ú_modelsr   r   r   Ú
_constantsr   r   Ú
_streamingr   r   r    r!   Ú_exceptionsr"   r#   Ú_decoders.jsonlr$   r%   r&   Ú_base_clientr'   r(   r)   r*   r+   r-   Ú	getLoggerr   r.   r½   r0   r£   r  rŸ   rB  rW  ra  rk  r›   r�   rì   r  r—  rÀ  rÈ  rÕ  rÞ  rè  rï  rø  rÿ  r  )r  s   @rK   Ú<module>r     sž  øðß "Ð "ã 	Û Û Û Û Ý ÷÷ ÷ ÷ IÓ Hã Û Û å ß qÕ qß >Ñ >ß Dß \Ó \ß Cß <çÝ,Ý(ñ ˆcƒN€ÙˆCƒL€ÙˆTƒ]€Ù˜Ð/AÔB€ÙÐ1Ð9PÔQÐ à×'Ò'¨Ó1€€^Ó 1ôy
�g˜a•jô y
ôxn�/ !Õ$ô nôbl� qÕ)ô lô^˜ EÕ*ô ô2$Ð-¨eÕ4ô $ô4 ¨EÕ 2ô ô $Ð%5°eÕ%<ô $ô"
˜iô 
ô"˜Nô "ôD$˜W ]Õ3ô $ô0* 'Ð*<Õ"=ô *õ0õ&õ*õ2õ2õ"õ"õ.÷.rN   