a
    bg9                     @   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 Dataherald Hosted API    )OptionalType)CallbackManagerForToolRun)BaseTool)	BaseModelField)DataheraldAPIWrapperc                   @   s    e Zd ZU eddZeed< dS )DataheraldTextToSQLInputz7Natural language query to be translated to a SQL query.)descriptionpromptN)__name__
__module____qualname__r   r   str__annotations__ r   r   w/var/www/html/cobodadashboardai.evdpl.com/venv/lib/python3.9/site-packages/langchain_community/tools/dataherald/tool.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 )DataheraldTextToSQLz+Tool that queries using the Dataherald SDK.Z
dataheraldnamezcA wrapper around Dataherald. Text to SQL. Input should be a prompt and an existing db_connection_idr
   api_wrapperargs_schemaN)r   run_managerreturnc                 C   s   | j |S )zUse the Dataherald tool.)r   run)selfr   r   r   r   r   _run   s    zDataheraldTextToSQL._run)N)r   r   r   __doc__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.dataheraldr   r	   r   r   r   r   r   <module>   s   