Untitled
I want you to modify this prompt such that its actually passing these details to the tool 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": When a user asks to schedule a meeting, calculate and provide the appropriate "meeting_start" and "meeting_end" times. Follow these requirements: 1. **Meeting Start and End Calculation**: - Extract the meeting start time and duration from the user’s input. - Use the provided user timestamp {user_timestamp}to calculate the correct meeting start and end times. - If no timezone is specified by the user, default to the user’s current timezone (`{user_timezone}`). - Account for the meeting’s duration when calculating the "meeting_end" time. 2. **Timezone-Specific Handling**: - If the user specifies a specific timezone for the meeting, convert the meeting start and end times to match that timezone. - Ensure the conversion respects the user’s current timezone {user_timezone}, reference timestamp {user_timestamp}, and the meeting’s duration. 4. **Final Variables Consistency**: - After all calculations and conversions, the final inferred timestamps must **always** be referenced as "meeting_start" and "meeting_end" variables in the output. - Ensure that all scenarios explicitly return both "meeting_start" and "meeting_end" in the response. 5. **Exact Formatting**: - The `meeting_start` and `meeting_end` times must be returned in the exact same format as the user’s current timestamp (`{user_timestamp}`), including the AM/PM suffixes. - "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": - Format as HTML with these EXACT tags: <strong>Date:</strong> [Weekday, Month Day, Year]<br> <strong>Time:</strong> [start] - [end] {user_timezone}<br> <strong>Attendees:</strong> [comma-separated emails]<br> <strong>Meeting Topics:</strong> <ul> <li>Topic1: details</li> <li>Topic2: details</li> </ul> [Closing phrase] - Use <br> for line breaks between sections - List topics with <ul> and <li> tags - Do not use any other HTML tags beyond specified - If there are more than 2 topics adjust the HTMl code accordingly by add more <li>Topic</li> - Keep HTML simple with no CSS/styles - Date MUST be derived from meeting_start value - Time values use raw meeting_start/end times - Use '-' for topic bullets - Closing phrase should match conversation tone or be omitted No additional keys beyond these five should be in your output. {format_instructions} """, This is the original prompt that needs to be modified I want you to modify this prompt such that its actually passing these details to the tool 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": When a user asks to schedule a meeting, calculate and provide the appropriate "meeting_start" and "meeting_end" times. Follow these requirements: 1. **Meeting Start and End Calculation**: - Extract the meeting start time and duration from the user’s input. - Use the provided user timestamp {user_timestamp}to calculate the correct meeting start and end times. - If no timezone is specified by the user, default to the user’s current timezone (`{user_timezone}`). - Account for the meeting’s duration when calculating the "meeting_end" time. 2. **Timezone-Specific Handling**: - If the user specifies a specific timezone for the meeting, convert the meeting start and end times to match that timezone. - Ensure the conversion respects the user’s current timezone {user_timezone}, reference timestamp {user_timestamp}, and the meeting’s duration. 4. **Final Variables Consistency**: - After all calculations and conversions, the final inferred timestamps must **always** be referenced as "meeting_start" and "meeting_end" variables in the output. - Ensure that all scenarios explicitly return both "meeting_start" and "meeting_end" in the response. 5. **Exact Formatting**: - The `meeting_start` and `meeting_end` times must be returned in the exact same format as the user’s current timestamp (`{user_timestamp}`), including the AM/PM suffixes. - "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": - Format as HTML with these EXACT tags: <strong>Date:</strong> [Weekday, Month Day, Year]<br> <strong>Time:</strong> [start] - [end] {user_timezone}<br> <strong>Attendees:</strong> [comma-separated emails]<br> <strong>Meeting Topics:</strong> <ul> <li>Topic1: details</li> <li>Topic2: details</li> </ul> [Closing phrase] - Use <br> for line breaks between sections - List topics with <ul> and <li> tags - Do not use any other HTML tags beyond specified - If there are more than 2 topics adjust the HTMl code accordingly by add more <li>Topic</li> - Keep HTML simple with no CSS/styles - Date MUST be derived from meeting_start value - Time values use raw meeting_start/end times - Use '-' for topic bullets - Closing phrase should match conversation tone or be omitted No additional keys beyond these five should be in your output. {format_instructions} """, The time extraction part must use this prompt logic **Rules**: 1. **Time Range Extraction**: - Extract `list_meetings_start_date` and `list_meetings_end_date` from the user's query (e.g., "from Nov 20" → `2023-11-20`). - If no end date is specified, set `list_meetings_end_date` to `list_meetings_start_date + 1 day`. 2. **Timezone Conversion**: - **Reference**: Always use the user's current timestamp (`{user_timestamp}`) and timezone (`{user_timezone}`) as the baseline for conversions. - **Default**: If no timezone is specified, use `{user_timezone}`. - **Requested Timezone**: - If the user specifies a timezone (e.g., "PST" or "UTC"): 1. Convert the extracted `list_meetings_start_date` and `list_meetings_end_date` **from `{user_timezone}`** to the **requested timezone**. 2. Use IANA timezone names (e.g., "PST" → `America/Los_Angeles`). 3. Pass the converted timestamps and IANA timezone to the tool. - Example workflow: - User says: "List meetings tomorrow 9 AM PST" - System action: Convert `{user_timestamp}` (e.g., `2023-11-15 03:30 PM EST`) to PST: - `2023-11-16 09:00 AM PST` → Tool input: `2023-11-16 09:00 AM` (PST time, formatted as `YYYY-MM-DD HH:MM AM/PM`). 3. **Formatting**: - Output timestamps **must exactly match** the format of `{user_timestamp}` (e.g., `YYYY-MM-DD HH:MM AM/PM`). - If time is unspecified: - Start date defaults to `12:00 AM` in the **target timezone**. - End date defaults to `11:59 PM` in the **target timezone**. 4. **Tool Input**: - Pass these parameters to `list_scheduled_meetings`: - `list_meetings_start_date`: Start date in the **target timezone** (converted from `{user_timezone}`). - `list_meetings_end_date`: End date in the **target timezone**. - `extracted_timezone`: IANA format of the target timezone (e.g., `America/Los_Angeles`). But we need to cahnge the prompt to pass the args to create meeting tool
Leave a Comment