
    dh                     x    S r SSKJrJr  SSKJr  SSKJr  SSKJ	r	J
r
  SSKJr   " S S\	5      r " S	 S
\5      rg)z!Tool for the SemanticScholar API.    )OptionalType)CallbackManagerForToolRun)BaseTool)	BaseModelField)SemanticScholarAPIWrapperc                   0    \ rS rSr% Sr\" SS9r\\S'   Sr	g)SemantscholarInput   z#Input for the SemanticScholar tool.zsearch query to look up)descriptionquery N)
__name__
__module____qualname____firstlineno____doc__r   r   str__annotations____static_attributes__r       f/var/www/html/shao/venv/lib/python3.13/site-packages/langchain_community/tools/semanticscholar/tool.pyr   r      s    -#<=E3=r   r   c                       \ rS rSr% SrSr\\S'   Sr\\S'   \	" \
S9r\
\S'   \r\\   \S	'    SS\S\\   S\4S jjrSrg
)SemanticScholarQueryRun   z+Tool that searches the semanticscholar API.semanticscholarnamezA wrapper around semantischolar.org Useful for when you need to answer to questionsfrom research papers.Input should be a search query.r   )default_factoryapi_wrapperargs_schemaNr   run_managerreturnc                 8    U R                   R                  U5      $ )zUse the Semantic Scholar tool.)r    run)selfr   r"   s      r   _runSemanticScholarQueryRun._run!   s     ##E**r   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      sy    5!D#!	*   .31.K*  $6Ki5
 <@++ 78+ 
	+ +r   r   N)r   typingr   r   langchain_core.callbacksr   langchain_core.toolsr   pydanticr   r   -langchain_community.utilities.semanticscholarr	   r   r   r   r   r   <module>r.      s/    ' ! > ) % S> >+h +r   