openai 6.40.0 → 6.42.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/CHANGELOG.md +16 -0
- package/README.md +33 -0
- package/bedrock.d.mts +58 -0
- package/bedrock.d.mts.map +1 -0
- package/bedrock.d.ts +58 -0
- package/bedrock.d.ts.map +1 -0
- package/bedrock.js +105 -0
- package/bedrock.js.map +1 -0
- package/bedrock.mjs +100 -0
- package/bedrock.mjs.map +1 -0
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/package.json +11 -1
- package/resources/chat/completions/completions.d.mts +350 -1
- package/resources/chat/completions/completions.d.mts.map +1 -1
- package/resources/chat/completions/completions.d.ts +350 -1
- package/resources/chat/completions/completions.d.ts.map +1 -1
- package/resources/chat/completions/completions.js.map +1 -1
- package/resources/chat/completions/completions.mjs.map +1 -1
- package/resources/responses/responses.d.mts +157 -0
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +157 -0
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs.map +1 -1
- package/src/bedrock.ts +191 -0
- package/src/index.ts +1 -0
- package/src/resources/chat/completions/completions.ts +382 -1
- package/src/resources/responses/responses.ts +170 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1102,6 +1102,12 @@ export interface Response {
|
|
|
1102
1102
|
*/
|
|
1103
1103
|
max_output_tokens?: number | null;
|
|
1104
1104
|
|
|
1105
|
+
/**
|
|
1106
|
+
* Moderation results for the response input and output, if moderated completions
|
|
1107
|
+
* were requested.
|
|
1108
|
+
*/
|
|
1109
|
+
moderation?: Response.Moderation | null;
|
|
1110
|
+
|
|
1105
1111
|
/**
|
|
1106
1112
|
* The unique ID of the previous response to the model. Use this to create
|
|
1107
1113
|
* multi-turn conversations. Learn more about
|
|
@@ -1247,6 +1253,138 @@ export namespace Response {
|
|
|
1247
1253
|
*/
|
|
1248
1254
|
id: string;
|
|
1249
1255
|
}
|
|
1256
|
+
|
|
1257
|
+
/**
|
|
1258
|
+
* Moderation results for the response input and output, if moderated completions
|
|
1259
|
+
* were requested.
|
|
1260
|
+
*/
|
|
1261
|
+
export interface Moderation {
|
|
1262
|
+
/**
|
|
1263
|
+
* Moderation for the response input.
|
|
1264
|
+
*/
|
|
1265
|
+
input: Moderation.ModerationResult | Moderation.Error;
|
|
1266
|
+
|
|
1267
|
+
/**
|
|
1268
|
+
* Moderation for the response output.
|
|
1269
|
+
*/
|
|
1270
|
+
output: Moderation.ModerationResult | Moderation.Error;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
export namespace Moderation {
|
|
1274
|
+
/**
|
|
1275
|
+
* A moderation result produced for the response input or output.
|
|
1276
|
+
*/
|
|
1277
|
+
export interface ModerationResult {
|
|
1278
|
+
/**
|
|
1279
|
+
* A dictionary of moderation categories to booleans, True if the input is flagged
|
|
1280
|
+
* under this category.
|
|
1281
|
+
*/
|
|
1282
|
+
categories: { [key: string]: boolean };
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* Which modalities of input are reflected by the score for each category.
|
|
1286
|
+
*/
|
|
1287
|
+
category_applied_input_types: { [key: string]: Array<'text' | 'image'> };
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* A dictionary of moderation categories to scores.
|
|
1291
|
+
*/
|
|
1292
|
+
category_scores: { [key: string]: number };
|
|
1293
|
+
|
|
1294
|
+
/**
|
|
1295
|
+
* A boolean indicating whether the content was flagged by any category.
|
|
1296
|
+
*/
|
|
1297
|
+
flagged: boolean;
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* The moderation model that produced this result.
|
|
1301
|
+
*/
|
|
1302
|
+
model: string;
|
|
1303
|
+
|
|
1304
|
+
/**
|
|
1305
|
+
* The object type, which was always `moderation_result` for successful moderation
|
|
1306
|
+
* results.
|
|
1307
|
+
*/
|
|
1308
|
+
type: 'moderation_result';
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
/**
|
|
1312
|
+
* An error produced while attempting moderation for the response input or output.
|
|
1313
|
+
*/
|
|
1314
|
+
export interface Error {
|
|
1315
|
+
/**
|
|
1316
|
+
* The error code.
|
|
1317
|
+
*/
|
|
1318
|
+
code: string;
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* The error message.
|
|
1322
|
+
*/
|
|
1323
|
+
message: string;
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* The object type, which was always `error` for moderation failures.
|
|
1327
|
+
*/
|
|
1328
|
+
type: 'error';
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
/**
|
|
1332
|
+
* A moderation result produced for the response input or output.
|
|
1333
|
+
*/
|
|
1334
|
+
export interface ModerationResult {
|
|
1335
|
+
/**
|
|
1336
|
+
* A dictionary of moderation categories to booleans, True if the input is flagged
|
|
1337
|
+
* under this category.
|
|
1338
|
+
*/
|
|
1339
|
+
categories: { [key: string]: boolean };
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* Which modalities of input are reflected by the score for each category.
|
|
1343
|
+
*/
|
|
1344
|
+
category_applied_input_types: { [key: string]: Array<'text' | 'image'> };
|
|
1345
|
+
|
|
1346
|
+
/**
|
|
1347
|
+
* A dictionary of moderation categories to scores.
|
|
1348
|
+
*/
|
|
1349
|
+
category_scores: { [key: string]: number };
|
|
1350
|
+
|
|
1351
|
+
/**
|
|
1352
|
+
* A boolean indicating whether the content was flagged by any category.
|
|
1353
|
+
*/
|
|
1354
|
+
flagged: boolean;
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* The moderation model that produced this result.
|
|
1358
|
+
*/
|
|
1359
|
+
model: string;
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* The object type, which was always `moderation_result` for successful moderation
|
|
1363
|
+
* results.
|
|
1364
|
+
*/
|
|
1365
|
+
type: 'moderation_result';
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* An error produced while attempting moderation for the response input or output.
|
|
1370
|
+
*/
|
|
1371
|
+
export interface Error {
|
|
1372
|
+
/**
|
|
1373
|
+
* The error code.
|
|
1374
|
+
*/
|
|
1375
|
+
code: string;
|
|
1376
|
+
|
|
1377
|
+
/**
|
|
1378
|
+
* The error message.
|
|
1379
|
+
*/
|
|
1380
|
+
message: string;
|
|
1381
|
+
|
|
1382
|
+
/**
|
|
1383
|
+
* The object type, which was always `error` for moderation failures.
|
|
1384
|
+
*/
|
|
1385
|
+
type: 'error';
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1250
1388
|
}
|
|
1251
1389
|
|
|
1252
1390
|
/**
|
|
@@ -6639,6 +6777,11 @@ export interface ResponsesClientEvent {
|
|
|
6639
6777
|
*/
|
|
6640
6778
|
model?: Shared.ResponsesModel;
|
|
6641
6779
|
|
|
6780
|
+
/**
|
|
6781
|
+
* Configuration for running moderation on the input and output of this response.
|
|
6782
|
+
*/
|
|
6783
|
+
moderation?: ResponsesClientEvent.Moderation | null;
|
|
6784
|
+
|
|
6642
6785
|
/**
|
|
6643
6786
|
* Whether to allow the model to run tool calls in parallel.
|
|
6644
6787
|
*/
|
|
@@ -6845,6 +6988,17 @@ export namespace ResponsesClientEvent {
|
|
|
6845
6988
|
compact_threshold?: number | null;
|
|
6846
6989
|
}
|
|
6847
6990
|
|
|
6991
|
+
/**
|
|
6992
|
+
* Configuration for running moderation on the input and output of this response.
|
|
6993
|
+
*/
|
|
6994
|
+
export interface Moderation {
|
|
6995
|
+
/**
|
|
6996
|
+
* The moderation model to use for moderated completions, e.g.
|
|
6997
|
+
* 'omni-moderation-latest'.
|
|
6998
|
+
*/
|
|
6999
|
+
model: string;
|
|
7000
|
+
}
|
|
7001
|
+
|
|
6848
7002
|
/**
|
|
6849
7003
|
* Options for streaming responses. Only set this when you set `stream: true`.
|
|
6850
7004
|
*/
|
|
@@ -7694,6 +7848,11 @@ export interface ResponseCreateParamsBase {
|
|
|
7694
7848
|
*/
|
|
7695
7849
|
model?: Shared.ResponsesModel;
|
|
7696
7850
|
|
|
7851
|
+
/**
|
|
7852
|
+
* Configuration for running moderation on the input and output of this response.
|
|
7853
|
+
*/
|
|
7854
|
+
moderation?: ResponseCreateParams.Moderation | null;
|
|
7855
|
+
|
|
7697
7856
|
/**
|
|
7698
7857
|
* Whether to allow the model to run tool calls in parallel.
|
|
7699
7858
|
*/
|
|
@@ -7899,6 +8058,17 @@ export namespace ResponseCreateParams {
|
|
|
7899
8058
|
compact_threshold?: number | null;
|
|
7900
8059
|
}
|
|
7901
8060
|
|
|
8061
|
+
/**
|
|
8062
|
+
* Configuration for running moderation on the input and output of this response.
|
|
8063
|
+
*/
|
|
8064
|
+
export interface Moderation {
|
|
8065
|
+
/**
|
|
8066
|
+
* The moderation model to use for moderated completions, e.g.
|
|
8067
|
+
* 'omni-moderation-latest'.
|
|
8068
|
+
*/
|
|
8069
|
+
model: string;
|
|
8070
|
+
}
|
|
8071
|
+
|
|
7902
8072
|
/**
|
|
7903
8073
|
* Options for streaming responses. Only set this when you set `stream: true`.
|
|
7904
8074
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '6.
|
|
1
|
+
export const VERSION = '6.42.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "6.
|
|
1
|
+
export declare const VERSION = "6.42.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "6.
|
|
1
|
+
export declare const VERSION = "6.42.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '6.
|
|
1
|
+
export const VERSION = '6.42.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|