Merge pull request #4209 from BerriAI/litellm_send_email_alerts_budget_exceeded

[Feat] send email alerts when budget exceeded
This commit is contained in:
Ishaan Jaff 2024-06-14 20:23:19 -07:00 committed by GitHub
commit 4bfd46d0a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 203 additions and 47 deletions

View file

@ -1967,6 +1967,9 @@ async def send_email(receiver_email, subject, html):
email_message["From"] = sender_email
email_message["To"] = receiver_email
email_message["Subject"] = subject
verbose_proxy_logger.debug(
"sending email from %s to %s", sender_email, receiver_email
)
# Attach the body to the email
email_message.attach(MIMEText(html, "html"))