U
    h                     @   s2   d Z ddlZddlmZ eee edddZdS )z&Common utility functions for LLM APIs.    N)List)textstopreturnc                 C   s   t jd|| ddd S )z1Cut off the text as soon as any stop words occur.|   )maxsplitr   )resplitjoin)r   r    r   B/tmp/pip-unpacked-wheel-9gdii04g/langchain_community/llms/utils.pyenforce_stop_tokens   s    r   )__doc__r	   typingr   strr   r   r   r   r   <module>   s   