Skip to content

Conversation

Udit-takkar
Copy link
Contributor

@Udit-takkar Udit-takkar commented Jan 24, 2025

What does this PR do?

TODO

Screenshot 2025-01-24 at 11 01 21 PM

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • N/A I confirm automated tests are in place that prove my fix is effective or that my feature works.

Copy link

vercel bot commented Jan 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview May 15, 2025 0:57am
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview May 15, 2025 0:57am

@github-actions github-actions bot added the ❗️ .env changes contains changes to env variables label Jan 24, 2025
@keithwillcode keithwillcode added core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO labels Jan 24, 2025
Copy link

linear bot commented Jan 24, 2025

@Udit-takkar Udit-takkar added this to the v5.0 milestone Jan 24, 2025
@Udit-takkar Udit-takkar marked this pull request as ready for review January 24, 2025 17:32
@graphite-app graphite-app bot requested a review from a team January 24, 2025 17:32
@dosubot dosubot bot added the ✨ feature New feature or request label Jan 24, 2025
Copy link

graphite-app bot commented Jan 24, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (01/24/25)

1 reviewer was added to this PR based on Keith Williams's automation.

@Udit-takkar
Copy link
Contributor Author

TODO: change prompt

@Udit-takkar Udit-takkar marked this pull request as draft January 24, 2025 18:05
@github-actions github-actions bot added ai area: AI, cal.ai emails area: emails, cancellation email, reschedule email, inbox, spam folder, not getting email Medium priority Created by Linear-GitHub Sync labels Jan 27, 2025
@Udit-takkar Udit-takkar marked this pull request as ready for review January 27, 2025 15:52
Copy link
Member

@PeerRich PeerRich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for self-hosters, if they dont have an OpenAI .env key we simply skip the summary right?

@Udit-takkar
Copy link
Contributor Author

for self-hosters, if they dont have an OpenAI .env key we simply skip the summary right?

No, I'll have to add that logic

Copy link
Contributor

This PR is being marked as stale due to inactivity.

@github-actions github-actions bot added the Stale label Feb 11, 2025
@dosubot dosubot bot modified the milestones: v5.0, v5.1 Feb 17, 2025
@github-actions github-actions bot removed the Stale label Feb 18, 2025
@dosubot dosubot bot added this to the v5.2 milestone Mar 17, 2025
Copy link
Contributor

github-actions bot commented Apr 5, 2025

This PR is being marked as stale due to inactivity.

Copy link
Contributor

github-actions bot commented Apr 5, 2025

E2E results are ready!

@github-actions github-actions bot removed the Stale label Apr 6, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI code reviewer found 11 issues

constructor(
calEvent: CalendarEvent,
attendee: Person,
transcriptDownloadLinks: string[],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter name 'transcriptDownloadLinks' in the constructor doesn't match the 'downloadLinks' property name used in the template parameters, creating an inconsistency in naming

@@ -708,14 +708,22 @@ export const sendDailyVideoRecordingEmails = async (calEvent: CalendarEvent, dow
await Promise.all(emailsToSend);
};

export const sendDailyVideoTranscriptEmails = async (calEvent: CalendarEvent, transcripts: string[]) => {
export const sendDailyVideoTranscriptEmails = async (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function parameter change needs to be propagated to all call sites

export const sendDailyVideoTranscriptEmails = async (
calEvent: CalendarEvent,
transcripts: string[],
summaries: string[]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding parameter validation for new summaries parameter

const vttContent = await transcriptResponse.text();

// Clean up VTT content by removing timestamps and metadata
const cleanTranscript = vttContent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No check for transcript size against OpenAI's token limits, which could cause API failures for large meetings.

}),
});

if (!response.ok) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Limited error handling with generic error messages. Consider capturing and forwarding specific error details from the OpenAI API response.

@@ -708,14 +708,22 @@
await Promise.all(emailsToSend);
};

export const sendDailyVideoTranscriptEmails = async (calEvent: CalendarEvent, transcripts: string[]) => {
export const sendDailyVideoTranscriptEmails = async (
calEvent: CalendarEvent,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function signature change is a breaking change that could affect existing implementations

@@ -360,6 +360,7 @@
"NEXTAUTH_SECRET",
"NEXTAUTH_URL",
"NODE_ENV",
"OPENAI_API_KEY",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding documentation about the new OpenAI API key requirement

const data = await response.json();
return data.choices[0].message.content;
} catch (error) {
console.error("Error generating summary:", error);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule violated: Avoid Logging Sensitive Information

  Logging the entire error object may expose sensitive information

@dosubot dosubot bot modified the milestones: v5.2, v5.3 Apr 15, 2025
@zomars zomars requested a review from a team as a code owner April 23, 2025 22:25
@dosubot dosubot bot modified the milestones: v5.3, v5.4 May 15, 2025
@Udit-takkar Udit-takkar marked this pull request as draft May 16, 2025 14:39
Comment on lines +35 to +57
const response = await fetch("https://api.openai.com/v1/chat/completions", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.OPENAI_API_KEY}`,
},
body: JSON.stringify({
model: "gpt-4",
messages: [
{
role: "system",
content:
"You are a professional meeting summarizer. Create clear, concise summaries with well-organized sections and actionable items.",
},
{
role: "user",
content: prompt,
},
],
temperature: 0.5,
max_tokens: 2048,
}),
});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: move to transcription service

@dosubot dosubot bot modified the milestones: v5.4, v5.5 Jun 17, 2025
@CarinaWolli CarinaWolli modified the milestones: v5.5, v5.6 Jul 16, 2025
@dosubot dosubot bot modified the milestone: v5.6 Jul 16, 2025
@dosubot dosubot bot modified the milestones: v5.6, v5.7 Aug 18, 2025
@Udit-takkar Udit-takkar closed this Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai area: AI, cal.ai core area: core, team members only emails area: emails, cancellation email, reschedule email, inbox, spam folder, not getting email enterprise area: enterprise, audit log, organisation, SAML, SSO ❗️ .env changes contains changes to env variables ✨ feature New feature or request Medium priority Created by Linear-GitHub Sync ready-for-e2e
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3698] Cal.ai transcription Email Summary
5 participants