supercompat 3.7.0 → 3.8.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 +28 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +28 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4552,7 +4552,10 @@ var onEvent = function(param) {
|
|
|
4552
4552
|
// src/adapters/storage/prismaStorageAdapter/threads/runs/getMessages.ts
|
|
4553
4553
|
var getTake = function(param) {
|
|
4554
4554
|
var run3 = param.run;
|
|
4555
|
-
if (
|
|
4555
|
+
if ([
|
|
4556
|
+
"auto",
|
|
4557
|
+
"disabled"
|
|
4558
|
+
].includes(run3.truncationStrategy.type)) {
|
|
4556
4559
|
return null;
|
|
4557
4560
|
}
|
|
4558
4561
|
if (run3.truncationStrategy.type === "last_messages") {
|
|
@@ -6425,6 +6428,13 @@ var serializeTools2 = function(param) {
|
|
|
6425
6428
|
})
|
|
6426
6429
|
};
|
|
6427
6430
|
};
|
|
6431
|
+
var truncation = function(param) {
|
|
6432
|
+
var truncation_strategy = param.truncation_strategy;
|
|
6433
|
+
if (truncation_strategy.type === "disabled") {
|
|
6434
|
+
return "disabled";
|
|
6435
|
+
}
|
|
6436
|
+
return "auto";
|
|
6437
|
+
};
|
|
6428
6438
|
var defaultAssistant = {
|
|
6429
6439
|
model: "",
|
|
6430
6440
|
instructions: "",
|
|
@@ -6479,7 +6489,9 @@ var post17 = function(param) {
|
|
|
6479
6489
|
}, serializeTools2({
|
|
6480
6490
|
tools: tools
|
|
6481
6491
|
})), {
|
|
6482
|
-
truncation:
|
|
6492
|
+
truncation: truncation({
|
|
6493
|
+
truncation_strategy: truncation_strategy
|
|
6494
|
+
}),
|
|
6483
6495
|
text: {
|
|
6484
6496
|
format: response_format
|
|
6485
6497
|
},
|
|
@@ -7445,6 +7457,14 @@ var getToolCallOutputItems = function(param) {
|
|
|
7445
7457
|
computerCallOutputItems: computerCallOutputItems
|
|
7446
7458
|
};
|
|
7447
7459
|
};
|
|
7460
|
+
var truncation2 = function(param) {
|
|
7461
|
+
var openaiAssistant = param.openaiAssistant;
|
|
7462
|
+
var _openaiAssistant_truncation_strategy;
|
|
7463
|
+
if (((_openaiAssistant_truncation_strategy = openaiAssistant.truncation_strategy) === null || _openaiAssistant_truncation_strategy === void 0 ? void 0 : _openaiAssistant_truncation_strategy.type) === "disabled") {
|
|
7464
|
+
return "disabled";
|
|
7465
|
+
}
|
|
7466
|
+
return "auto";
|
|
7467
|
+
};
|
|
7448
7468
|
var post18 = function(param) {
|
|
7449
7469
|
var client = param.client, runAdapter = param.runAdapter;
|
|
7450
7470
|
return /*#__PURE__*/ function() {
|
|
@@ -7475,7 +7495,7 @@ var post18 = function(param) {
|
|
|
7475
7495
|
openaiAssistant = _state.sent();
|
|
7476
7496
|
return [
|
|
7477
7497
|
4,
|
|
7478
|
-
client.responses.create(_object_spread({
|
|
7498
|
+
client.responses.create(_object_spread_props(_object_spread({
|
|
7479
7499
|
conversation: threadId,
|
|
7480
7500
|
input: input,
|
|
7481
7501
|
instructions: openaiAssistant.instructions,
|
|
@@ -7484,9 +7504,11 @@ var post18 = function(param) {
|
|
|
7484
7504
|
stream: stream
|
|
7485
7505
|
}, serializeTools3({
|
|
7486
7506
|
tools: openaiAssistant.tools
|
|
7487
|
-
}),
|
|
7488
|
-
truncation:
|
|
7489
|
-
|
|
7507
|
+
})), {
|
|
7508
|
+
truncation: truncation2({
|
|
7509
|
+
openaiAssistant: openaiAssistant
|
|
7510
|
+
})
|
|
7511
|
+
}))
|
|
7490
7512
|
];
|
|
7491
7513
|
case 3:
|
|
7492
7514
|
response = _state.sent();
|