a
    bg6                     @   s   d Z 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
 eddd	d
G dd deZedddd
G dd deZdS )zTool for the Google search API.    )Optional)
deprecated)CallbackManagerForToolRun)BaseTool)GoogleSearchAPIWrapperz0.0.33z1.0z*langchain_google_community.GoogleSearchRun)ZsinceZremovalZalternative_importc                   @   sJ   e Zd ZU dZdZeed< dZeed< eed< dee	e
 edd	d
ZdS )GoogleSearchRunz(Tool that queries the Google search API.Z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                 C   s   | j |S zUse the tool.)r
   runselfr   r    r   z/var/www/html/cobodadashboardai.evdpl.com/venv/lib/python3.9/site-packages/langchain_community/tools/google_search/tool.py_run   s    zGoogleSearchRun._run)N)__name__
__module____qualname____doc__r   str__annotations__r	   r   r   r   r   r   r   r   r   r      s   

 r   z.langchain_google_community.GoogleSearchResultsc                   @   sV   e Zd ZU dZdZeed< dZeed< dZe	ed< e
ed< deee ed
ddZd	S )GoogleSearchResultsz;Tool that queries the Google Search API and gets back json.Z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   c                 C   s   t | j|| jS r   )r   r
   resultsr   r   r   r   r   r   6   s    zGoogleSearchResults._run)N)r   r   r   r   r   r   r   r	   r   intr   r   r   r   r   r   r   r   r   %   s   

 r   N)r   typingr   Zlangchain_core._api.deprecationr   Zlangchain_core.callbacksr   Zlangchain_core.toolsr   Z+langchain_community.utilities.google_searchr   r   r   r   r   r   r   <module>   s"   