a
    bgg                     @   s|   d dl mZmZmZ d dlmZmZ d dlmZ d dl	m
Z
 d dlmZmZ d dlmZ G dd deZG d	d
 d
e
ZdS )    )ListOptionalType)AsyncCallbackManagerForToolRunCallbackManagerForToolRun)Document)BaseTool)	BaseModelField)YouSearchAPIWrapperc                   @   s$   e Zd ZU dZeddZeed< dS )YouInputz"Input schema for the you.com tool.zshould be a search query)descriptionqueryN)__name__
__module____qualname____doc__r
   r   str__annotations__ r   r   p/var/www/html/cobodadashboardai.evdpl.com/venv/lib/python3.9/site-packages/langchain_community/tools/you/tool.pyr      s   
r   c                   @   s   e Zd ZU dZdZeed< dZeed< eZ	e
e ed< eedZeed< deee ee d
ddZdeee ee d
ddZd	S )YouSearchToolz#Tool that searches the you.com API.Z
you_searchnamez`The YOU APIs make LLMs and search experiences more factual andup to date with realtime web data.r   args_schema)default_factoryapi_wrapperN)r   run_managerreturnc                 C   s   | j |S )zUse the you.com tool.)r   resultsselfr   r   r   r   r   _run   s    zYouSearchTool._runc                    s   | j |I dH S )z$Use the you.com tool asynchronously.N)r   Zresults_asyncr   r   r   r   _arun'   s    zYouSearchTool._arun)N)N)r   r   r   r   r   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r!   r   r"   r   r   r   r   r      s$   

  r   N)typingr   r   r   Zlangchain_core.callbacksr   r   Zlangchain_core.documentsr   Zlangchain_core.toolsr   Zpydanticr	   r
   Z!langchain_community.utilities.your   r   r   r   r   r   r   <module>   s   