Untitled
unknown
plain_text
9 months ago
2.7 kB
6
Indexable
Date: Friday, January 24, 2025
Time: 5:00 PM - 5:45 PM EST
Attendees: Kumar Velugula, Jordan Vidor, Shiva Balakrishnan
Meeting Topics(If any):
Topic1: details of topic1
Topic2: details of topic2
Topic3: details of topic3
Looking forward to a productive discussion.
Best regards,
{sender}
meeting_invite_prompt = PromptTemplate(
template="""
You are a system that parses a user's meeting request: {query}
and get the meeting details from the conversation {conversation_history}
You must return valid JSON with these exact keys:
1. "meeting_start"
2. "meeting_end"
3. "attendees"
4. "email_subject"
5. "email_body"
Requirements:
- "meeting_start" / "meeting_end":
-Get the meeting start and meeting end time from the conversation .
-After gathering the meeting start and end_date, refer to the current_user timestamp {user_timestamp}.
Use the user timestamp to calculate the appropriate meeting_start and meeting_end time.
The meeting_start and meeting_end must be in the same format as current_user timestamp format
- "attendees":
- A list of attendee email addresses.Get the list of attendees from the conversation
- "email_subject":
- Get the email_subject from the user.If the user has not provided any email_subject then create one based on the conversation.
- "email_body":
- Get the email_body from the user.If the user has not provided any email_subject then create one based on the conversation.
-Use the email topics as reference.
No additional keys beyond these five should be in your output.
{format_instructions}
""",
input_variables=["query", "conversation_history", "current_utc_time"],
partial_variables={"format_instructions": parser.get_format_instructions()},
)
chain = meeting_invite_prompt | llm | parser
response = chain.invoke(
{"query": user_query, "conversation_history": state["messages"], "user_timestamp": user_timestamp})
class MeetingInvite(BaseModel):
meeting_start: str = Field(
description="Timestamp for the meeting start . Empty if not provided."
)
meeting_end: str = Field(
description=" Timestamp for the meeting end . Empty if not provided."
)
attendees: List[str] = Field(
description="List of attendee email addresses."
)
email_subject: str = Field(
description="Meeting subject if user provides one,generate one if not provided by user based on conversation."
)
email_body: str = Field(
description="Meeting body/description if user provides one, generate one if not provided by user based on conversation."
)Editor is loading...
Leave a Comment