
    D_i]                        % S r SSKJr  SSKrSSKrSSKJr  SSKJrJ	r	J
r
Jr  SSKJr  SSKJrJrJr  SSKJr  SS	KJrJr  SS
KJr  SSKJrJr  SSKJrJrJrJ r J!r!  SSK"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+  \(       a  SSK,J-r-   " S S\\(\)4   5      r. " S S\.\(\)4   5      r/ " S S\0\Rb                  5      r2\" 5       r3S\4S'   \Rj                  " 5       r6 " S S\.\(\)4   5      r7SS jr8      SS jr9      SS jr:g)z6`Runnable` objects that can be dynamically configured.    )annotationsN)abstractmethod)AsyncIteratorCallableIteratorSequence)wraps)TYPE_CHECKINGAnycast)WeakValueDictionary)	BaseModel
ConfigDict)override)RunnableRunnableSerializable)RunnableConfigensure_configget_config_listget_executor_for_configmerge_configs)	AnyConfigurableFieldConfigurableFieldConfigurableFieldMultiOptionConfigurableFieldSingleOptionConfigurableFieldSpecInputOutputgather_with_concurrencyget_unique_config_specs)Graphc                     \ rS rSr% SrS\S'    SrS\S'    \" SS	9r\	\
S S
 j5       5       r\	\
S!S j5       5       r\\
S"S j5       5       r\\
S#S j5       5       r\
S$S%S jj5       r\
 S$   S%S jj5       r\
S$S&S jj5       r\
 S$     S'S jj5       r S$   S(S jjr\ S$   S(S jj5       r\
 S$       S)S jj5       r\
 S$       S)S jj5       r\
 S$SS.         S*S jjj5       r\
 S$SS.         S*S jjj5       r\
 S$       S+S jj5       r\
 S$       S,S jj5       r\
 S$       S-S jj5       r\
 S$       S.S jj5       r\
S/S j5       rSr g)0DynamicRunnable1   zSerializable `Runnable` that can be dynamically configured.

A `DynamicRunnable` should be initiated using the `configurable_fields` or
`configurable_alternatives` method of a `Runnable`.
#RunnableSerializable[Input, Output]defaultNRunnableConfig | NoneconfigT)arbitrary_types_allowedc                    g)z,Return `True` as this class is serializable.T clss    _/home/james-whalen/.local/lib/python3.13/site-packages/langchain_core/runnables/configurable.pyis_lc_serializable"DynamicRunnable.is_lc_serializableB   s         c                
    / SQ$ )z_Get the namespace of the LangChain object.

Returns:
    `["langchain", "schema", "runnable"]`
)	langchainschemarunnabler+   r,   s    r.   get_lc_namespace DynamicRunnable.get_lc_namespaceH   s
     32r1   c                .    U R                   R                  $ N)r&   	InputTypeselfs    r.   r:   DynamicRunnable.InputTypeR   s     ||%%%r1   c                .    U R                   R                  $ r9   )r&   
OutputTyper;   s    r.   r?   DynamicRunnable.OutputTypeW   s     ||&&&r1   c                J    U R                  U5      u  p!UR                  U5      $ r9   )prepareget_input_schemar<   r(   r5   s      r.   rC    DynamicRunnable.get_input_schema\   s$    <</((00r1   c                J    U R                  U5      u  p!UR                  U5      $ r9   )rB   get_output_schemarD   s      r.   rG   !DynamicRunnable.get_output_schemaa   s&      <</))&11r1   c                J    U R                  U5      u  p!UR                  U5      $ r9   )rB   	get_graphrD   s      r.   rJ   DynamicRunnable.get_graphh   s$    <</!!&))r1   c                j    U R                   " S0 0 U R                  ES[        [        X5      5      0ED6$ )Nr(   r+   )	__class____dict__r   r   )r<   r(   kwargss      r.   with_configDynamicRunnable.with_configm   s7     ~~ 
WW-f8U*VW
 	
