triangle-utils 1.2.6 → 1.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triangle-utils",
3
- "version": "1.2.6",
3
+ "version": "1.2.8",
4
4
  "main": "Utils.js",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -152,7 +152,7 @@ export default class Utils_Misc {
152
152
  }
153
153
 
154
154
  chunkify(text, max_length = 2500, overlap = 50) {
155
- const chunk_indices = this.get_chunk_indices(text, max_length = 2500, overlap = 50)
155
+ const chunk_indices = this.get_chunk_indices(text.length, max_length = 2500, overlap = 50)
156
156
  return chunk_indices.map(chunk_index => ({
157
157
  chunk_index : chunk_index,
158
158
  chunk_text : text.substring(...chunk_index)
@@ -114,8 +114,8 @@ export default class Utils_S3Vectors {
114
114
  for (let i = 0; i < vector_keys.length; i += 100) {
115
115
  await this.s3vectors.deleteVectors({
116
116
  vectorBucketName : vector_bucket,
117
- indexName : vector_index.slice(i, i + 100),
118
- keys : vector_keys
117
+ indexName : vector_index,
118
+ keys : vector_keys.slice(i, i + 100)
119
119
  })
120
120
  }
121
121
  }