@postalsys/email-ai-tools 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,7 +27,7 @@ Instructions:
27
27
  - Describe the sentiment of the email using one word. Use either "positive", "neutral" or "negative". Include this value in the response as a "sentiment" property.
28
28
  - Generate a one-sentence summary of the email. Include this value in the response as a "summary" property.
29
29
  - Does it seem like the sender of the email would expect a reply to this email? Include this information in the response as a "shouldReply" property with the value "true" if they expect it and "false" if not.
30
- - If this email is a reply to a previous email, then extract the text content that only the email's sender wrote, and include this as a "replyText" property in the response.
30
+ - If this email is a reply to a previous email or a forwarded email, then extract the text content that only the email's sender wrote, and include this as a "replyText" property in the response.
31
31
  - Do not include message signatures in the extracted reply text
32
32
  - Respond with a JSON formatted structure. Do not write any other explanations.
33
33
 
@@ -35,6 +35,7 @@ Facts:
35
35
  - An email consists of message headers, an attachments list, and text content
36
36
  - The email to analyze is formatted in a JSON format
37
37
  - An email is a reply to a previous email only if it includes a "in-reply-to" header
38
+ - An email is a forwarded email only if it includes the "references" header , but not the "in-reply-to" header
38
39
  - The email structure includes a property "headers" that contains an array of header values.
39
40
  - Each header contains two properties, "key" as the header field key name and "value" as the header value without the key prefix
40
41
  - The email structure includes a property "attachments" that contains an array of attachments.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postalsys/email-ai-tools",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Email AI tools",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -23,7 +23,7 @@
23
23
  "mailparser": "3.6.4"
24
24
  },
25
25
  "dependencies": {
26
- "@postalsys/email-text-tools": "1.4.1",
26
+ "@postalsys/email-text-tools": "2.0.0",
27
27
  "gpt3-tokenizer": "1.1.5",
28
28
  "libmime": "5.2.1",
29
29
  "undici": "5.22.0"