
    @h                         S SK r S SKJrJrJr  S SKJrJr  S SKJ	r	  1 Skr
SSSS.S\S\\\\4      S	\\\\4      S
\\   S\\/\4   4
S jjrg)    N)AnyCallableOptional)internalwarn_deprecated)is_interactive_env>   	langchainlangchain_corelangchain_community)module_lookupdeprecated_lookupsfallback_modulepackager   r   r   returnc                l   ^ ^^^ 0 T=(       d    0 EU=(       d    0 EmS[         S[        4UUUU 4S jjnU$ )a  Create a function that helps retrieve objects from their new locations.

The goal of this function is to help users transition from deprecated
imports to new imports.

The function will raise deprecation warning on loops using
deprecated_lookups or fallback_module.

Module lookups will import without deprecation warnings (used to speed
up imports from large namespaces like llms or chat models).

This function should ideally only be used with deprecated imports not with
existing imports that are valid, as in addition to raising deprecation warnings
the dynamic imports can create other issues for developers (e.g.,
loss of type information, IDE support for going to definition etc).

Args:
    package: current package. Use __package__
    module_lookup: maps name of object to the module where it is defined.
        e.g.,
        {
            "MyDocumentLoader": (
                "langchain_community.document_loaders.my_document_loader"
            )
        }
    deprecated_lookups: same as module look up, but will raise
        deprecation warnings.
    fallback_module: module to import from if the object is not found in
        module_lookup or if module_lookup is not provided.

Returns:
    A function that imports objects from the specified modules.
namer   c                   > T(       a  U T;   a  TU    nUR                  S5      S   [        ;  a  SU S[         3n[        U5      e [        R                  " U5      n [        X05      n[        5       (       dE  T(       a>  U T;   a8  [        R                  " S	S
9(       d  [        SSSSU  ST	 ST	 SU  SU SU  S3S9  U$ T(       ak   [        R                  " T5      n[        X05      n[        5       (       d8  [        R                  " S	S
9(       d  [        SSSSU  ST	 ST	 SU  ST SU  S3S9  U$ ST	 SU  3n[        U5      e! [
         a.  nUR                  S5      (       a  SU S3n[        U5      Uee SnAff = f! [         a  nSU SU  3n[        U5      UeSnAff = f! [         a  nST SU  3n[        U5      UeSnAff = f)z'Import stores from langchain_community..r   zImporting from z1 is not allowed. Allowed top-level packages are: r   zModule z not found. Please install langchain-community to access this module. You can install it using `pip install -U langchain-community`N   )depthz0.1Fz1.0z
Importing z from z< is deprecated. Please replace deprecated imports:

>> from z import z 

with new imports of:

>> from z
You can use the langchain cli to **automatically** upgrade many imports. Please see documentation here <https://python.langchain.com/docs/versions/v0_2/>)sincependingremovalmessagezmodule z has no attribute )splitALLOWED_TOP_LEVEL_PKGSAssertionError	importlibimport_moduleModuleNotFoundError
startswithgetattrr   r   is_caller_internalr   	ExceptionAttributeError)
r   
new_modulemsgmoduleeresultall_module_lookupr   r   r   s
         T/var/www/html/shao/venv/lib/python3.13/site-packages/langchain/_api/module_import.pyimport_by_name'create_importer.<locals>.import_by_name9   sX    ):!:*40J$Q'/EE%j\ 277M6NP  %S))
"00<1 .*,,* 22 %77a@## % %(fWI >''.ixv >''1l(4& AQ	Q& M1"00A .*,, %77a@## % %(fWI >''.ixv >''6&7xv FQ	Q( My 24&9S!!a ' (()>??!* .X X 
 .c29L  1
|+=dVD$S)q01F  100B4&I$S)q01sJ   E AF  A(F& 
E=)E88E= 
F#
FF#&
G	0GG	)strr   )r   r   r   r   r-   r+   s   ` `` @r,   create_importerr0      sG    P P.4"O-:M2O^"S ^"S ^" ^"@     )r   typingr   r   r   langchain_core._apir   r   langchain._api.interactive_envr   r   r/   dictr0    r1   r,   <module>r7      s     * * 9 =  /337%)JJ DcN+J !c3h0	J
 c]J seSjJr1   