@absolutejs/absolute 0.19.0-beta.495 → 0.19.0-beta.496
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/dist/ai/index.js +12 -7
- package/dist/ai/index.js.map +4 -4
- package/package.json +1 -1
package/dist/ai/index.js
CHANGED
|
@@ -2199,8 +2199,10 @@ var extractWeightedLexicalFields = (result) => {
|
|
|
2199
2199
|
const archivePath = typeof metadata.archivePath === "string" ? metadata.archivePath : source.includes("#") ? source.split("#")[1] ?? "" : "";
|
|
2200
2200
|
const mediaSegments = Array.isArray(metadata.mediaSegments) ? metadata.mediaSegments.map((segment) => segment && typeof segment === "object" ? toFieldText(segment) : "").filter(Boolean).join(" ") : "";
|
|
2201
2201
|
const metadataFocus = [
|
|
2202
|
+
metadata.sourceNativeKind,
|
|
2202
2203
|
metadata.sheetName,
|
|
2203
2204
|
metadata.sheetNames,
|
|
2205
|
+
metadata.slideNumber,
|
|
2204
2206
|
metadata.slideTitle,
|
|
2205
2207
|
metadata.slideTitles,
|
|
2206
2208
|
metadata.threadTopic,
|
|
@@ -3506,12 +3508,13 @@ var createOfficeDocumentExtractor = () => ({
|
|
|
3506
3508
|
...input.metadata ?? {},
|
|
3507
3509
|
fileKind: "office",
|
|
3508
3510
|
...officeMetadata,
|
|
3511
|
+
sourceNativeKind: "spreadsheet_sheet",
|
|
3509
3512
|
sheetIndex: index,
|
|
3510
3513
|
sheetName: sheet.name
|
|
3511
3514
|
},
|
|
3512
3515
|
source: input.source ?? input.path ?? input.name ?? `${slugify(input.title ?? DEFAULT_BINARY_NAME)}${extension || ".office"}`,
|
|
3513
|
-
text: `
|
|
3514
|
-
${sheet.text}
|
|
3516
|
+
text: normalizeWhitespace(`Spreadsheet sheet ${sheet.name} from ${input.title ?? input.name ?? input.path ?? DEFAULT_BINARY_NAME}.
|
|
3517
|
+
${sheet.text}`),
|
|
3515
3518
|
title: input.title ? `${input.title} \xB7 ${sheet.name}` : sheet.name
|
|
3516
3519
|
}));
|
|
3517
3520
|
} else if (extension === ".pptx" || extension === ".odp") {
|
|
@@ -3528,12 +3531,13 @@ ${sheet.text}`,
|
|
|
3528
3531
|
...input.metadata ?? {},
|
|
3529
3532
|
fileKind: "office",
|
|
3530
3533
|
...officeMetadata,
|
|
3534
|
+
sourceNativeKind: "presentation_slide",
|
|
3531
3535
|
slideIndex: slide.index,
|
|
3532
3536
|
slideNumber: slide.index + 1
|
|
3533
3537
|
},
|
|
3534
3538
|
source: input.source ?? input.path ?? input.name ?? `${slugify(input.title ?? DEFAULT_BINARY_NAME)}${extension || ".office"}`,
|
|
3535
|
-
text: `
|
|
3536
|
-
${slide.text}
|
|
3539
|
+
text: normalizeWhitespace(`Presentation slide ${slide.index + 1} from ${input.title ?? input.name ?? input.path ?? DEFAULT_BINARY_NAME}.
|
|
3540
|
+
${slide.text}`),
|
|
3537
3541
|
title: input.title ? `${input.title} \xB7 Slide ${slide.index + 1}` : `Slide ${slide.index + 1}`
|
|
3538
3542
|
}));
|
|
3539
3543
|
}
|
|
@@ -3600,6 +3604,7 @@ var createRAGMediaFileExtractor = (transcriber) => ({
|
|
|
3600
3604
|
...input.metadata ?? {},
|
|
3601
3605
|
...result.metadata ?? {},
|
|
3602
3606
|
fileKind: "media",
|
|
3607
|
+
sourceNativeKind: "media_segment",
|
|
3603
3608
|
mediaSegmentIndex: index,
|
|
3604
3609
|
mediaSegmentStartMs: startMs,
|
|
3605
3610
|
mediaSegmentEndMs: endMs,
|
|
@@ -3607,8 +3612,8 @@ var createRAGMediaFileExtractor = (transcriber) => ({
|
|
|
3607
3612
|
speaker: typeof segment.speaker === "string" ? segment.speaker : undefined
|
|
3608
3613
|
},
|
|
3609
3614
|
source,
|
|
3610
|
-
text: `
|
|
3611
|
-
${text}
|
|
3615
|
+
text: normalizeWhitespace(`Media transcript segment${typeof startMs === "number" ? ` ${startMs}-${endMs ?? startMs}ms` : ""} from ${input.title ?? input.name ?? input.path ?? DEFAULT_BINARY_NAME}.
|
|
3616
|
+
${text}`),
|
|
3612
3617
|
title: input.title ? `${input.title} \xB7 Segment ${index + 1}` : `Segment ${index + 1}`
|
|
3613
3618
|
});
|
|
3614
3619
|
}
|
|
@@ -8895,5 +8900,5 @@ export {
|
|
|
8895
8900
|
aiChat
|
|
8896
8901
|
};
|
|
8897
8902
|
|
|
8898
|
-
//# debugId=
|
|
8903
|
+
//# debugId=7CB5678D47F7B89564756E2164756E21
|
|
8899
8904
|
//# sourceMappingURL=index.js.map
|