(20250120) Mail sending API ready.

This commit is contained in:
2025-01-20 14:14:02 +05:30
parent 1f8e13e1d5
commit f6636afe59
8 changed files with 442 additions and 73 deletions
+17 -2
View File
@@ -59,6 +59,7 @@ from models.message.mail.send import MailSendOneResult
# Mail Client(s):
from utils_v2.goog.controllers.gmail.gmail_client import AsyncGmailClient
from utils_v2.goog.controllers.gmail.gmail_message import GmailMessage
# To work with datatypes:
from typing import List, Any
@@ -151,7 +152,7 @@ class MailController(CoreMessageController, ABC):
role = "system",
content = (
"You're an expert mail summary assistant. That summarizes sent mails in 150 chars or less. "
"The objective of your user is to be able to recollect what a mail they sent was about from a brief "
"The objective of your user is to be able to recollect what the mail they sent was about from a brief "
"summary. Reply in a simple string, no formatting is allowed except emojis. Good luck :)"
)
)
@@ -523,7 +524,21 @@ class MailController(CoreMessageController, ABC):
# ┛ ┗┗┻┗┗ ┗┛┗ ┛┗┗┻┗┛┗┗┫
# ┛
pass
@abstractmethod
async def send_mail(
self,
sql_conn: AsyncMySQL,
mongo_data_conn: AsyncMongo,
mail_client: AsyncGmailClient,
mail_message: GmailMessage,
auth_token: CoreAuthTokenModel,
client_thread_id: str | None,
user_info: CoreUserInfoModel | None,
llm: CoreLLMController = None,
session_token: str = None
) -> MailSendOneResult:
pass
# ┳┳┓ •┓ ┳┳ ┓ •
# ┃┃┃┏┓┓┃ ┃┃┏┓┏┫┏┓╋┓┏┓┏┓