Skip to content

Instantly share code, notes, and snippets.

@ayoisaiah
Created May 31, 2025 06:41
Show Gist options
  • Save ayoisaiah/73f6566ce1afbb9f69ddbd5dbda6122e to your computer and use it in GitHub Desktop.
Save ayoisaiah/73f6566ce1afbb9f69ddbd5dbda6122e to your computer and use it in GitHub Desktop.
D
async function parseEventDetails(text) {
const prompt = `
The following text describes an event. Extract the provided schema from the text accordingly.
* Use IS0-8601 format for the start and end time.
* If no year is provided, use the current year ${new Date().getFullYear()}.
* If no time is provided, default to 00:00 on the start date and 23:59 on the end date.
* If no timezone or description is provided, leave it empty.
* Do not convert the start time or end time
Here is the text:
${text}`;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment