o
    }!g                     @   s   d dl mZmZmZmZmZ d dlmZ dZdZ	de
fddZeded fd	d
Zeeeef ee eeee
df Zeeef ZdS )    )AnyDictListUnion	Generator)contextmanagerz*cannot be called from a running event loopzrThe event loop is already running. Add `import nest_asyncio; nest_asyncio.apply()` to your code to fix this issue.returnc               	   C   s6   zddl m}  |  jjdkW S  ttfy   Y dS w )z0Check if we're running in a Jupyter environment.r   get_ipythonZMQInteractiveShellF)IPythonr
   	__class____name__ImportErrorAttributeErrorr	    r   d/mnt/skqttb/ctump_chatbot/chatbot/lib/python3.10/site-packages/llama_cloud_services/extract/utils.py
is_jupyter   s   r   )NNNc               
   c   s>    zdV  W dS  t y }  ztt| v rt t d} ~ ww )zPContext manager to add helpful information for errors due to nested event loops.N)RuntimeErrornest_asyncio_errstrnest_asyncio_msg)er   r   r   augment_async_errors   s   r   N)typingr   r   r   r   r   
contextlibr   r   r   boolr   r   r   intfloatJSONTypeJSONObjectTyper   r   r   r   <module>   s    
"
