o
    |qi¹  ã                   @   sP   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	 G dd„ deƒZ
dS )	é    )ÚOptional)ÚCallbackManagerForToolRun)ÚBaseTool)ÚField)ÚPubMedAPIWrapperc                   @   sZ   e Zd ZU dZdZeed< dZeed< ee	dZ
e	ed< 	dd	ed
ee defdd„ZdS )ÚPubmedQueryRunz"Tool that searches the PubMed API.Zpub_medÚnamezáA wrapper around PubMed. Useful for when you need to answer questions about medicine, health, and biomedical topics from biomedical literature, MEDLINE, life science journals, and online books. Input should be a search query.Údescription)Údefault_factoryÚapi_wrapperNÚqueryÚrun_managerÚreturnc                 C   s   | j  |¡S )zUse the PubMed tool.)r   Úrun)Úselfr   r   © r   úl/home/app/PaddleOCR-VL/.venv_paddleocr/lib/python3.10/site-packages/langchain_community/tools/pubmed/tool.pyÚ_run   s   zPubmedQueryRun._run)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚstrÚ__annotations__r	   r   r   r   r   r   r   r   r   r   r   r   
   s   
 
ÿýþýür   N)Útypingr   Zlangchain_core.callbacksr   Zlangchain_core.toolsr   Zpydanticr   Z$langchain_community.utilities.pubmedr   r   r   r   r   r   Ú<module>   s    