@heripo/document-processor 0.1.39 → 0.1.41
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/index.d.ts +2 -2
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +8 -10
- package/dist/index.cjs +0 -5061
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -1702
package/dist/index.d.ts
CHANGED
|
@@ -457,8 +457,8 @@ interface VisionLLMComponentOptions extends BaseLLMComponentOptions {
|
|
|
457
457
|
* Image content structure for vision LLM messages
|
|
458
458
|
*/
|
|
459
459
|
interface ImageContent {
|
|
460
|
-
type: '
|
|
461
|
-
|
|
460
|
+
type: 'file';
|
|
461
|
+
data: Uint8Array;
|
|
462
462
|
mediaType: string;
|
|
463
463
|
}
|
|
464
464
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../shared/dist/index.
|
|
1
|
+
// ../shared/dist/index.js
|
|
2
2
|
import {
|
|
3
3
|
NoObjectGeneratedError,
|
|
4
4
|
Output,
|
|
@@ -257,7 +257,7 @@ var LLMCaller = class {
|
|
|
257
257
|
return this.executeWithFallback(
|
|
258
258
|
config,
|
|
259
259
|
(model) => this.generateStructuredOutput(model, config.schema, {
|
|
260
|
-
|
|
260
|
+
instructions: config.systemPrompt,
|
|
261
261
|
prompt: config.userPrompt,
|
|
262
262
|
temperature: config.temperature,
|
|
263
263
|
maxRetries: config.maxRetries,
|
|
@@ -2559,8 +2559,8 @@ var VisionLLMComponent = class extends BaseLLMComponent {
|
|
|
2559
2559
|
const absolutePath = path.isAbsolute(imagePath) ? imagePath : path.resolve(this.artifactDir, imagePath);
|
|
2560
2560
|
const imageData = new Uint8Array(fs.readFileSync(absolutePath));
|
|
2561
2561
|
return {
|
|
2562
|
-
type: "
|
|
2563
|
-
|
|
2562
|
+
type: "file",
|
|
2563
|
+
data: imageData,
|
|
2564
2564
|
mediaType: mimeType
|
|
2565
2565
|
};
|
|
2566
2566
|
}
|
|
@@ -2718,8 +2718,8 @@ var VisionTocExtractor = class extends VisionLLMComponent {
|
|
|
2718
2718
|
);
|
|
2719
2719
|
const imageData = new Uint8Array(fs2.readFileSync(imagePath));
|
|
2720
2720
|
imageContents.push({
|
|
2721
|
-
type: "
|
|
2722
|
-
|
|
2721
|
+
type: "file",
|
|
2722
|
+
data: imageData,
|
|
2723
2723
|
mediaType: "image/png"
|
|
2724
2724
|
});
|
|
2725
2725
|
}
|
|
@@ -3333,8 +3333,8 @@ var PageRangeParser = class extends VisionLLMComponent {
|
|
|
3333
3333
|
const imageData = new Uint8Array(fs3.readFileSync(imagePath));
|
|
3334
3334
|
const mimeType = page.image.mimetype || "image/png";
|
|
3335
3335
|
return {
|
|
3336
|
-
type: "
|
|
3337
|
-
|
|
3336
|
+
type: "file",
|
|
3337
|
+
data: imageData,
|
|
3338
3338
|
mediaType: mimeType
|
|
3339
3339
|
};
|
|
3340
3340
|
});
|