@absolutejs/absolute 0.19.0-beta.535 → 0.19.0-beta.536
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 +64 -1
- package/dist/ai/client/index.js.map +3 -3
- package/dist/ai/index.js +66 -1
- package/dist/ai/index.js.map +3 -3
- package/dist/angular/ai/index.js +64 -1
- package/dist/angular/ai/index.js.map +3 -3
- package/dist/react/ai/index.js +64 -1
- package/dist/react/ai/index.js.map +3 -3
- package/dist/src/ai/index.d.ts +1 -1
- package/dist/src/ai/rag/index.d.ts +1 -1
- package/dist/src/ai/rag/presentation.d.ts +3 -1
- package/dist/svelte/ai/index.js +64 -1
- package/dist/svelte/ai/index.js.map +3 -3
- package/dist/types/ai.d.ts +11 -0
- package/dist/vue/ai/index.js +64 -1
- package/dist/vue/ai/index.js.map +3 -3
- package/package.json +7 -7
package/dist/ai/index.js
CHANGED
|
@@ -4718,6 +4718,69 @@ var formatTimestampLabel = (value) => {
|
|
|
4718
4718
|
timeStyle: "short"
|
|
4719
4719
|
});
|
|
4720
4720
|
};
|
|
4721
|
+
var formatRAGTraceValue = (value) => {
|
|
4722
|
+
if (typeof value === "string")
|
|
4723
|
+
return value;
|
|
4724
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
4725
|
+
return String(value);
|
|
4726
|
+
}
|
|
4727
|
+
if (Array.isArray(value)) {
|
|
4728
|
+
return value.join(", ");
|
|
4729
|
+
}
|
|
4730
|
+
if (value && typeof value === "object") {
|
|
4731
|
+
return JSON.stringify(value);
|
|
4732
|
+
}
|
|
4733
|
+
return "n/a";
|
|
4734
|
+
};
|
|
4735
|
+
var buildRAGRetrievalTracePresentation = (trace) => {
|
|
4736
|
+
if (!trace) {
|
|
4737
|
+
return {
|
|
4738
|
+
details: [],
|
|
4739
|
+
stats: [],
|
|
4740
|
+
steps: []
|
|
4741
|
+
};
|
|
4742
|
+
}
|
|
4743
|
+
const stats = [
|
|
4744
|
+
{ label: "Mode", value: trace.mode },
|
|
4745
|
+
{ label: "Final Results", value: String(trace.resultCounts.final) },
|
|
4746
|
+
{
|
|
4747
|
+
label: "Vector Candidates",
|
|
4748
|
+
value: String(trace.resultCounts.vector)
|
|
4749
|
+
},
|
|
4750
|
+
{
|
|
4751
|
+
label: "Lexical Candidates",
|
|
4752
|
+
value: String(trace.resultCounts.lexical)
|
|
4753
|
+
}
|
|
4754
|
+
];
|
|
4755
|
+
const details = [
|
|
4756
|
+
{ label: "Transformed query", value: trace.transformedQuery },
|
|
4757
|
+
{
|
|
4758
|
+
label: "Variant queries",
|
|
4759
|
+
value: trace.variantQueries.length > 0 ? trace.variantQueries.join(" \xB7 ") : "none"
|
|
4760
|
+
},
|
|
4761
|
+
{ label: "Candidate topK", value: String(trace.candidateTopK) },
|
|
4762
|
+
{ label: "Lexical topK", value: String(trace.lexicalTopK) }
|
|
4763
|
+
];
|
|
4764
|
+
const steps = trace.steps.map((step) => ({
|
|
4765
|
+
count: step.count,
|
|
4766
|
+
label: step.label,
|
|
4767
|
+
rows: [
|
|
4768
|
+
{ label: "stage", value: step.stage },
|
|
4769
|
+
...typeof step.count === "number" ? [{ label: "count", value: String(step.count) }] : [],
|
|
4770
|
+
...typeof step.durationMs === "number" ? [{ label: "durationMs", value: String(step.durationMs) }] : [],
|
|
4771
|
+
...Object.entries(step.metadata ?? {}).map(([key, value]) => ({
|
|
4772
|
+
label: key,
|
|
4773
|
+
value: formatRAGTraceValue(value)
|
|
4774
|
+
}))
|
|
4775
|
+
],
|
|
4776
|
+
stage: step.stage
|
|
4777
|
+
}));
|
|
4778
|
+
return {
|
|
4779
|
+
details,
|
|
4780
|
+
stats,
|
|
4781
|
+
steps
|
|
4782
|
+
};
|
|
4783
|
+
};
|
|
4721
4784
|
var formatMediaTimestamp = (value) => {
|
|
4722
4785
|
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
4723
4786
|
return;
|
|
@@ -11622,6 +11685,7 @@ export {
|
|
|
11622
11685
|
geminiEmbeddings,
|
|
11623
11686
|
gemini,
|
|
11624
11687
|
fuseRAGQueryResults,
|
|
11688
|
+
formatRAGTraceValue,
|
|
11625
11689
|
executeDryRunRAGEvaluation,
|
|
11626
11690
|
evaluateRAGCollection,
|
|
11627
11691
|
evaluateRAGAnswerGroundingCase,
|
|
@@ -11684,6 +11748,7 @@ export {
|
|
|
11684
11748
|
buildRAGStreamProgress,
|
|
11685
11749
|
buildRAGSourceSummaries,
|
|
11686
11750
|
buildRAGSourceGroups,
|
|
11751
|
+
buildRAGRetrievalTracePresentation,
|
|
11687
11752
|
buildRAGLexicalHaystack,
|
|
11688
11753
|
buildRAGGroundingReferences,
|
|
11689
11754
|
buildRAGGroundedAnswer,
|
|
@@ -11709,5 +11774,5 @@ export {
|
|
|
11709
11774
|
aiChat
|
|
11710
11775
|
};
|
|
11711
11776
|
|
|
11712
|
-
//# debugId=
|
|
11777
|
+
//# debugId=2E0B1A7677E438F664756E2164756E21
|
|
11713
11778
|
//# sourceMappingURL=index.js.map
|