@naturali/sdk 0.287.0 → 0.289.0
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/index.cjs +80 -0
- package/dist/index.d.cts +325 -4
- package/dist/index.d.mts +325 -4
- package/dist/index.mjs +80 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1212,6 +1212,86 @@ var Admin = class {
|
|
|
1212
1212
|
});
|
|
1213
1213
|
}
|
|
1214
1214
|
/**
|
|
1215
|
+
* List the model catalog
|
|
1216
|
+
*
|
|
1217
|
+
* Every catalog entry, retired ones included, with its cost of goods: what the offering in `GET /v1/models` is read from.
|
|
1218
|
+
*
|
|
1219
|
+
*/
|
|
1220
|
+
static listAdminModels(options) {
|
|
1221
|
+
return (options?.client ?? client).get({
|
|
1222
|
+
url: "/v1/admin/models",
|
|
1223
|
+
...options
|
|
1224
|
+
});
|
|
1225
|
+
}
|
|
1226
|
+
/**
|
|
1227
|
+
* Add a model to the catalog
|
|
1228
|
+
*
|
|
1229
|
+
* Offers a model through the shared provider at once. `model` is its public name and never changes. A model reads documents (`file`) whatever `input_modalities` says. The source's last listing fills the vendor and output modalities when it lists `id`.
|
|
1230
|
+
*
|
|
1231
|
+
*/
|
|
1232
|
+
static createAdminModel(options) {
|
|
1233
|
+
return (options.client ?? client).post({
|
|
1234
|
+
url: "/v1/admin/models",
|
|
1235
|
+
...options,
|
|
1236
|
+
headers: {
|
|
1237
|
+
"Content-Type": "application/json",
|
|
1238
|
+
...options.headers
|
|
1239
|
+
}
|
|
1240
|
+
});
|
|
1241
|
+
}
|
|
1242
|
+
/**
|
|
1243
|
+
* Edit or retire a catalog model
|
|
1244
|
+
*
|
|
1245
|
+
* Changes what the shared provider serves at once. `status: deprecated` retires the model (it stays listed, and agents pinned to it keep generating while its price stands); `available` offers it again.
|
|
1246
|
+
*
|
|
1247
|
+
*/
|
|
1248
|
+
static updateAdminModel(options) {
|
|
1249
|
+
return (options.client ?? client).patch({
|
|
1250
|
+
url: "/v1/admin/models/{model}",
|
|
1251
|
+
...options,
|
|
1252
|
+
headers: {
|
|
1253
|
+
"Content-Type": "application/json",
|
|
1254
|
+
...options.headers
|
|
1255
|
+
}
|
|
1256
|
+
});
|
|
1257
|
+
}
|
|
1258
|
+
/**
|
|
1259
|
+
* List what the sources list
|
|
1260
|
+
*
|
|
1261
|
+
* The models each managed source listed at its last read, each with the catalog `model` it is offered under, if any. Bedrock carries the cost the AWS offer publishes; Vertex and Anthropic publish none.
|
|
1262
|
+
*
|
|
1263
|
+
*/
|
|
1264
|
+
static listModelListings(options) {
|
|
1265
|
+
return (options?.client ?? client).get({
|
|
1266
|
+
url: "/v1/admin/model-listings",
|
|
1267
|
+
...options
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* Read the sources' listings now
|
|
1272
|
+
*
|
|
1273
|
+
* Reads every served source and replaces its listing. A source that fails keeps its previous listing and reports why. The catalog is not changed.
|
|
1274
|
+
*
|
|
1275
|
+
*/
|
|
1276
|
+
static refreshModelListings(options) {
|
|
1277
|
+
return (options?.client ?? client).post({
|
|
1278
|
+
url: "/v1/admin/model-listings/refresh",
|
|
1279
|
+
...options
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
/**
|
|
1283
|
+
* List where the catalog and the listings disagree
|
|
1284
|
+
*
|
|
1285
|
+
* `new`: a source lists an offerable model the catalog lacks. `retired`: an offered model its source no longer lists, or lists as deprecated. `price`: the source publishes a cost the catalog does not hold. `modalities`: the source reports other input modalities. Nothing here changes the catalog.
|
|
1286
|
+
*
|
|
1287
|
+
*/
|
|
1288
|
+
static listModelDrift(options) {
|
|
1289
|
+
return (options?.client ?? client).get({
|
|
1290
|
+
url: "/v1/admin/model-drift",
|
|
1291
|
+
...options
|
|
1292
|
+
});
|
|
1293
|
+
}
|
|
1294
|
+
/**
|
|
1215
1295
|
* List a user's monthly statements
|
|
1216
1296
|
*
|
|
1217
1297
|
* The same statements the account reads at `GET /v1/users/me/statements`, for an operator to bill from. Needs the `admin` role.
|