o
    Zh@                     @   sd   d dl mZm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G dd	 d	eZd
S )    )OptionalType)CallbackManagerForToolRun)BaseTool)	BaseModel)PolygonAPIWrapperc                   @   s   e Zd ZU dZeed< dS )Inputsz#Inputs for Polygon's Last Quote APIqueryN)__name__
__module____qualname____doc__str__annotations__ r   r   c/var/www/html/lang_env/lib/python3.10/site-packages/langchain_community/tools/polygon/last_quote.pyr   
   s   
 r   c                   @   sl   e Zd ZU dZdZeed< dZeed< dZeed< e	Z
ee ed< eed	< 	
ddedee defddZd
S )PolygonLastQuotez6Tool that gets the last quote of a ticker from PolygonZget_last_quotemodeZpolygon_last_quotenamezA wrapper around Polygon's Last Quote API. This tool is useful for fetching the latest price of a stock. Input should be the ticker that you want to query the last price quote for.descriptionargs_schemaapi_wrapperNr	   run_managerreturnc                 C   s   | j j| j|dS )zUse the Polygon API tool.)Zticker)r   runr   )selfr	   r   r   r   r   _run   s   zPolygonLastQuote._run)N)r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      s    
 
r   N)typingr   r   Zlangchain_core.callbacksr   Zlangchain_core.toolsr   Zpydanticr   Z%langchain_community.utilities.polygonr   r   r   r   r   r   r   <module>   s    