
    dh                         S r SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  \" SSS	S
9 " S S\5      5       r\" SSSS
9 " S S\5      5       rg)zTool for the Google search API.    )Optional)
deprecated)CallbackManagerForToolRun)BaseTool)GoogleSearchAPIWrapperz0.0.33z1.0z*langchain_google_community.GoogleSearchRun)sinceremovalalternative_importc                   b    \ rS rSr% SrSr\\S'   Sr\\S'   \	\S'    SS	\S
\
\   S\4S jjrSrg)GoogleSearchRun   z(Tool that queries the Google search API.google_searchnamezA wrapper around Google Search. Useful for when you need to answer questions about current events. Input should be a search query.descriptionapi_wrapperNqueryrun_managerreturnc                 8    U R                   R                  U5      $ zUse the tool.)r   runselfr   r   s      d/var/www/html/shao/venv/lib/python3.13/site-packages/langchain_community/tools/google_search/tool.py_runGoogleSearchRun._run   s     ##E**     N)__name__
__module____qualname____firstlineno____doc__r   str__annotations__r   r   r   r   r   __static_attributes__r   r   r   r   r      s\     3D#	*  
 ('
 <@++ 78+ 
	+ +r   r   z.langchain_google_community.GoogleSearchResultsc                   p    \ rS rSr% SrSr\\S'   Sr\\S'   Sr	\
\S'   \\S	'    SS\S\\   S\4S jjrSrg
)GoogleSearchResults%   z;Tool that queries the Google Search API and gets back json.google_search_results_jsonr   zA wrapper around Google Search. Useful for when you need to answer questions about current events. Input should be a search query. Output is a JSON array of the query resultsr      num_resultsr   Nr   r   r   c                 ^    [        U R                  R                  XR                  5      5      $ r   )r%   r   resultsr-   r   s      r   r   GoogleSearchResults._run6   s&     4##++E3C3CDEEr   r   r   )r    r!   r"   r#   r$   r   r%   r&   r   r-   intr   r   r   r   r'   r   r   r   r)   r)   %   sm     F,D#,	V  
 K''
 <@FF 78F 
	F Fr   r)   N)r$   typingr   langchain_core._api.deprecationr   langchain_core.callbacksr   langchain_core.toolsr   +langchain_community.utilities.google_searchr   r   r)   r   r   r   <module>r7      sl    %  6 > ) N 
C
+h +
+( 
G
F( F
Fr   