From 8a8abb696bef90b7efbce53304dd93b7228c60b6 Mon Sep 17 00:00:00 2001 From: TooonyChen <26252739+TooonyChen@users.noreply.github.com> Date: Tue, 8 Oct 2024 03:54:35 +1300 Subject: [PATCH] update 0.0.2 --- src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index bafbbbe..8c217d9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -136,7 +136,8 @@ export default { // 调用AI,让AI抓取验证码,让AI返回`title`和`code` // title: 邮件是哪个公司/组织发来的验证码, 比如'Netflix' - // code: 验证码/链接/密码,比如'123456'or'https://example.com/verify?code=123456' + // code: 验证码/链接/密码,比如'123456'or'https://example.com/verify?code=123456',如都有则返回'code, link' + // topic: 邮件主题,比如'line register verification' const aiPrompt = ` Email content: ${rawEmail}. @@ -169,7 +170,7 @@ export default { let extractedData = null; while (retryCount < maxRetries && !extractedData) { - // 调用 Google AI API 来获取 title 和 code + // 调用 Google AI API 来获取 title, code, topic const aiResponse = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest:generateContent?key=${GoogleAPIKey}`, { method: 'POST', headers: {