a
    bg                     @   sl   d Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	m
Z
 ddlmZ G dd de	ZG d	d
 d
eZdS )zTool for the Google Books API.    )OptionalType)CallbackManagerForToolRun)BaseTool)	BaseModelField)GoogleBooksAPIWrapperc                   @   s$   e Zd ZU dZeddZeed< dS )GoogleBooksQueryInputz$Input for the GoogleBooksQuery tool.z query to look up on google books)descriptionqueryN)__name__
__module____qualname____doc__r   r   str__annotations__ r   r   t/var/www/html/cobodadashboardai.evdpl.com/venv/lib/python3.9/site-packages/langchain_community/tools/google_books.pyr	      s   
r	   c                   @   sZ   e Zd ZU dZdZeed< dZeed< eed< e	Z
ee ed< deee ed	d
dZdS )GoogleBooksQueryRunz(Tool that searches the Google Books API.ZGoogleBooksnamezA wrapper around Google Books. Useful for when you need to answer general inquiries about books of certain topics and generate recommendation based off of key wordsInput should be a query stringr
   api_wrapperargs_schemaN)r   run_managerreturnc                 C   s   | j |S )zUse the Google Books tool.)r   run)selfr   r   r   r   r   _run    s    zGoogleBooksQueryRun._run)N)r   r   r   r   r   r   r   r
   r   r	   r   r   r   r   r   r   r   r   r   r   r      s   

 r   N)r   typingr   r   Zlangchain_core.callbacksr   Zlangchain_core.toolsr   Zpydanticr   r   Z*langchain_community.utilities.google_booksr   r	   r   r   r   r   r   <module>   s   