@ornncompute/cli 1.0.306 → 1.0.308
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 +1 -1
- package/package.json +1 -1
- package/vendor/capabilities/cli.js +22 -0
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ still requires a user session. See the [customer guide](../../docs-site/api-keys
|
|
|
57
57
|
|
|
58
58
|
## Inference
|
|
59
59
|
|
|
60
|
-
`ornn inference` covers models, completions, request history/usage, recorded
|
|
60
|
+
`ornn inference` covers models, completions, decisions, request history/usage, recorded
|
|
61
61
|
charges, and provider model management through the shared capability catalog.
|
|
62
62
|
`ornn admin inference` exposes staff model, request, and charge operations after
|
|
63
63
|
the standard staff preflight. Both use native gateway routes and existing auth.
|
package/package.json
CHANGED
|
@@ -13,6 +13,9 @@ function postInference(fetcher, path6, body2, signal) {
|
|
|
13
13
|
function createChatCompletion(fetcher, body2, signal) {
|
|
14
14
|
return postInference(fetcher, "/v1/inference/chat/completions", body2, signal);
|
|
15
15
|
}
|
|
16
|
+
function createDecision(fetcher, body2, signal) {
|
|
17
|
+
return postInference(fetcher, "/v1/inference/decisions", body2, signal);
|
|
18
|
+
}
|
|
16
19
|
function queryString(query3) {
|
|
17
20
|
const params = new URLSearchParams();
|
|
18
21
|
for (const [key, value] of Object.entries(query3)) {
|
|
@@ -299,6 +302,25 @@ var inferenceCapabilities = [
|
|
|
299
302
|
return body2.stream ? response : response.json();
|
|
300
303
|
}
|
|
301
304
|
}),
|
|
305
|
+
operation({
|
|
306
|
+
command: ["decisions", "create"],
|
|
307
|
+
description: "Ask questions about input using a Decisions model. Returns the provider's answers and spends the organization's credits at the listing's rates.",
|
|
308
|
+
input: z2.strictObject({
|
|
309
|
+
body: z2.looseObject({
|
|
310
|
+
model: text,
|
|
311
|
+
input: z2.union([z2.string(), z2.array(z2.looseObject({}))]),
|
|
312
|
+
questions: z2.array(z2.looseObject({}))
|
|
313
|
+
})
|
|
314
|
+
}),
|
|
315
|
+
usage: "--body JSON",
|
|
316
|
+
write: true,
|
|
317
|
+
execute: async (ctx, { body: body2 }) => {
|
|
318
|
+
if (!ctx.fetchResponse)
|
|
319
|
+
throw new Error("This client does not support decision responses.");
|
|
320
|
+
const response = await createDecision(ctx.fetchResponse, body2);
|
|
321
|
+
return response.json();
|
|
322
|
+
}
|
|
323
|
+
}),
|
|
302
324
|
operation({
|
|
303
325
|
command: ["requests", "list"],
|
|
304
326
|
description: "Read the organization's inference requests, or summary=usage for token totals and per-model timing statistics. Pass next_cursor unchanged as after. Timings are relay-observed milliseconds; prices remain exact decimal strings.",
|