应用产品

jevmail

@fazlerocks7TypeScriptMIT更新于 2026-09-19可当场跑

基于Jev和TypeSafe AI决策模型的开源Gmail邮件分类工具,通过Vercel AI Gateway本地运行,能快速将收件箱分为需回复、更新、促销、销售和垃圾邮件。

英文原文

Open-source AI email triage for Gmail. Sorts your inbox into Needs reply, Updates, Promos, Sales and Spam with Jev, TypeSafe AI's decision model, via Vercel AI Gateway. Read-only, runs locally, 1,000 emails in about a minute for 3 cents.

fazlerocks/jevmail

它在哪儿调用了 Jev

import { experimental_evaluate as evaluate } from "ai";

src/lib/classify.ts:1

链接指向我们抓取当天的那个 commit,行号是准的。

它问 Jev 的问题

下面是从这个项目源码里原样取出来的 question 组合。

取自 src/lib/classify.ts:41

  1. category选项

    Which lane does this email belong in? Judge from the sender, subject, headers, and body together.

    • needs_replyA real person expects a reply from the recipient: a colleague, customer, friend, or existing contact asking something or continuing a conversation.
    • updatesTransactional or informational mail about the recipient's own accounts and activity: bank and card transaction alerts, OTPs and security notices, order, delivery, and booking status, receipts and invoices, bill reminders, service alarms, calendar or system notifications. Automated, addressed to the recipient, not trying to sell anything.
    • promotionalMarketing: newsletters, campaigns, discounts, product announcements, event invitations, and content digests sent to a list. Usually has an unsubscribe link and is not about a specific transaction of the recipient.
    • salesUnsolicited cold outreach from a vendor, agency, or recruiter trying to start a conversation or book a call with the recipient.
    • spamScams, phishing, fake invoices, or junk with no legitimate purpose.
  2. urgency打分

    How urgently does this email need a reply from the recipient? Pick the level that best matches.

    • 0No reply needed, or no time pressure at all
    • 1A reply within a week is fine
    • 2A reply within a few days is expected
    • 3A reply today is expected
    • 4A person is blocked, or a deadline falls within 24 hours
  3. isPersonal是/否

    Was this email written by a human specifically to this recipient, rather than sent to a list or generated by a system?

用你自己的内容跑一遍

代码
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    category: { type: 'choice', instructions: 'Which lane does this email belong in? Judge from the sender, subject, headers, and body together.',
      criteria: { needs_reply: 'A real person expects a reply from the recipient: a colleague, customer, friend, or existing contact asking something or continuing a conversation.', updates: 'Transactional or informational mail about the recipient\'s own accounts and activity: bank and card transaction alerts, OTPs and security notices, order, delivery, and booking status, receipts and invoices, bill reminders, service alarms, calendar or system notifications. Automated, addressed to the recipient, not trying to sell anything.', promotional: 'Marketing: newsletters, campaigns, discounts, product announcements, event invitations, and content digests sent to a list. Usually has an unsubscribe link and is not about a specific transaction of the recipient.', sales: 'Unsolicited cold outreach from a vendor, agency, or recruiter trying to start a conversation or book a call with the recipient.', spam: 'Scams, phishing, fake invoices, or junk with no legitimate purpose.' } },
    urgency: { type: 'score', instructions: 'How urgently does this email need a reply from the recipient? Pick the level that best matches.',
      criteria: ['No reply needed, or no time pressure at all', 'A reply within a week is fine', 'A reply within a few days is expected', 'A reply today is expected', 'A person is blocked, or a deadline falls within 24 hours'] },
    isPersonal: { type: 'boolean', instructions: 'Was this email written by a human specifically to this recipient, rather than sent to a list or generated by a system?' },
  },
});

同类的其他项目