r1   c                    U n[        U[        5      (       a>  UR                  [        UR                  U5      5      u  p![        U[        5      (       a  M>  U[        SU5      4$ )zPrepare the `Runnable` for invocation.

Args:
    config: The configuration to use.

Returns:
    The prepared `Runnable` and configuration.
r   )
isinstancer#   _preparer   r(   r   rD   s      r.   rB   DynamicRunnable.preparex   sW     -1?33'00xPV1WXH ?33.777r1   c                    g r9   r+   )r<   r(   s     r.   rT   DynamicRunnable._prepare   s     :=r1   c                N    U R                  U5      u  pBUR                  " X40 UD6$ r9   )rB   invoker<   inputr(   rO   r5   s        r.   rY   DynamicRunnable.invoke   s)      <</u777r1   c                j   #    U R                  U5      u  pBUR                  " X40 UD6I S h  vN $  N7fr9   )rB   ainvokerZ   s        r.   r^   DynamicRunnable.ainvoke   s4       <</%%e>v>>>>s   *313F)return_exceptionsc               F  ^ ^^ [        U[        U5      5      nU Vs/ s H  nT R                  U5      PM     nn[        U 4S jU 5       5      (       a5  T R                  R
                  " UU VVs/ s H  u  pUPM	     snn4ST0TD6$ U(       d  / $       SUU4S jjn	[        U5      S:X  a  [        SU	" US   US   5      /5      $ [        US   5       n
[        S[        U
R                  XU5      5      5      sS S S 5        $ s  snf s  snnf ! , (       d  f       g = f)Nc              3  D   >#    U  H  u  pUTR                   L v   M     g 7fr9   r&   .0p_r<   s      r.   	<genexpr>(DynamicRunnable.batch.<locals>.<genexpr>        6XTQqDLL X    r`   c                   > U u  p#T(       a   UR                   " X40 TD6$ UR                   " X40 TD6$ ! [         a  nUs S nA$ S nAff = fr9   )rY   	Exceptionpreparedinput_boundr(   erO   r`   s        r.   rY   %DynamicRunnable.batch.<locals>.invoke   sU     %ME  <<A&AA ||F=f== ! Hs   4 
A
AA
A
   list[Output]r   ro   .tuple[Runnable[Input, Output], RunnableConfig]rp   r   returnzOutput | Exception)
r   lenrB   allr&   batchr   r   listmap)r<   inputsr(   r`   rO   configscro   rg   rY   executors   `  ``      r.   r{   DynamicRunnable.batch   s"    "&#f+6-45WDLLOW56X666<<%%'(xtqx( #4 	  I	>D	>	>  	> 	> v;!VAY)G(HII$WQZ0HX\\&F-S(TU 10= 6
 )2 10s   D0D%D
D c          	       ^ ^^#    [        U[        U5      5      nU Vs/ s H  nT R                  U5      PM     nn[        U 4S jU 5       5      (       a=  T R                  R
                  " UU VVs/ s H  u  pUPM	     snn4ST0TD6I S h  vN $ U(       d  / $       SUU4S jjn	[        XU5      n
[        US   R                  S5      /U
Q76 I S h  vN $ s  snf s  snnf  NY N7f)Nc              3  D   >#    U  H  u  pUTR                   L v   M     g 7fr9   rc   rd   s      r.   rh   )DynamicRunnable.abatch.<locals>.<genexpr>   rj   rk   r`   c                   >#    U u  p#T(       a   UR                   " X40 TD6I S h  vN $ UR                   " X40 TD6I S h  vN $  N! [         a  nUs S nA$ S nAff = f N7fr9   )r^   rm   rn   s        r.   r^   'DynamicRunnable.abatch.<locals>.ainvoke   sh      %ME !&v!H!HHH #]]6DVDDD	 I  H EsO   A#A AA A#A!A#A 
AAAA#AA#r   max_concurrencyrv   )	r   ry   rB   rz   r&   abatchr}   r   get)r<   r~   r(   r`   rO   r   r   ro   rg   r^   coross   `  ``      r.   r   DynamicRunnable.abatch   s     "&#f+6-45WDLLOW56X666,,'(xtqx( #4 	   I	ED	E	E  	E 	E Gv.,WQZ^^<M-NWQVWWW7 6
 )0 Xs:   C,C8C,2C" C,C(A	C,C*C,*C,c                N    U R                  U5      u  pBUR                  " X40 UD6$ r9   )rB   streamrZ   s        r.   r   DynamicRunnable.stream   s)      <</u777r1   c               ~   #    U R                  U5      u  pBUR                  " X40 UD6  S h  vN nU7v   M   N
 g 7fr9   )rB   astreamr<   r[   r(   rO   r5   chunks         r.   r   DynamicRunnable.astream   s?       <</#++EDVD 	%K	D   '=;9;=;=c                N    U R                  U5      u  pBUR                  " X40 UD6$ r9   )rB   	transformrZ   s        r.   r   DynamicRunnable.transform  s+      <</!!%:6::r1   c               ~   #    U R                  U5      u  pBUR                  " X40 UD6  S h  vN nU7v   M   N
 g 7fr9   )rB   
atransformr   s         r.   r   DynamicRunnable.atransform  s?       <</#..uGG 	%K	Gr   c                   ^ ^^ [        T R                  T5      m[        T5      (       a  [        T5      SUUU 4S jj5       nU$ T$ )Nc                   > UR                  5        H}  u  p#US:X  d  M  [        U[        5      (       d  M$  SU;   d  M,  [        US   [        5      (       d  MF  T
R                  [	        SU5      5      u  pE0 UESU0En[        UT	5      " U 0 UD6s  $    [        U 5       H|  u  pc[        U[        5      (       d  M  SU;   d  M$  [        US   [        5      (       d  M>  T
R                  [	        SU5      5      u  pE[        U 5      nXWU'   [        UT	5      " U0 UD6s  $    T
R                  (       a$  T
R                  5       u  pE[        UT	5      " U 0 UD6$ T" U 0 UD6$ )Nr(   configurabler   )	itemsrS   dictrB   r   getattr	enumerater|   r(   )argsrO   keyargr5   r(   idxargslattrnamer<   s           r.   wrapper,DynamicRunnable.__getattr__.<locals>.wrapper  s;    &HCh"3--*c1&s>':DAA+/<<=Ms8S+T(!=F!=Hf!=&x6GGG !/ !*$HC"3--*c1&s>':DAA+/<<=Ms8S+T( $T
%+c
&x6HHH !0 ;;'+||~$H"8T2DCFCCT,V,,r1   )r   r   rO   r   rx   r   )r   r&   callabler	   )r<   r   r   r   s   `` @r.   __getattr__DynamicRunnable.__getattr__  sC    t||T*D>>4[- - -8 Nr1   r+   )rx   bool)rx   z	list[str])rx   ztype[Input])rx   ztype[Output]r9   )r(   r'   rx   ztype[BaseModel])r(   r'   rx   r!   )r(   r'   rO   r   rx   zRunnable[Input, Output]r(   r'   rx   rw   )r[   r   r(   r'   rO   r   rx   r   )
r~   zlist[Input]r(   z,RunnableConfig | list[RunnableConfig] | Noner`   r   rO   
Any | Nonerx   ru   )r[   r   r(   r'   rO   r   rx   Iterator[Output])r[   r   r(   r'   rO   r   rx   AsyncIterator[Output])r[   zIterator[Input]r(   r'   rO   r   rx   r   )r[   zAsyncIterator[Input]r(   r'   rO   r   rx   r   )r   strrx   r   )!__name__
__module____qualname____firstlineno____doc____annotations__r(   r   model_configclassmethodr   r/   r6   propertyr:   r?   rC   rG   rJ   rP   rB   r   rT   rY   r^   r{   r   r   r   r   r   r   __static_attributes__r+   r1   r.   r#   r#   1   s    10($(F!(# $L    3  3 &  & '  ' 1 1 .22+2	2 2 * *  )-
%
 	

 
!
 
 /38+8	78  .2=+=	7= = <@88$98LO8	8 8 <@??$9?LO?	? ?  @D(V
 #((V(V =(V
  (V (V 
(V (VT  @D$X
 #($X$X =$X
  $X $X 
$X $XL  )-88 &8 	8
 
8 8  )- & 	
 
   )-;; &; 	;
 
; ;  )-# & 	
 
  # #r1   r#   c                  l    \ rS rSr% SrS\S'    \S
S j5       r\    SS j5       r	 S   SS jjr
S	rg)RunnableConfigurableFieldsi>  ab  `Runnable` that can be dynamically configured.

A `RunnableConfigurableFields` should be initiated using the
`configurable_fields` method of a `Runnable`.

Here is an example of using a `RunnableConfigurableFields` with LLMs:

    ```python
    from langchain_core.prompts import PromptTemplate
    from langchain_core.runnables import ConfigurableField
    from langchain_openai import ChatOpenAI

    model = ChatOpenAI(temperature=0).configurable_fields(
        temperature=ConfigurableField(
            id="temperature",
            name="LLM Temperature",
            description="The temperature of the LLM",
        )
    )
    # This creates a RunnableConfigurableFields for a chat model.

    # When invoking the created RunnableSequence, you can pass in the
    # value for your ConfigurableField's id which in this case
    # will be change in temperature

    prompt = PromptTemplate.from_template("Pick a random number above {x}")
    chain = prompt | model

    chain.invoke({"x": 0})
    chain.invoke({"x": 0}, config={"configurable": {"temperature": 0.9}})
    ```

Here is an example of using a `RunnableConfigurableFields` with `HubRunnables`:

    ```python
    from langchain_core.prompts import PromptTemplate
    from langchain_core.runnables import ConfigurableField
    from langchain_openai import ChatOpenAI
    from langchain.runnables.hub import HubRunnable

    prompt = HubRunnable("rlm/rag-prompt").configurable_fields(
        owner_repo_commit=ConfigurableField(
            id="hub_commit",
            name="Hub Commit",
            description="The Hub commit to pull from",
        )
    )

    prompt.invoke({"question": "foo", "context": "bar"})

    # Invoking prompt with `with_config` method

    prompt.invoke(
        {"question": "foo", "context": "bar"},
        config={"configurable": {"hub_commit": "rlm/rag-prompt-llama"}},
    )
    ```
zdict[str, AnyConfigurableField]fieldsc                   / n[        U R                  5      R                  nU R                  R	                  5        H  u  p4[        U[        5      (       a  UR                  [        UR                  UR                  UR                  =(       d    X#   R                  UR                  =(       d    X#   R                  [        U R                  U5      UR                  S95        M  UR                  [        XBU   R                  5      5        M     UR!                  U R                  R"                  5        [%        U5      $ )ziGet the configuration specs for the `RunnableConfigurableFields`.

Returns:
    The configuration specs.
idr   description
annotationr&   	is_shared)typer&   model_fieldsr   r   rS   r   appendr   r   r   r   r   r   r   make_options_specextendconfig_specsr    )r<   r   default_fields
field_namespecs        r.   r   'RunnableConfigurableFields.config_specs}  s     dll+88 $ 1 1 3J$ 122##)77!YY$($4$4 %B)5AA#'?? $A)5@@ 'j A"&..	 ##%d:,F,R,RS !4& 	DLL556&|44r1   c                V    U R                   R                  " S0 0 U R                  EUED6$ )Nr+   )r&   configurable_fieldsr   r<   rO   s     r.   r   .RunnableConfigurableFields.configurable_fields  s+     ||//L2KT[[2KF2KLLr1   Nc                   [        U5      nU R                  R                  5        VVs0 s H  u  p#UR                  X#4_M     nnnUR	                  S0 5      R                  5        VVs0 s H0  u  pVXT;   d  M  [        XE   S   [        5      (       d  M(  XE   S   U_M2     nnnU R                  R                  5        VVs0 s Hg  u  pV[        U[        5      (       d  M  XVR                  UR	                  S0 5      R	                  UR                  5      =(       d    UR                     _Mi     nnnU R                  R                  5        VVV	s0 s Hq  u  pV[        U[        5      (       d  M  UUR	                  S0 5      R	                  UR                  UR                  5       V	s/ s H  n	UR                  U	   PM     sn	_Ms     n
nnn	0 UEUEU
EnU(       a  U R                  R                  R                  5        VVs0 s H,  u  pVU[        U R                  5      R                  ;   d  M*  XV_M.     nnnU R                  R                  " S0 0 UEUED6U4$ U R                  U4$ s  snnf s  snnf s  snnf s  sn	f s  sn	nnf s  snnf )Nr   rt   r   r+   )r   r   r   r   r   rS   r   r   optionsr&   r   rN   r   r   rM   )r<   r(   r   r   specs_by_idkvr   configurable_single_optionsoconfigurable_multi_optionsr   init_paramss                r.   rT   #RunnableConfigurableFields._prepare  sq    v&=A[[=N=N=PQ=P	tww+=PQ 

>26<<>
> !$.{~a/@BS$T !KN1q > 	 
 ))+'
+!:; RAyy&**^R8<<QTTBOaiiQQ+ 	$ '
 ))+&

 ,!9:ANB7;;ADD!))LLA 		!L  , 	# &

!
)
 )
  !LL117799DAT\\*777 9   &&I)HK)H<)HI  f%%G R

'
&
sN   I')I-8I-I- I3AI3I>.9I>'I9 I>)J.J9I>r+   rx   zlist[ConfigurableFieldSpec]rO   r   rx   r%   r9   r   )r   r   r   r   r   r   r   r   r   r   rT   r   r+   r1   r.   r   r   >  sm    9v ,+)5 5@ M,M	,M M /3'&+'&	7'& '&r1   r   c                      \ rS rSrSrSrg)StrEnumi  zString enum.r+   N)r   r   r   r   r   r   r+   r1   r.   r   r     s    r1   r   ztWeakValueDictionary[ConfigurableFieldSingleOption | ConfigurableFieldMultiOption | ConfigurableField, type[StrEnum]]_enums_for_specc                      \ rS rSr% SrS\S'    S\S'    SrS\S	'    S
\S'    \\SS j5       5       r	\    SS j5       r
 S   SS jjrSrg) RunnableConfigurableAlternativesi  aB  `Runnable` that can be dynamically configured.

A `RunnableConfigurableAlternatives` should be initiated using the
`configurable_alternatives` method of a `Runnable` or can be
initiated directly as well.

Here is an example of using a `RunnableConfigurableAlternatives` that uses
alternative prompts to illustrate its functionality:

    ```python
    from langchain_core.runnables import ConfigurableField
    from langchain_openai import ChatOpenAI

    # This creates a RunnableConfigurableAlternatives for Prompt Runnable
    # with two alternatives.
    prompt = PromptTemplate.from_template(
        "Tell me a joke about {topic}"
    ).configurable_alternatives(
        ConfigurableField(id="prompt"),
        default_key="joke",
        poem=PromptTemplate.from_template("Write a short poem about {topic}"),
    )

    # When invoking the created RunnableSequence, you can pass in the
    # value for your ConfigurableField's id which in this case will either be
    # `joke` or `poem`.
    chain = prompt | ChatOpenAI(model="gpt-3.5-turbo-0125", temperature=0)

    # The `with_config` method brings in the desired Prompt Runnable in your
    # Runnable Sequence.
    chain.with_config(configurable={"prompt": "poem"}).invoke({"topic": "bears"})
    ```

Equivalently, you can initialize `RunnableConfigurableAlternatives` directly
and use in LCEL in the same way:

    ```python
    from langchain_core.runnables import ConfigurableField
    from langchain_core.runnables.configurable import (
        RunnableConfigurableAlternatives,
    )
    from langchain_openai import ChatOpenAI

    prompt = RunnableConfigurableAlternatives(
        which=ConfigurableField(id="prompt"),
        default=PromptTemplate.from_template("Tell me a joke about {topic}"),
        default_key="joke",
        prefix_keys=False,
        alternatives={
            "poem": PromptTemplate.from_template("Write a short poem about {topic}")
        },
    )
    chain = prompt | ChatOpenAI(model="gpt-3.5-turbo-0125", temperature=0)
    chain.with_config(configurable={"prompt": "poem"}).invoke({"topic": "bears"})
    ```
r   whichzJdict[str, Runnable[Input, Output] | Callable[[], Runnable[Input, Output]]]alternativesr&   r   default_keyr   prefix_keysc                   [            [        R                  U R                  5      =n(       a  O[	        U R                  R
                  =(       d    U R                  R                  S / [        U R                  R                  5       5      QU R                  P 5       5      n[        SU5      [        U R                  '   S S S 5        [        [        U R                  R                  U R                  R
                  U R                  R                  WU R                  U R                  R                  S9/U R                   (       aS  U R"                  R$                   Vs/ s H1  n['        X R                  R                   SU R                   35      PM3     snOU R"                  R$                  -   U R                  R)                  5        VVVs/ s Hg  u  p4[+        U[,        5      (       d  M  UR$                    H:  nU R                   (       a$  ['        X R                  R                   SU 35      OUPM<     Mi     snnn-   5      $ ! , (       d  f       GN= fs  snf s  snnnf )Nc              3  (   #    U  H  nX4v   M
     g 7fr9   r+   re   r   s     r.   rh   @RunnableConfigurableAlternatives.config_specs.<locals>.<genexpr>0  s      !TA !T   type[StrEnum]r   ==)_enums_for_spec_lockr   r   r   r   r   r   r|   r   keysr   r   r    r   r   r   r   r&   r   prefix_config_specr   rS   r   )r<   
which_enumsalt_keyalts        r.   r   -RunnableConfigurableAlternatives.config_specs'  s    ",00<<z<$JJOO4tzz}}!T4(9(9(>(>(@#A!T4CSCS!T
 /3?J.O

+ " ' &zz}} $

 6 6) ,,"jj22	  ## "\\666 'qZZ]]O2d>N>N=O*PQ6
 \\..#4 %)$5$5$;$;$=	 %>LGc#78 ))A '' 'qZZ]]O2gY*GH * %>	) 
  	
 "!4	s   B8I8I
I,AI
Ic                    U R                  U R                  U R                  R                  " S0 UD6U R                  U R
                  U R                  S9$ )N)r   r&   r   r   r   r+   )rM   r   r&   r   r   r   r   r   s     r.   r   4RunnableConfigurableAlternatives.configurable_fieldsX  sQ     ~~**LL44>v>**((((  
 	
r1   Nc                p   [        U5      nUR                  S0 5      R                  U R                  R                  U R                  5      nU R
                  (       ai  [        S0 UESUR                  S0 5      R                  5        VVs0 s H+  u  p4[        X0R                  R                   SU S35      U_M-     snn0E5      nX R                  :X  a  U R                  U4$ X R                  ;   a0  U R                  U   n[        U[        5      (       a  XQ4$ U" 5       U4$ SU 3n[        U5      es  snnf )Nr   r   r   /zUnknown alternative: )r   r   r   r   r   r   r   r   _strremoveprefixr&   r   rS   r   
ValueError)r<   r(   r   r   r   r   msgs          r.   rT   )RunnableConfigurableAlternatives._prepared  s)    v&

>2.224::==$BRBRS "$*JJ~r$B$H$H$J%$JDA )zz}}oRwa,HI1L$J%	F $$$LL&))%%%##E*C#x((}$E6?"%eW-o%s   
2D2r+   r   r   r9   r   )r   r   r   r   r   r   r   r   r   r   r   rT   r   r+   r1   r.   r   r     s    7r H  + K 7
 -
  -
^ 	
,	
	,	
 	
 /3+	7 r1   r   c                X    U R                  U5      (       a  U R                  USS5      $ U $ )z6`str.removeprefix()` is only available in Python 3.9+. rt   )
startswithreplace)r   prefixs     r.   r   r     s(    '(||F';';199VR#BBr1   c           	         U R                   (       dO  [        U SU R                   3U R                  U R                  U R
                  U R                  U R                   S9$ U $ )aA  Prefix the id of a `ConfigurableFieldSpec`.

This is useful when a `RunnableConfigurableAlternatives` is used as a
`ConfigurableField` of another `RunnableConfigurableAlternatives`.

Args:
    spec: The `ConfigurableFieldSpec` to prefix.
    prefix: The prefix to add.

Returns:
    The prefixed `ConfigurableFieldSpec`.
r   r   )r   r   r   r   r   r   r&   )r   r  s     r.   r   r     s[    0 ~~ 	477)$((LLnn	
 r1   c           	        [            [        R                  U 5      =n(       a  Od[        U R                  =(       d    U R
                  S [        U R                  R                  5       5       5       5      n[        SU5      [        U '   SSS5        [        U [        5      (       aI  [        U R
                  U R                  U R                  =(       d    UWU R                  U R                  S9$ [        U R
                  U R                  U R                  =(       d    U[         W   U R                  U R                  S9$ ! , (       d  f       N= f)aF  Make options spec.

Make a `ConfigurableFieldSpec` for a `ConfigurableFieldSingleOption` or
`ConfigurableFieldMultiOption`.

Args:
    spec: The `ConfigurableFieldSingleOption` or `ConfigurableFieldMultiOption`.
    description: The description to use if the spec does not have one.

Returns:
    The `ConfigurableFieldSpec`.
c              3  (   #    U  H  oU4v   M
     g 7fr9   r+   r   s     r.   rh   $make_options_spec.<locals>.<genexpr>  s     ;!:AQ!:r   r   Nr   )r   r   r   r   r   r   r|   r   r   r   rS   r   r   r   r&   r   r   )r   r   enums      r.   r   r     s      
"&&t,,4,		$TWW;dll&7&7&9!:;D %)$$?OD! 
 $566$ww((7KLLnn
 	
 !77YY$$3D>.. % 
	s   BD??
E)r   r   r  r   rx   r   )r   r   r  r   rx   r   )r   z<ConfigurableFieldSingleOption | ConfigurableFieldMultiOptionr   z
str | Nonerx   r   );r   
__future__r   r  	threadingabcr   collections.abcr   r   r   r   	functoolsr	   typingr
   r   r   weakrefr   pydanticr   r   typing_extensionsr   langchain_core.runnables.baser   r   langchain_core.runnables.configr   r   r   r   r   langchain_core.runnables.utilsr   r   r   r   r   r   r   r   r    langchain_core.runnables.graphr!   r#   r   r   Enumr   r   r   Lockr   r   r   r   r   r+   r1   r.   <module>r     s   < "      
 ( * & H 
 
 
 4J*5&=9 JZM&!? M&bc499     
 !~~' cuf}'E cLC

),:)
F)) )r1   