triangle-utils 1.2.5 → 1.2.7
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 +1 -1
- package/utils/Utils_Misc.js +1 -1
- package/utils/Utils_S3Vectors.js +1 -1
package/package.json
CHANGED
package/utils/Utils_Misc.js
CHANGED
|
@@ -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)
|
package/utils/Utils_S3Vectors.js
CHANGED
|
@@ -86,7 +86,7 @@ export default class Utils_S3Vectors {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
async batch_create(vector_bucket, vector_index, vectors) {
|
|
89
|
-
for (let i = 0; i <
|
|
89
|
+
for (let i = 0; i < vectors.length; i += 100) {
|
|
90
90
|
await this.s3vectors.putVectors({
|
|
91
91
|
vectorBucketName : vector_bucket,
|
|
92
92
|
indexName : vector_index,
|