
    dha                     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 Wikipedia API.    )OptionalType)CallbackManagerForToolRun)BaseTool)	BaseModelField)WikipediaAPIWrapperc                   0    \ rS rSr% Sr\" SS9r\\S'   Sr	g)WikipediaQueryInput   z"Input for the WikipediaQuery tool.zquery to look up on wikipedia)descriptionquery N)
__name__
__module____qualname____firstlineno____doc__r   r   str__annotations____static_attributes__r       `/var/www/html/shao/venv/lib/python3.13/site-packages/langchain_community/tools/wikipedia/tool.pyr   r      s    ,#BCE3Cr   r   c                   v    \ rS rSr% SrSr\\S'   Sr\\S'   \	\S'   \
r\\   \S'    SS
\S\\   S\4S jjrSrg	)WikipediaQueryRun   z%Tool that searches the Wikipedia API.	wikipedianamezA wrapper around Wikipedia. Useful for when you need to answer general questions about people, places, companies, facts, historical events, or other subjects. Input should be a search query.r   api_wrapperargs_schemaNr   run_managerreturnc                 8    U R                   R                  U5      $ )zUse the Wikipedia tool.)r   run)selfr   r!   s      r   _runWikipediaQueryRun._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      sh    /D#	*   %$#6Ki6
 <@++ 78+ 
	+ +r   r   N)r   typingr   r   langchain_core.callbacksr   langchain_core.toolsr   pydanticr   r   'langchain_community.utilities.wikipediar	   r   r   r   r   r   <module>r-      s1    ! ! > ) % GD) D+ +r   