Skip to content

Commit

Permalink
Revert "remove depressed marvin"
Browse files Browse the repository at this point in the history
This reverts commit 06de292.
  • Loading branch information
jimil749 committed Jul 31, 2024
1 parent 06de292 commit 945f097
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions reminder.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,11 @@ def next_daily(today):

@staticmethod
def get_openai_message(meeting_type, zoom_link, time_until_meeting):
character = ["Your character is Marvin from Hitchhiker's Guide To The Galaxy.",
"You are super hyped for everything.",]
character = ["Marvin from Hitchhiker's Guide To The Galaxy."]
client = OpenAI(timeout=httpx.Timeout(15.0, read=5.0, write=10.0, connect=3.0), api_key=os.environ.get("OPENAI_API_KEY"),)
prompt = (
f"You are a chatbot that announces the next meeting."
f"{character[1]}."
f"Your character is {random.choice(character)}."
f"The meeting is happening in {time_until_meeting} minutes and it is a {meeting_type} meeting. "
"Create a short text message for this announcement."
)
Expand All @@ -110,6 +109,7 @@ def get_openai_message(meeting_type, zoom_link, time_until_meeting):
messages=[
{"role": "system", "content": prompt}
],
max_tokens=50
)
message_content = response.choices[0].message.content.strip()
final_message = f"@**all** {message_content} \n\n [meeting]({zoom_link})."
Expand Down

0 comments on commit 945f097

Please sign in to comment.