@answerlayer/cli 0.1.4 → 0.1.5
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/README.md +4 -0
- package/package.json +1 -1
- package/src/cli.js +20 -1
package/README.md
CHANGED
|
@@ -159,10 +159,14 @@ answerlayer semantic metrics generate --connection <connection-id> --prompt "Saa
|
|
|
159
159
|
|
|
160
160
|
answerlayer inquiry ask --connection <connection-id> "What changed in revenue this month?"
|
|
161
161
|
answerlayer inquiry ask --session <session-id> "Break that down by region"
|
|
162
|
+
answerlayer inquiry models
|
|
163
|
+
answerlayer inquiry ask --connection <connection-id> --model claude-opus-4-6 "Investigate unusual revenue changes"
|
|
162
164
|
|
|
163
165
|
answerlayer evals suites create --name "Revenue checks" --connection <connection-id>
|
|
164
166
|
answerlayer evals cases create <suite-id> --title "Monthly revenue" --question "What was revenue last month?" --expected-sql "select sum(amount) from orders where ..."
|
|
165
167
|
answerlayer evals runs create <suite-id> --label "Before prompt change"
|
|
168
|
+
answerlayer evals runs create <suite-id> --case <case-id> --case <case-id> --label "Focused smoke run"
|
|
169
|
+
answerlayer evals runs create <suite-id> --model claude-opus-4-6 --label "Model comparison"
|
|
166
170
|
answerlayer evals runs compare <run-id> --baseline <baseline-run-id>
|
|
167
171
|
|
|
168
172
|
answerlayer dashboards create --title "Executive overview" --visibility org
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -489,6 +489,20 @@ async function handleSemantic(client, command, positionals, parsed, io) {
|
|
|
489
489
|
}
|
|
490
490
|
|
|
491
491
|
async function handleInquiry(client, command, positionals, parsed, io) {
|
|
492
|
+
if (command === "models") {
|
|
493
|
+
return requestAndPrint(client, "GET", "/api/v1/inquiry/models", parsed, io, {
|
|
494
|
+
tableDataKey: "models",
|
|
495
|
+
tablePrefix: (data) => `Default model: ${data.default_model}\n\n`,
|
|
496
|
+
table: [
|
|
497
|
+
{ key: "id", label: "ID" },
|
|
498
|
+
{ key: "label", label: "Model" },
|
|
499
|
+
{ key: "family", label: "Provider" },
|
|
500
|
+
{ key: "transport", label: "Transport" },
|
|
501
|
+
{ key: "description", label: "Description" },
|
|
502
|
+
],
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
|
|
492
506
|
if (command === "ask") {
|
|
493
507
|
const question = firstValue(parsed.flags.question) || positionals.join(" ");
|
|
494
508
|
const connectionId = firstValue(parsed.flags.connection);
|
|
@@ -663,6 +677,7 @@ async function handleEvals(client, resource, positionals, parsed, io) {
|
|
|
663
677
|
label: firstValue(parsed.flags.label),
|
|
664
678
|
model: firstValue(parsed.flags.model),
|
|
665
679
|
baseline_run_id: firstValue(parsed.flags.baseline),
|
|
680
|
+
case_ids: optionalCsvOrRepeated(parsed.flags.case),
|
|
666
681
|
});
|
|
667
682
|
requirePayloadValue(payload, "suite_id", "evals runs create requires a suite id or --suite");
|
|
668
683
|
return requestAndPrint(client, "POST", `${base}/runs`, parsed, io, { body: payload });
|
|
@@ -1259,6 +1274,7 @@ async function requestAndPrint(client, method, pathName, parsed, io, options = {
|
|
|
1259
1274
|
if (!parsed.flags.json && options.table) {
|
|
1260
1275
|
const rows = options.tableDataKey ? result.data[options.tableDataKey] : result.data;
|
|
1261
1276
|
if (Array.isArray(rows)) {
|
|
1277
|
+
if (options.tablePrefix) write(io.stdout, options.tablePrefix(result.data));
|
|
1262
1278
|
write(io.stdout, formatList(rows, options.table));
|
|
1263
1279
|
return;
|
|
1264
1280
|
}
|
|
@@ -1386,6 +1402,8 @@ function normalizeFlagName(rawName) {
|
|
|
1386
1402
|
"--label": "label",
|
|
1387
1403
|
"--baseline": "baseline",
|
|
1388
1404
|
"--baseline-run": "baseline",
|
|
1405
|
+
"--case": "case",
|
|
1406
|
+
"--case-id": "case",
|
|
1389
1407
|
"--expected-answer": "expectedAnswer",
|
|
1390
1408
|
"--expected-sql": "expectedSql",
|
|
1391
1409
|
"--expected-values": "expectedValues",
|
|
@@ -1526,10 +1544,11 @@ Core:
|
|
|
1526
1544
|
Data products:
|
|
1527
1545
|
answerlayer saved-queries list|get|create|update|delete|approve|unapprove|execute
|
|
1528
1546
|
answerlayer semantic <entities|relationships|measures|metrics|dimensions|filters> list|get|create|update|delete|delete-all|generate
|
|
1529
|
-
answerlayer inquiry ask|sessions|create-session|session|update-session|delete-session|turn
|
|
1547
|
+
answerlayer inquiry models|ask|sessions|create-session|session|update-session|delete-session|turn
|
|
1530
1548
|
answerlayer evals suites list|create|get|update|delete
|
|
1531
1549
|
answerlayer evals cases create|update|delete
|
|
1532
1550
|
answerlayer evals runs list|create|get|cancel|compare
|
|
1551
|
+
create accepts --case <case-id> (repeat or comma-separate to select cases)
|
|
1533
1552
|
answerlayer generation start|list|get|status|stream|cancel|questions|guidance|delete
|
|
1534
1553
|
answerlayer tiles list|get|create|update|data|delete
|
|
1535
1554
|
answerlayer dashboards list|get|create|update|delete|duplicate|manifest|attach-tile|move-tile|detach-tile|assignments|assign|unassign|tile-data
|