Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
chore: more cal.ai changes (calcom#11590)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeerRich authored Sep 28, 2023
1 parent 2b1918f commit c57de8f
Show file tree
Hide file tree
Showing 10 changed files with 242 additions and 245 deletions.
4 changes: 2 additions & 2 deletions apps/ai/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cal.com Email Assistant

Welcome to the first stage of Cal AI!
Welcome to the first stage of Cal.ai!

This app lets you chat with your calendar via email:

Expand All @@ -27,7 +27,7 @@ Before running the app, please see [env.mjs](./src/env.mjs) for all required env
- An [OpenAI API key](https://platform.openai.com/account/api-keys) with access to GPT-4
- A [SendGrid API key](https://app.sendgrid.com/settings/api_keys)
- A default sender email (for example, `[email protected]`)
- The Cal AI's app ID and URL (see [add.ts](/packages/app-store/cal-ai/api/index.ts))
- The Cal.ai's app ID and URL (see [add.ts](/packages/app-store/cal-ai/api/index.ts))

To stand up the API and AI apps simultaneously, simply run `yarn dev:ai`.

Expand Down
8 changes: 4 additions & 4 deletions apps/ai/src/app/api/receive/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export const POST = async (request: NextRequest) => {
// User is not a cal.com user or is using an unverified email.
if (!signature || !user) {
await sendEmail({
html: `Thanks for your interest in Cal AI! To get started, Make sure you have a <a href="https://cal.com/signup" target="_blank">cal.com</a> account with this email address.`,
html: `Thanks for your interest in Cal.ai! To get started, Make sure you have a <a href="https://cal.com/signup" target="_blank">cal.com</a> account with this email address.`,
subject: `Re: ${body.subject}`,
text: `Thanks for your interest in Cal AI! To get started, Make sure you have a cal.com account with this email address. You can sign up for an account at: https://cal.com/signup`,
text: `Thanks for your interest in Cal.ai! To get started, Make sure you have a cal.com account with this email address. You can sign up for an account at: https://cal.com/signup`,
to: envelope.from,
from: aiEmail,
});
Expand All @@ -78,9 +78,9 @@ export const POST = async (request: NextRequest) => {
const url = env.APP_URL;

await sendEmail({
html: `Thanks for using Cal AI! To get started, the app must be installed. <a href=${url} target="_blank">Click this link</a> to install it.`,
html: `Thanks for using Cal.ai! To get started, the app must be installed. <a href=${url} target="_blank">Click this link</a> to install it.`,
subject: `Re: ${body.subject}`,
text: `Thanks for using Cal AI! To get started, the app must be installed. Click this link to install the Cal AI app: ${url}`,
text: `Thanks for using Cal.ai! To get started, the app must be installed. Click this link to install the Cal.ai app: ${url}`,
to: envelope.from,
from: aiEmail,
});
Expand Down
4 changes: 2 additions & 2 deletions apps/ai/src/utils/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import now from "./now";
const gptModel = "gpt-4";

/**
* Core of the Cal AI booking agent: a LangChain Agent Executor.
* Core of the Cal.ai booking agent: a LangChain Agent Executor.
* Uses a toolchain to book meetings, list available slots, etc.
* Uses OpenAI functions to better enforce JSON-parsable output from the LLM.
*/
Expand Down Expand Up @@ -49,7 +49,7 @@ const agent = async (
*/
const executor = await initializeAgentExecutorWithOptions(tools, model, {
agentArgs: {
prefix: `You are Cal AI - a bleeding edge scheduling assistant that interfaces via email.
prefix: `You are Cal.ai - a bleeding edge scheduling assistant that interfaces via email.
Make sure your final answers are definitive, complete and well formatted.
Sometimes, tools return errors. In this case, try to handle the error intelligently or ask the user for more information.
Tools will always handle times in UTC, but times sent to users should be formatted per that user's timezone.
Expand Down
2 changes: 1 addition & 1 deletion apps/ai/src/utils/sendEmail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const send = async ({
cc,
from: {
email: from,
name: "Cal AI",
name: "Cal.ai",
},
text,
html,
Expand Down
6 changes: 6 additions & 0 deletions packages/app-store/cal-ai/DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ items:
---

{DESCRIPTION}

Example questions:

- Send an email with the title: What's my schedule?
- Forward an email from someone looking to meet you
-
2 changes: 1 addition & 1 deletion packages/app-store/cal-ai/api/_getAdd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function getHandler(req: NextApiRequest, res: NextApiResponse) {
const caller = viewerRouter.createCaller(ctx);

const apiKey = await caller.apiKeys.create({
note: "Cal AI",
note: "Cal.ai",
expiresAt: null,
appId: "cal-ai",
});
Expand Down
8 changes: 4 additions & 4 deletions packages/app-store/cal-ai/config.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"/*": "Don't modify slug - If required, do it using cli edit command",
"name": "Cal AI",
"name": "Cal.ai",
"slug": "cal-ai",
"type": "cal-ai_automation",
"logo": "icon.svg",
"url": "https://cal.ai",
"variant": "automation",
"categories": ["automation"],
"publisher": "Rubric Labs",
"email": "hi@cal.ai",
"description": "Cal AI is a scheduling assistant powered by GPT. Email hi@cal.ai to chat with your calendar or book, edit and cancel meetings.",
"publisher": "Cal.com, Inc.",
"email": "support@cal.com",
"description": "Cal.ai is your AI scheduling assistant. Get your personal email assistant (username@cal.ai) that you can forward emails to or have a conversation with. Cal.ai will automatically schedule meetings for you.",
"isTemplate": false,
"__createdUsingCli": true,
"__template": "basic",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-store/cal-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"devDependencies": {
"@calcom/types": "*"
},
"description": "Cal AI is a scheduling assistant powered by GPT. Email hi@cal.ai to chat with your calendar or book, edit and cancel meetings"
"description": "Cal.ai is your AI scheduling assistant. Get your personal email assistant (username@cal.ai) that you can forward emails to or have a conversation with. Cal.ai will automatically schedule meetings for you."
}
Binary file modified packages/app-store/cal-ai/static/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c57de8f

Please sign in to comment.