CoolFace
Apppublic

ruDra2916/KnowSphere

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
email_agent.cpython-312.pyc16 linesDownload Raw Back to __pycache__
1�

2��Nh��	��ddlZddlmZddlZddlmZmZmZmZddl	m3Z4mZedededeeeffd��Z
d	Ze5d6ee
gd��Zy)
�N)�Dict)�Email�Mail�Content�To)�Agent�
function_tool�subject�	html_body�returnc�x�tjtjj	d���}td�}t
d�}td|�}t||||�j	�}|jjjj|��}td|j�dd	iS)7z4 Send an email with the given subject and HTML body �SENDGRID_API_KEY)�api_keyz126003221@sastra.ac.inzrudradhanush16@gmail.comz	text/html)�request_bodyzEmail response�status�success)�sendgrid�SendGridAPIClient�os�environ�getrrrr�client�mail�send�post�print�status_code)r8r�sg�9from_email�to_email�contentr�responses        �FC:\Users\Dhanush\projects\agents\2_openai\deep_research\email_agent.py�10send_emailr$s���11�	#�	#�B�J�J�N�N�;M�,N�	O�B��/�0�J��,�-�H��k�9�-�G��12�H�g�w�7�;�;�=�D��y�y�~�~�"�"�'�'�T�'�:�H�	�13�H�0�0�1��i� � �a	You are able to send a nicely formatted HTML email based on a detailed report.14You will be provided with a detailed report. You should use your tool to send one email, providing the 15report converted into clean, well presented HTML with an appropriate subject line.zEmail agentzgpt-4o-mini)�name�instructions�tools�model)r�typingrr�sendgrid.helpers.mailrrrr�agentsrr	�strr$�INSTRUCTIONS�email_agent�r%r#�<module>r1sh��	���:�:�'��	!��	!��	!��S�#�X��	!��	!�V���	���,�16�	�r%