o
    Zh"                     @   s   U d Z ddlZddlmZmZ erddlmZ daee	d< da
ee	d< daed e	d	< d
eddfddZdefddZd
eddfddZdefddZd
ed ddfddZdddZdS )z?Global values and configuration that apply to all of LangChain.    N)TYPE_CHECKINGOptional)	BaseCacheF_verbose_debugr   
_llm_cachevaluereturnc                 C   r   z,ddl }t  tjddd | |_W d   n1 sw   Y  W | adS W | adS  ty8   Y | adS w )zSet a new value for the `verbose` global setting.

    Args:
        value: The new value for the `verbose` global setting.
    r   NignorezCImporting verbose from langchain root module is no longer supportedmessage	langchainwarningscatch_warningsfilterwarningsverboseImportErrorr   r   r    r   M/var/www/html/lang_env/lib/python3.10/site-packages/langchain_core/globals.pyset_verbose       
r   c                  C   h   z$ddl } t  tjddd | j}W d   n1 sw   Y  W n ty/   d}Y nw tp3|S )ztGet the value of the `verbose` global setting.

    Returns:
        The value of the `verbose` global setting.
    r   Nr   zE.*Importing verbose from langchain root module is no longer supportedr   Fr   )r   Zold_verboser   r   r   get_verbose5   s   
r   c                 C   r
   )z|Set a new value for the `debug` global setting.

    Args:
        value: The new value for the `debug` global setting.
    r   Nr   AImporting debug from langchain root module is no longer supportedr   r   r   r   r   debugr   r   r   r   r   r   	set_debug\   s    
r   c                  C   r   )zpGet the value of the `debug` global setting.

    Returns:
        The value of the `debug` global setting.
    r   Nr   r   r   Fr   )r   Z	old_debugr   r   r   	get_debug|   s   
r    c                 C   r
   )zSet a new LLM cache, overwriting the previous value, if any.

    Args:
        value: The new LLM cache to use. If `None`, the LLM cache is disabled.
    r   Nr   EImporting llm_cache from langchain root module is no longer supportedr   r   r   r   r   Z	llm_cacher   r   r   r   r   r   set_llm_cache   r   r#   c                  C   sh   z$ddl } t  tjddd | j}W d   n1 sw   Y  W n ty/   d}Y nw tp3|S )zxGet the value of the `llm_cache` global setting.

    Returns:
        The value of the `llm_cache` global setting.
    r   Nr   r!   r   r"   )r   Zold_llm_cacher   r   r   get_llm_cache   s   
r$   )r	   r   )__doc__r   typingr   r   Zlangchain_core.cachesr   r   bool__annotations__r   r   r   r   r   r    r#   r$   r   r   r   r   <module>   s    "' $"