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.js
CHANGED
|
@@ -4442,7 +4442,10 @@ var onEvent = function(param) {
|
|
|
4442
4442
|
// src/adapters/storage/prismaStorageAdapter/threads/runs/getMessages.ts
|
|
4443
4443
|
var getTake = function(param) {
|
|
4444
4444
|
var run3 = param.run;
|
|
4445
|
-
if (
|
|
4445
|
+
if ([
|
|
4446
|
+
"auto",
|
|
4447
|
+
"disabled"
|
|
4448
|
+
].includes(run3.truncationStrategy.type)) {
|
|
4446
4449
|
return null;
|
|
4447
4450
|
}
|
|
4448
4451
|
if (run3.truncationStrategy.type === "last_messages") {
|
|
@@ -6315,6 +6318,13 @@ var serializeTools2 = function(param) {
|
|
|
6315
6318
|
})
|
|
6316
6319
|
};
|
|
6317
6320
|
};
|
|
6321
|
+
var truncation = function(param) {
|
|
6322
|
+
var truncation_strategy = param.truncation_strategy;
|
|
6323
|
+
if (truncation_strategy.type === "disabled") {
|
|
6324
|
+
return "disabled";
|
|
6325
|
+
}
|
|
6326
|
+
return "auto";
|
|
6327
|
+
};
|
|
6318
6328
|
var defaultAssistant = {
|
|
6319
6329
|
model: "",
|
|
6320
6330
|
instructions: "",
|
|
@@ -6368,7 +6378,9 @@ var post17 = function(param) {
|
|
|
6368
6378
|
}, serializeTools2({
|
|
6369
6379
|
tools: tools
|
|
6370
6380
|
})), {
|
|
6371
|
-
truncation:
|
|
6381
|
+
truncation: truncation({
|
|
6382
|
+
truncation_strategy: truncation_strategy
|
|
6383
|
+
}),
|
|
6372
6384
|
text: {
|
|
6373
6385
|
format: response_format
|
|
6374
6386
|
},
|
|
@@ -7334,6 +7346,14 @@ var getToolCallOutputItems = function(param) {
|
|
|
7334
7346
|
computerCallOutputItems: computerCallOutputItems
|
|
7335
7347
|
};
|
|
7336
7348
|
};
|
|
7349
|
+
var truncation2 = function(param) {
|
|
7350
|
+
var openaiAssistant = param.openaiAssistant;
|
|
7351
|
+
var _openaiAssistant_truncation_strategy;
|
|
7352
|
+
if (((_openaiAssistant_truncation_strategy = openaiAssistant.truncation_strategy) === null || _openaiAssistant_truncation_strategy === void 0 ? void 0 : _openaiAssistant_truncation_strategy.type) === "disabled") {
|
|
7353
|
+
return "disabled";
|
|
7354
|
+
}
|
|
7355
|
+
return "auto";
|
|
7356
|
+
};
|
|
7337
7357
|
var post18 = function(param) {
|
|
7338
7358
|
var client = param.client, runAdapter = param.runAdapter;
|
|
7339
7359
|
return /*#__PURE__*/ function() {
|
|
@@ -7364,7 +7384,7 @@ var post18 = function(param) {
|
|
|
7364
7384
|
openaiAssistant = _state.sent();
|
|
7365
7385
|
return [
|
|
7366
7386
|
4,
|
|
7367
|
-
client.responses.create(_object_spread({
|
|
7387
|
+
client.responses.create(_object_spread_props(_object_spread({
|
|
7368
7388
|
conversation: threadId,
|
|
7369
7389
|
input: input,
|
|
7370
7390
|
instructions: openaiAssistant.instructions,
|
|
@@ -7373,9 +7393,11 @@ var post18 = function(param) {
|
|
|
7373
7393
|
stream: stream
|
|
7374
7394
|
}, serializeTools3({
|
|
7375
7395
|
tools: openaiAssistant.tools
|
|
7376
|
-
}),
|
|
7377
|
-
truncation:
|
|
7378
|
-
|
|
7396
|
+
})), {
|
|
7397
|
+
truncation: truncation2({
|
|
7398
|
+
openaiAssistant: openaiAssistant
|
|
7399
|
+
})
|
|
7400
|
+
}))
|
|
7379
7401
|
];
|
|
7380
7402
|
case 3:
|
|
7381
7403
|
response = _state.sent();
|