o
    g"                     @   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   R/var/www/html/chatdoc2/venv/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   old_verboser   r   r   get_verbose4   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_debugY   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   	old_debugr   r   r   	get_debugw   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   	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   old_llm_cacher   r   r   get_llm_cache   s   
r(   )r	   r   )__doc__r   typingr   r   langchain_core.cachesr   r   bool__annotations__r   r   r   r   r    r"   r&   r(   r   r   r   r   <module>   s    %# 