
    7|hg                         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e      Z G d	 d
e
      Zy)    )ListOptionalType)AsyncCallbackManagerForToolRunCallbackManagerForToolRun)Document)BaseTool)	BaseModelField)YouSearchAPIWrapperc                   .    e Zd ZU dZ ed      Zeed<   y)YouInputz"Input schema for the you.com tool.zshould be a search query)descriptionqueryN)__name__
__module____qualname____doc__r   r   str__annotations__     a/var/www/html/test/engine/venv/lib/python3.12/site-packages/langchain_community/tools/you/tool.pyr   r      s    ,#=>E3>r   r   c                       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      Zeed<   	 dd
edee   dee   fdZ	 dd
edee   dee   fdZy	)YouSearchToolz#Tool that searches the you.com API.
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_wrapperNr   run_managerreturnc                 8    | j                   j                  |      S )zUse the you.com tool.)r    resultsselfr   r!   s      r   _runzYouSearchTool._run   s     ''..r   c                 T   K   | j                   j                  |       d{   S 7 w)z$Use the you.com tool asynchronously.N)r    results_asyncr%   s      r   _arunzYouSearchTool._arun'   s%      %%33E::::s   (&()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    -D#	-   $,Ki+',=P'QK$Q
 <@// 78/ 
h	/ AE;; <=; 
h	;r   r   N)typingr   r   r   langchain_core.callbacksr   r   langchain_core.documentsr   langchain_core.toolsr	   pydanticr
   r   !langchain_community.utilities.your   r   r   r   r   r   <module>r1      s6    ' ' . ) % A?y ?;H ;r   