orchestrated 0.1.22 → 0.1.24
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/index.js +8 -5
- package/index.js.map +6 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -13914,6 +13914,7 @@ var init_zod = __esm(() => {
|
|
|
13914
13914
|
// src/batch/bedrock-openai-client.ts
|
|
13915
13915
|
var exports_bedrock_openai_client = {};
|
|
13916
13916
|
__export(exports_bedrock_openai_client, {
|
|
13917
|
+
trimToolCallNames: () => trimToolCallNames,
|
|
13917
13918
|
BedrockOpenAI: () => BedrockOpenAI
|
|
13918
13919
|
});
|
|
13919
13920
|
import OpenAI from "openai";
|
|
@@ -206343,7 +206344,6 @@ init_zod();
|
|
|
206343
206344
|
import { createHash as createHash2 } from "node:crypto";
|
|
206344
206345
|
|
|
206345
206346
|
// src/batch/manager.ts
|
|
206346
|
-
init_bedrock_openai_client();
|
|
206347
206347
|
import { createHash } from "node:crypto";
|
|
206348
206348
|
import * as fs from "node:fs";
|
|
206349
206349
|
import * as os from "node:os";
|
|
@@ -206477,6 +206477,8 @@ function converseOutputToBatchResult(record2) {
|
|
|
206477
206477
|
}
|
|
206478
206478
|
|
|
206479
206479
|
// src/batch/manager.ts
|
|
206480
|
+
init_bedrock_openai_client();
|
|
206481
|
+
|
|
206480
206482
|
class S3FileManager {
|
|
206481
206483
|
bucket;
|
|
206482
206484
|
region;
|
|
@@ -206589,7 +206591,7 @@ class BatchClient {
|
|
|
206589
206591
|
this.bedrockConfig = opts.bedrock;
|
|
206590
206592
|
this.s3FileManager = new S3FileManager(opts.bedrock.s3Bucket, opts.bedrock.region);
|
|
206591
206593
|
this.client = new BedrockOpenAI({
|
|
206592
|
-
baseURL: `https://bedrock-
|
|
206594
|
+
baseURL: `https://bedrock-runtime.${opts.bedrock.region}.amazonaws.com/openai/v1`,
|
|
206593
206595
|
apiKey: opts.bedrock.apiKey,
|
|
206594
206596
|
defaultHeaders: {
|
|
206595
206597
|
"X-Amzn-Bedrock-RoleArn": opts.bedrock.serviceRoleArn,
|
|
@@ -206970,6 +206972,7 @@ function createChatCompletionRequest(custom_id, body) {
|
|
|
206970
206972
|
};
|
|
206971
206973
|
}
|
|
206972
206974
|
// src/batch/client.ts
|
|
206975
|
+
init_bedrock_openai_client();
|
|
206973
206976
|
import OpenAI3 from "openai";
|
|
206974
206977
|
|
|
206975
206978
|
class BatchingError extends Error {
|
|
@@ -206993,7 +206996,7 @@ class EvalClient extends OpenAI3 {
|
|
|
206993
206996
|
const [body] = args;
|
|
206994
206997
|
const existingResponse = this.batchClient.findResponse(body);
|
|
206995
206998
|
if (existingResponse && existingResponse.response?.body) {
|
|
206996
|
-
return Promise.resolve(existingResponse.response.body);
|
|
206999
|
+
return Promise.resolve(trimToolCallNames(existingResponse.response.body));
|
|
206997
207000
|
}
|
|
206998
207001
|
const request = this.batchClient.addRequest(body);
|
|
206999
207002
|
throw new BatchingError(request);
|
|
@@ -207922,7 +207925,7 @@ async function evaluateDataCase(dataCase, evaluator, _ctx, options) {
|
|
|
207922
207925
|
id: caseId,
|
|
207923
207926
|
client: client2
|
|
207924
207927
|
};
|
|
207925
|
-
if (options.
|
|
207928
|
+
if (options.batchProcessor === "BEDROCK_OPENAI" || options.batchProcessor === "BEDROCK") {
|
|
207926
207929
|
scorerArgs.model = _ctx.state.bedrockModelId;
|
|
207927
207930
|
scorerArgs.maxTokens = 512 * 4;
|
|
207928
207931
|
}
|
|
@@ -208681,4 +208684,4 @@ export {
|
|
|
208681
208684
|
Behavioral
|
|
208682
208685
|
};
|
|
208683
208686
|
|
|
208684
|
-
//# debugId=
|
|
208687
|
+
//# debugId=364D07358EEADC5264756E2164756E21
|