o
    ®©Zhn  ã                   @   sH   d Z ddlmZ ddlmZ ddlmZ ddlmZ G dd„ deƒZ	dS )	zTool for the Golden API.é    )ÚOptional)ÚCallbackManagerForToolRun)ÚBaseTool)ÚGoldenQueryAPIWrapperc                   @   sP   e Zd ZU dZdZeed< dZeed< eed< 	dded	e	e
 d
efdd„ZdS )ÚGoldenQueryRunzNTool that adds the capability to query using the Golden API and get back JSON.Zgolden_queryÚnameaI  A wrapper around Golden Query API. Useful for getting entities that match a natural language query from Golden's Knowledge Base.
Example queries:
- companies in nanotech
- list of cloud providers starting in 2019
Input should be the natural language query.
Output is a paginated list of results or an error object in JSON format.ÚdescriptionÚapi_wrapperNÚqueryÚrun_managerÚreturnc                 C   s   | j  |¡S )zUse the Golden tool.)r	   Úrun)Úselfr
   r   © r   úb/var/www/html/lang_env/lib/python3.10/site-packages/langchain_community/tools/golden_query/tool.pyÚ_run   s   zGoldenQueryRun._run)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚstrÚ__annotations__r   r   r   r   r   r   r   r   r   r      s   
 
ÿýþýür   N)
r   Útypingr   Zlangchain_core.callbacksr   Zlangchain_core.toolsr   Z*langchain_community.utilities.golden_queryr   r   r   r   r   r   Ú<module>   s    