@absolutejs/absolute 0.19.0-beta.603 → 0.19.0-beta.605
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/client/index.js +244 -10
- package/dist/ai/client/index.js.map +4 -4
- package/dist/ai/client/ui.js +248 -10
- package/dist/ai/client/ui.js.map +4 -4
- package/dist/ai/index.js +1003 -110
- package/dist/ai/index.js.map +8 -8
- package/dist/ai/rag/quality.js +27 -6
- package/dist/ai/rag/quality.js.map +3 -3
- package/dist/ai/rag/ui.js +248 -10
- package/dist/ai/rag/ui.js.map +4 -4
- package/dist/ai-client/angular/ai/index.js +243 -9
- package/dist/ai-client/react/ai/index.js +258 -10
- package/dist/ai-client/vue/ai/index.js +347 -101
- package/dist/angular/ai/index.js +244 -10
- package/dist/angular/ai/index.js.map +4 -4
- package/dist/react/ai/index.js +259 -11
- package/dist/react/ai/index.js.map +6 -6
- package/dist/src/ai/client/ui.d.ts +1 -1
- package/dist/src/ai/rag/index.d.ts +1 -1
- package/dist/src/ai/rag/presentation.d.ts +12 -1
- package/dist/src/ai/rag/ui.d.ts +1 -1
- package/dist/src/react/ai/useRAG.d.ts +5 -0
- package/dist/src/react/ai/useRAGChunkPreview.d.ts +4 -0
- package/dist/src/react/ai/useRAGSources.d.ts +1 -0
- package/dist/src/svelte/ai/createRAG.d.ts +5 -0
- package/dist/src/svelte/ai/createRAGChunkPreview.d.ts +4 -0
- package/dist/src/svelte/ai/createRAGSources.d.ts +1 -0
- package/dist/src/vue/ai/useRAG.d.ts +125 -0
- package/dist/src/vue/ai/useRAGChunkPreview.d.ts +54 -0
- package/dist/src/vue/ai/useRAGDocuments.d.ts +20 -0
- package/dist/src/vue/ai/useRAGIndexAdmin.d.ts +10 -0
- package/dist/src/vue/ai/useRAGSearch.d.ts +40 -0
- package/dist/src/vue/ai/useRAGSources.d.ts +1 -0
- package/dist/svelte/ai/index.js +305 -57
- package/dist/svelte/ai/index.js.map +6 -6
- package/dist/types/ai.d.ts +102 -1
- package/dist/vue/ai/index.js +311 -63
- package/dist/vue/ai/index.js.map +6 -6
- package/package.json +1 -1
package/dist/types/ai.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export type RAGSource = {
|
|
|
9
9
|
title?: string;
|
|
10
10
|
source?: string;
|
|
11
11
|
metadata?: Record<string, unknown>;
|
|
12
|
+
labels?: RAGSourceLabels;
|
|
13
|
+
structure?: RAGChunkStructure;
|
|
12
14
|
};
|
|
13
15
|
export type RAGSourceGroup = {
|
|
14
16
|
key: string;
|
|
@@ -18,6 +20,8 @@ export type RAGSourceGroup = {
|
|
|
18
20
|
bestScore: number;
|
|
19
21
|
count: number;
|
|
20
22
|
chunks: RAGSource[];
|
|
23
|
+
labels?: RAGSourceLabels;
|
|
24
|
+
structure?: RAGChunkStructure;
|
|
21
25
|
};
|
|
22
26
|
export type RAGCitation = {
|
|
23
27
|
key: string;
|
|
@@ -47,6 +51,7 @@ export type RAGSourceSummary = {
|
|
|
47
51
|
contextLabel?: string;
|
|
48
52
|
locatorLabel?: string;
|
|
49
53
|
provenanceLabel?: string;
|
|
54
|
+
structure?: RAGChunkStructure;
|
|
50
55
|
};
|
|
51
56
|
export type RAGGroundingReference = {
|
|
52
57
|
number: number;
|
|
@@ -146,6 +151,7 @@ export type RAGDocumentChunk = {
|
|
|
146
151
|
source?: string;
|
|
147
152
|
metadata?: Record<string, unknown>;
|
|
148
153
|
embedding?: number[];
|
|
154
|
+
structure?: RAGChunkStructure;
|
|
149
155
|
};
|
|
150
156
|
export type RAGEmbeddingInput = {
|
|
151
157
|
text: string;
|
|
@@ -196,10 +202,21 @@ export type RAGMediaTranscriber = {
|
|
|
196
202
|
name: string;
|
|
197
203
|
transcribe: (input: RAGFileExtractionInput) => RAGMediaTranscriptionResult | Promise<RAGMediaTranscriptionResult>;
|
|
198
204
|
};
|
|
205
|
+
export type RAGOCRRegion = {
|
|
206
|
+
text: string;
|
|
207
|
+
confidence?: number;
|
|
208
|
+
page?: number;
|
|
209
|
+
x?: number;
|
|
210
|
+
y?: number;
|
|
211
|
+
width?: number;
|
|
212
|
+
height?: number;
|
|
213
|
+
};
|
|
199
214
|
export type RAGOCRResult = {
|
|
200
215
|
text: string;
|
|
201
216
|
title?: string;
|
|
202
217
|
metadata?: Record<string, unknown>;
|
|
218
|
+
confidence?: number;
|
|
219
|
+
regions?: RAGOCRRegion[];
|
|
203
220
|
};
|
|
204
221
|
export type RAGOCRProvider = {
|
|
205
222
|
name: string;
|
|
@@ -387,13 +404,78 @@ export type RAGIndexedDocument = {
|
|
|
387
404
|
createdAt?: number;
|
|
388
405
|
updatedAt?: number;
|
|
389
406
|
metadata?: Record<string, unknown>;
|
|
407
|
+
labels?: RAGSourceLabels;
|
|
390
408
|
};
|
|
391
409
|
export type RAGDocumentChunkPreview = {
|
|
392
410
|
document: Omit<RAGIndexedDocument, 'text' | 'metadata'> & {
|
|
393
411
|
metadata?: Record<string, unknown>;
|
|
412
|
+
labels?: RAGSourceLabels;
|
|
394
413
|
};
|
|
395
414
|
normalizedText: string;
|
|
396
|
-
chunks: RAGDocumentChunk
|
|
415
|
+
chunks: Array<RAGDocumentChunk & {
|
|
416
|
+
labels?: RAGSourceLabels;
|
|
417
|
+
structure?: RAGChunkStructure;
|
|
418
|
+
}>;
|
|
419
|
+
};
|
|
420
|
+
export type RAGSourceLabels = {
|
|
421
|
+
contextLabel?: string;
|
|
422
|
+
locatorLabel?: string;
|
|
423
|
+
provenanceLabel?: string;
|
|
424
|
+
};
|
|
425
|
+
export type RAGChunkSection = {
|
|
426
|
+
title?: string;
|
|
427
|
+
path?: string[];
|
|
428
|
+
depth?: number;
|
|
429
|
+
kind?: 'markdown_heading' | 'html_heading';
|
|
430
|
+
};
|
|
431
|
+
export type RAGChunkSequence = {
|
|
432
|
+
sectionChunkId?: string;
|
|
433
|
+
sectionChunkIndex?: number;
|
|
434
|
+
sectionChunkCount?: number;
|
|
435
|
+
previousChunkId?: string;
|
|
436
|
+
nextChunkId?: string;
|
|
437
|
+
};
|
|
438
|
+
export type RAGChunkStructure = {
|
|
439
|
+
section?: RAGChunkSection;
|
|
440
|
+
sequence?: RAGChunkSequence;
|
|
441
|
+
};
|
|
442
|
+
export type RAGChunkGraphNode = {
|
|
443
|
+
chunkId: string;
|
|
444
|
+
label: string;
|
|
445
|
+
source?: string;
|
|
446
|
+
title?: string;
|
|
447
|
+
score?: number;
|
|
448
|
+
contextLabel?: string;
|
|
449
|
+
locatorLabel?: string;
|
|
450
|
+
provenanceLabel?: string;
|
|
451
|
+
structure?: RAGChunkStructure;
|
|
452
|
+
};
|
|
453
|
+
export type RAGChunkGraphEdge = {
|
|
454
|
+
fromChunkId: string;
|
|
455
|
+
toChunkId: string;
|
|
456
|
+
relation: 'previous' | 'next';
|
|
457
|
+
};
|
|
458
|
+
export type RAGChunkGraphSectionGroup = {
|
|
459
|
+
id: string;
|
|
460
|
+
title?: string;
|
|
461
|
+
path?: string[];
|
|
462
|
+
depth?: number;
|
|
463
|
+
kind?: 'markdown_heading' | 'html_heading';
|
|
464
|
+
chunkIds: string[];
|
|
465
|
+
chunkCount: number;
|
|
466
|
+
};
|
|
467
|
+
export type RAGChunkGraph = {
|
|
468
|
+
nodes: RAGChunkGraphNode[];
|
|
469
|
+
edges: RAGChunkGraphEdge[];
|
|
470
|
+
sections: RAGChunkGraphSectionGroup[];
|
|
471
|
+
};
|
|
472
|
+
export type RAGChunkGraphNavigation = {
|
|
473
|
+
activeChunkId?: string;
|
|
474
|
+
activeNode?: RAGChunkGraphNode;
|
|
475
|
+
previousNode?: RAGChunkGraphNode;
|
|
476
|
+
nextNode?: RAGChunkGraphNode;
|
|
477
|
+
section?: RAGChunkGraphSectionGroup;
|
|
478
|
+
sectionNodes: RAGChunkGraphNode[];
|
|
397
479
|
};
|
|
398
480
|
export type RAGBackendDescriptor = {
|
|
399
481
|
id: string;
|
|
@@ -604,6 +686,25 @@ export type RAGCorpusHealth = {
|
|
|
604
686
|
staleAfterMs: number;
|
|
605
687
|
staleDocuments: string[];
|
|
606
688
|
averageChunksPerDocument: number;
|
|
689
|
+
inspection?: {
|
|
690
|
+
sourceNativeKinds: Record<string, number>;
|
|
691
|
+
documentsWithSourceLabels: number;
|
|
692
|
+
chunksWithSourceLabels: number;
|
|
693
|
+
sampleDocuments: Array<{
|
|
694
|
+
id: string;
|
|
695
|
+
title: string;
|
|
696
|
+
source: string;
|
|
697
|
+
sourceNativeKind?: string;
|
|
698
|
+
labels?: RAGSourceLabels;
|
|
699
|
+
}>;
|
|
700
|
+
sampleChunks: Array<{
|
|
701
|
+
chunkId: string;
|
|
702
|
+
documentId?: string;
|
|
703
|
+
source?: string;
|
|
704
|
+
sourceNativeKind?: string;
|
|
705
|
+
labels?: RAGSourceLabels;
|
|
706
|
+
}>;
|
|
707
|
+
};
|
|
607
708
|
};
|
|
608
709
|
export type RAGAdminActionRecord = {
|
|
609
710
|
id: string;
|