@postalsys/email-ai-tools 1.7.0 → 1.7.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.7.2](https://github.com/postalsys/email-ai-tools/compare/v1.7.1...v1.7.2) (2023-10-31)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **deps:** Bumped deps ([d1ba73e](https://github.com/postalsys/email-ai-tools/commit/d1ba73ee14c3d1cd680a64fba637ae658460dcf3))
9
+
10
+ ## [1.7.1](https://github.com/postalsys/email-ai-tools/compare/v1.7.0...v1.7.1) (2023-10-26)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **questions:** Tuned sort ordering ([6f6b3f4](https://github.com/postalsys/email-ai-tools/commit/6f6b3f467e70cca1dab82410c07029ca98932d7d))
16
+
3
17
  ## [1.7.0](https://github.com/postalsys/email-ai-tools/compare/v1.6.3...v1.7.0) (2023-10-24)
4
18
 
5
19
 
@@ -4,7 +4,7 @@ const { questionQuery } = require('../lib/embeddings-query');
4
4
  const util = require('util');
5
5
 
6
6
  async function main() {
7
- const question = 'How much did my last purchase on Amazon cost?';
7
+ const question = process.argv[2] || 'How much did my last purchase on Amazon cost?';
8
8
 
9
9
  const info = await questionQuery(question, process.env.OPENAI_API_KEY, {
10
10
  //gptModel: 'gpt-3.5-turbo',
@@ -92,7 +92,10 @@ You are analyzing user questions regarding email retrieval from a database. From
92
92
  **Output Guidelines**:
93
93
 
94
94
  - For terms implying a near-future context (e.g., "next", "newest", "upcoming"), opt for the 'newer_first' ordering.
95
- - For terms implying a distant past (e.g., "first", "oldest"), use the 'older_first' ordering.
95
+ - For terms implying a distant past (e.g., "oldest"), use the 'older_first' ordering.
96
+ - For terms implying ordering by time:
97
+ - start of the list (e.g., "first"), use the 'older_first' ordering.
98
+ - end of the list (e.g., "last", "latest"), opt for the 'newer_first' ordering.
96
99
  - If the user's query does not provide a clear time frame, or if the system's confidence in deducing a timeframe is below 70%, exclude 'start_time' and 'end_time' from the output.
97
100
  - If the deduced 'end_time' aligns with current time, omit the 'end_time'.
98
101
  - For unspecified time zones, timestamps should follow the 'YYYY-MM-DD hh:mm:ss' format.
@@ -114,7 +117,7 @@ You are analyzing user questions regarding email retrieval from a database. From
114
117
  - **Query**: "What did James write to me about last Friday?" (assuming that current time is "2023-10-02")
115
118
  **Response**: \`{"ordering":"best_match", "start_time": "2023-09-29", "end_time": "2023-09-30", "topic": "A message from James about an event in 2023-09-30"}\`
116
119
  - **Query**: "When did I receive my first Amazon invoice?"
117
- **Response**: \`{"ordering":"older_first", "topic": "Amazon invoice sent last week"}\`
120
+ **Response**: \`{"ordering":"older_first", "topic": "Amazon invoice"}\`
118
121
 
119
122
  **User's Query**:
120
123
  Process the user question:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postalsys/email-ai-tools",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "Email AI tools",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -24,13 +24,13 @@
24
24
  "mailparser": "3.6.5"
25
25
  },
26
26
  "dependencies": {
27
- "@postalsys/email-text-tools": "2.1.2",
27
+ "@postalsys/email-text-tools": "2.1.3",
28
28
  "gpt3-tokenizer": "1.1.5",
29
29
  "libmime": "5.2.1",
30
30
  "linkify-it": "4.0.1",
31
31
  "nodemailer": "6.9.7",
32
- "punycode": "2.3.0",
33
- "tlds": "1.243.0",
34
- "undici": "5.26.5"
32
+ "punycode": "2.3.1",
33
+ "tlds": "1.244.0",
34
+ "undici": "5.27.0"
35
35
  }
36
36
  }