
    Ng@                     ~    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e          Z G d d	e          Zd
S )    )OptionalType)CallbackManagerForToolRun)BaseTool)	BaseModel)PolygonAPIWrapperc                       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__     h/var/www/html/ai-engine/env/lib/python3.11/site-packages/langchain_community/tools/polygon/last_quote.pyr
   r
   
   s         --JJJJJr   r
   c                       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Zd
S )PolygonLastQuotez6Tool that gets the last quote of a ticker from Polygonget_last_quotemode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                 D    | j                             | j        |          S )zUse the Polygon API tool.)ticker)r   runr   )selfr   r   s      r   _runzPolygonLastQuote._run   s"     ##DIe#<<<r   )N)r   r   r   r   r   r   r   r   r   r
   r   r   r   r   r   r   r$   r   r   r   r   r      s         @@ D#   $D#$$$	V    
 $*Ki)))""""
 <@= == 78= 
	= = = = = =r   r   N)typingr   r   langchain_core.callbacksr   langchain_core.toolsr   pydanticr   %langchain_community.utilities.polygonr   r
   r   r   r   r   <module>r*      s    ! ! ! ! ! ! ! ! > > > > > > ) ) ) ) ) )       C C C C C C    Y   = = = = =x = = = = =r   