From a9799b6732e1b1093bd67b5d8fd1ccce9dbad8ee Mon Sep 17 00:00:00 2001 From: Andrew Liu Date: Wed, 26 Jun 2024 03:08:12 +0000 Subject: [PATCH] change to hackmit --- client/src/routes/inbox.tsx | 4 ++-- server/config.py | 2 +- server/controllers/emails.py | 8 ++++---- server/nlp/responses.py | 9 ++++----- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/client/src/routes/inbox.tsx b/client/src/routes/inbox.tsx index 50c474236..32a9dc33e 100644 --- a/client/src/routes/inbox.tsx +++ b/client/src/routes/inbox.tsx @@ -703,7 +703,7 @@ export default function InboxPage() { .filter( (email) => email.sender === - '"Blueprint Team" ', + '"HackMIT Team" ', ) .map((email) => activeThread.emailList.indexOf(email)), )} @@ -713,7 +713,7 @@ export default function InboxPage() { key={email.id} bullet={ email.sender === - '"Blueprint Team" ' && ( + '"HackMIT Team" ' && ( str: MAIL_PASSWORD = _get_config_option("MAIL_PASSWORD", "test_mail_password") MAIL_CC = _get_config_option("MAIL_CC", "test_mail_cc") -MAIL_SENDER_TAG = f'"Blueprint Team" <{MAIL_USERNAME}>' +MAIL_SENDER_TAG = f'"HackMIT Team" <{MAIL_USERNAME}>' AUTH_CLIENT_ID = _get_config_option("AUTH_CLIENT_ID", "test_auth_client_id") AUTH_CLIENT_SECRET = _get_config_option("AUTH_CLIENT_SECRET", "test_auth_client_secret") diff --git a/server/controllers/emails.py b/server/controllers/emails.py index b6745ef7a..2cb835ee6 100644 --- a/server/controllers/emails.py +++ b/server/controllers/emails.py @@ -247,10 +247,10 @@ def receive_email(): print( "data from", data["From"], - "blueprint@my.hackmit.org" not in data["From"], + "hackmit@my.hackmit.org" not in data["From"], flush=True, ) - if "blueprint@my.hackmit.org" not in data["From"] and replied_to_email: + if "hackmit@my.hackmit.org" not in data["From"] and replied_to_email: thread = db.session.execute( select(Thread).where(Thread.id == replied_to_email.thread_id) ).scalar() @@ -400,7 +400,7 @@ def send_email(): msg = email.mime.multipart.MIMEMultipart() msg["Subject"] = reply_to_email.subject # msg["FROM"] = MAIL_SENDER_TAG - msg["FROM"] = '"Blueprint Team" ' + msg["FROM"] = '"HackMIT Team" ' msg["In-Reply-To"] = reply_to_email.message_id msg["References"] = reply_to_email.message_id to_email_addresses = [thread.first_sender, MAIL_CC] @@ -426,7 +426,7 @@ def send_email(): thread.resolved = True reply_email = Email( datetime.now(timezone.utc), - '"Blueprint Team" ', + '"HackMIT Team" ', reply_to_email.subject, clean_text, get_full_message_id(response["MessageId"]), diff --git a/server/nlp/responses.py b/server/nlp/responses.py index acadde10f..ba48612cd 100644 --- a/server/nlp/responses.py +++ b/server/nlp/responses.py @@ -16,7 +16,7 @@ openai.api_key = OPENAI_API_KEY -MODEL = "gpt-3.5-turbo" +MODEL = "gpt-4o" def openai_response(thread: list[OpenAIMessage], sender: str) -> str: @@ -32,13 +32,12 @@ def openai_response(thread: list[OpenAIMessage], sender: str) -> str: messages = [ { "role": "system", - "content": f"You are an organizer for Blueprint, a hackathon for high \ - schoolers led by the organizers of HackMIT. You are responsible for \ + "content": f"You are an organizer for HackMIT. You are responsible for \ responding to an email from a participant. \ Please write an email response to the participant. Begin the email with \ the header 'Dear [First Name]' where '[First Name]' is the participant's \ - first name and end the email with the footer 'Best regards, The Blueprint \ - Team'. Do not include the subject line in your response. \ + first name and end the email with the footer 'Best regards, The \ + HackMIT Team'. Do not include the subject line in your response. \ The participant's email address is {sender}.\ You receive documents to help you answer the email. \ Please do not include information that is not explicitly stated in the \