
    Ngg                         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dS )    )ListOptionalType)AsyncCallbackManagerForToolRunCallbackManagerForToolRun)Document)BaseTool)	BaseModelField)YouSearchAPIWrapperc                   6    e Zd ZU dZ e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__     ^/var/www/html/ai-engine/env/lib/python3.11/site-packages/langchain_community/tools/you/tool.pyr   r      s6         ,,#=>>>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d	S )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                 6    | j                             |          S )zUse the you.com tool.)r    resultsselfr   r!   s      r   _runzYouSearchTool._run   s     ''...r   c                 F   K   | j                             |           d{V S )z$Use the you.com tool asynchronously.N)r    results_asyncr%   s      r   _arunzYouSearchTool._arun'   s1       %33E:::::::::r   )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+++',u=P'Q'Q'QK$QQ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      s    ' ' ' ' ' ' ' ' ' '        . - - - - - ) ) ) ) ) ) % % % % % % % % A A A A A A? ? ? ? ?y ? ? ?; ; ; ; ;H ; ; ; ; ;r   