o
    $i                  
   @   s  U d Z ddlZddlmZ ddlmZ d(dededefd	d
Zd)dededefddZ	dedefddZ
ed
dddddddddddgdededddddddd ddd!dgde	dedd"dddd#didgde
dd$Zeeef ed%< deeef fd&d'ZdS )*z0
Custom example tools for the OpenRouter Agent.
    N)Dict)ToolUScitycountryreturnc                 C   sz   dddddddddd	d
dddddd}| |v r7||  }d|  d| d|d  d|d  d|d  dS d|  dS )z?Simulated weather function - in production, connect to real APIH   SunnyA   )temp	conditionhumidity<   CloudyP   K   RainyZ   U   ClearF   )zNew YorkLondonTokyoSydneyzWeather in z, z: r   u   °F, r   z, Humidity: r   %zWeather data not available for z*. Try: New York, London, Tokyo, or Sydney. )r   r   weather_datadatar   r   7/var/www/apps/myagent/mysuperagent/core/tools/custom.pyget_weather   s   



0r      querynum_resultsc                 C   sT   d|  dd|  dd|  dd|  dd	|  d
g}d|  dd |d|  S )z;Simulated web search - in production, connect to search APIz1. z - Recent news articlez2. z - Wikipedia entryz3. z - Research paperz4. z - Blog postz5. z - Official documentationzSearch results for 'z':

N)join)r!   r"   resultsr   r   r   
search_web   s   




r&   r   c                 C   s*   zt | }t j|ddW S    |  Y S )Format data as JSON string   )indent)jsonloadsdumps)r   parsedr   r   r   format_json(   s
   
r.   z"Get weather information for a cityobjectstringzThe city name)typedescriptionzThe country code (optional))r1   r2   default)r   r   )r1   
propertiesrequired)namer2   
parametersfunctionzSearch the web for informationzThe search queryintegerzNumber of results to return)r!   r"   r'   zData to format as JSON)r   r&   r.   CUSTOM_TOOLSc                   C   s   t tS )z,Return a copy of the custom tools dictionary)dictr:   r   r   r   r   get_custom_toolsl   s   r<   )r   )r    )__doc__r*   typingr   core.modelsr   strr   intr&   r.   r:   __annotations__r<   r   r   r   r   <module>   sl    

;