@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/types/ai.d.ts
CHANGED
|
@@ -1286,6 +1286,17 @@ export type RAGLabelValueRow = {
|
|
|
1286
1286
|
label: string;
|
|
1287
1287
|
value: string;
|
|
1288
1288
|
};
|
|
1289
|
+
export type RAGRetrievalTraceStepPresentation = {
|
|
1290
|
+
stage: RAGRetrievalTraceStage;
|
|
1291
|
+
label: string;
|
|
1292
|
+
count?: number;
|
|
1293
|
+
rows: RAGLabelValueRow[];
|
|
1294
|
+
};
|
|
1295
|
+
export type RAGRetrievalTracePresentation = {
|
|
1296
|
+
stats: RAGLabelValueRow[];
|
|
1297
|
+
details: RAGLabelValueRow[];
|
|
1298
|
+
steps: RAGRetrievalTraceStepPresentation[];
|
|
1299
|
+
};
|
|
1289
1300
|
export type RAGEvaluationLeaderboardEntry = {
|
|
1290
1301
|
runId: string;
|
|
1291
1302
|
suiteId: string;
|
package/dist/vue/ai/index.js
CHANGED
|
@@ -1135,6 +1135,69 @@ var formatTimestampLabel = (value) => {
|
|
|
1135
1135
|
timeStyle: "short"
|
|
1136
1136
|
});
|
|
1137
1137
|
};
|
|
1138
|
+
var formatRAGTraceValue = (value) => {
|
|
1139
|
+
if (typeof value === "string")
|
|
1140
|
+
return value;
|
|
1141
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
1142
|
+
return String(value);
|
|
1143
|
+
}
|
|
1144
|
+
if (Array.isArray(value)) {
|
|
1145
|
+
return value.join(", ");
|
|
1146
|
+
}
|
|
1147
|
+
if (value && typeof value === "object") {
|
|
1148
|
+
return JSON.stringify(value);
|
|
1149
|
+
}
|
|
1150
|
+
return "n/a";
|
|
1151
|
+
};
|
|
1152
|
+
var buildRAGRetrievalTracePresentation = (trace) => {
|
|
1153
|
+
if (!trace) {
|
|
1154
|
+
return {
|
|
1155
|
+
details: [],
|
|
1156
|
+
stats: [],
|
|
1157
|
+
steps: []
|
|
1158
|
+
};
|
|
1159
|
+
}
|
|
1160
|
+
const stats = [
|
|
1161
|
+
{ label: "Mode", value: trace.mode },
|
|
1162
|
+
{ label: "Final Results", value: String(trace.resultCounts.final) },
|
|
1163
|
+
{
|
|
1164
|
+
label: "Vector Candidates",
|
|
1165
|
+
value: String(trace.resultCounts.vector)
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
label: "Lexical Candidates",
|
|
1169
|
+
value: String(trace.resultCounts.lexical)
|
|
1170
|
+
}
|
|
1171
|
+
];
|
|
1172
|
+
const details = [
|
|
1173
|
+
{ label: "Transformed query", value: trace.transformedQuery },
|
|
1174
|
+
{
|
|
1175
|
+
label: "Variant queries",
|
|
1176
|
+
value: trace.variantQueries.length > 0 ? trace.variantQueries.join(" \xB7 ") : "none"
|
|
1177
|
+
},
|
|
1178
|
+
{ label: "Candidate topK", value: String(trace.candidateTopK) },
|
|
1179
|
+
{ label: "Lexical topK", value: String(trace.lexicalTopK) }
|
|
1180
|
+
];
|
|
1181
|
+
const steps = trace.steps.map((step) => ({
|
|
1182
|
+
count: step.count,
|
|
1183
|
+
label: step.label,
|
|
1184
|
+
rows: [
|
|
1185
|
+
{ label: "stage", value: step.stage },
|
|
1186
|
+
...typeof step.count === "number" ? [{ label: "count", value: String(step.count) }] : [],
|
|
1187
|
+
...typeof step.durationMs === "number" ? [{ label: "durationMs", value: String(step.durationMs) }] : [],
|
|
1188
|
+
...Object.entries(step.metadata ?? {}).map(([key, value]) => ({
|
|
1189
|
+
label: key,
|
|
1190
|
+
value: formatRAGTraceValue(value)
|
|
1191
|
+
}))
|
|
1192
|
+
],
|
|
1193
|
+
stage: step.stage
|
|
1194
|
+
}));
|
|
1195
|
+
return {
|
|
1196
|
+
details,
|
|
1197
|
+
stats,
|
|
1198
|
+
steps
|
|
1199
|
+
};
|
|
1200
|
+
};
|
|
1138
1201
|
var formatMediaTimestamp = (value) => {
|
|
1139
1202
|
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
1140
1203
|
return;
|
|
@@ -3705,5 +3768,5 @@ export {
|
|
|
3705
3768
|
AIStreamKey
|
|
3706
3769
|
};
|
|
3707
3770
|
|
|
3708
|
-
//# debugId=
|
|
3771
|
+
//# debugId=302ACD06C95EFA1364756E2164756E21
|
|
3709
3772
|
//# sourceMappingURL=index.js.map
|