@postalsys/email-ai-tools 1.3.2 → 1.3.4

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.
@@ -0,0 +1,37 @@
1
+ on:
2
+ push:
3
+ branches:
4
+ - master
5
+
6
+ permissions:
7
+ contents: write
8
+ pull-requests: write
9
+ id-token: write
10
+
11
+ name: release
12
+ jobs:
13
+ release-please:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: google-github-actions/release-please-action@v3
17
+ id: release
18
+ with:
19
+ release-type: node
20
+ package-name: ${{env.NPM_MODULE_NAME}}
21
+ pull-request-title-pattern: 'chore${scope}: release ${version} [skip-ci]'
22
+ # The logic below handles the npm publication:
23
+ - uses: actions/checkout@v3
24
+ # these if statements ensure that a publication only occurs when
25
+ # a new release is created:
26
+ if: ${{ steps.release.outputs.release_created }}
27
+ - uses: actions/setup-node@v3
28
+ with:
29
+ node-version: 18
30
+ registry-url: 'https://registry.npmjs.org'
31
+ if: ${{ steps.release.outputs.release_created }}
32
+ - run: npm ci
33
+ if: ${{ steps.release.outputs.release_created }}
34
+ - run: npm publish --provenance --access public
35
+ env:
36
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
37
+ if: ${{ steps.release.outputs.release_created }}
package/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
3
+ ## [1.3.4](https://github.com/postalsys/email-ai-tools/compare/v1.3.3...v1.3.4) (2023-09-19)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **embeddings:** Changed embeddings output structure ([368467c](https://github.com/postalsys/email-ai-tools/commit/368467cabcb21dab9d4819933f6d3027f3cd3f26))
9
+
10
+ ## [1.3.3](https://github.com/postalsys/email-ai-tools/compare/v1.3.2...v1.3.3) (2023-09-19)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **deloy:** Set up automatic publishing ([18e2dc0](https://github.com/postalsys/email-ai-tools/commit/18e2dc00a2c123995f2e67c81c132e4380021dd7))
@@ -229,20 +229,20 @@ class Embedder {
229
229
  return {
230
230
  chunk,
231
231
  embedding,
232
- time: reqEndTime - reqStartTime
232
+ _time: reqEndTime - reqStartTime
233
233
  };
234
234
  }
235
235
 
236
236
  async getEmbeddings() {
237
237
  let chunks = this.getChunks();
238
238
 
239
- let result = [];
239
+ let embeddings = [];
240
240
 
241
241
  for (let chunk of chunks) {
242
- result.push(await this.getChunkEmbeddings(chunk));
242
+ embeddings.push(await this.getChunkEmbeddings(chunk));
243
243
  }
244
244
 
245
- return result;
245
+ return { model: this.gptModel, embeddings };
246
246
  }
247
247
  }
248
248
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postalsys/email-ai-tools",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "Email AI tools",
5
5
  "main": "index.js",
6
6
  "scripts": {