
    Ng                        d dl mZ d dl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 )    )annotations)Optional)CallbackManagerForToolRun)BaseTool)	BaseModelField)JinaSearchAPIWrapperc                  6    e Zd ZU dZ ed          Zded<   dS )	JinaInputzInput for the Jina search tool.zsearch query to look up)descriptionstrqueryN)__name__
__module____qualname____doc__r   r   __annotations__     f/var/www/html/ai-engine/env/lib/python3.11/site-packages/langchain_community/tools/jina_search/tool.pyr   r      s7         ))#<===E======r   r   c                  ^    e Zd ZU dZdZded<   dZded<    ee          Z	ded	<   	 dddZ
d
S )
JinaSearchzCTool that queries the JinaSearch.

    ..versionadded:: 0.2.16
    jina_searchr   namea9  Jina Reader allows you to ground your LLM with the latest information from the web. Jina Reader will search the web and return the top five results with their URLs and contents, each in clean, LLM-friendly text. This way, you can always keep your LLM up-to-date, improve its factuality, and reduce hallucinations.r   )default_factoryr	   search_wrapperNr   run_manager#Optional[CallbackManagerForToolRun]returnc                6    | j                             |          S )zUse the tool.)r   run)selfr   r   s      r   _runzJinaSearch._run#   s     "&&u---r   )N)r   r   r   r   r   r   )r   r   r   r   r   r   r   r   r	   r   r#   r   r   r   r   r      s          
 D	I      ,15AU+V+V+VNVVVV
 <@. . . . . . .r   r   N)
__future__r   typingr   langchain_core.callbacksr   langchain_core.toolsr   pydanticr   r   )langchain_community.utilities.jina_searchr	   r   r   r   r   r   <module>r*      s    " " " " " "       > > > > > > ) ) ) ) ) ) % % % % % % % % J J J J J J> > > > >	 > > >. . . . . . . . . .r   