@wix/evalforge-evaluator 0.208.0 → 0.210.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/build/index.js
CHANGED
|
@@ -5735,6 +5735,12 @@ function resolveWixEvalforgeV1TestScenarioServiceUrl(opts) {
|
|
|
5735
5735
|
srcPath: "/_api/evalforge-backend",
|
|
5736
5736
|
destPath: ""
|
|
5737
5737
|
}
|
|
5738
|
+
],
|
|
5739
|
+
"www.wixapis.com": [
|
|
5740
|
+
{
|
|
5741
|
+
srcPath: "/_api/evalforge-backend",
|
|
5742
|
+
destPath: ""
|
|
5743
|
+
}
|
|
5738
5744
|
]
|
|
5739
5745
|
};
|
|
5740
5746
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
@@ -6461,6 +6467,12 @@ var WebhookIdentityType;
|
|
|
6461
6467
|
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
6462
6468
|
WebhookIdentityType2["APP"] = "APP";
|
|
6463
6469
|
})(WebhookIdentityType || (WebhookIdentityType = {}));
|
|
6470
|
+
var Status;
|
|
6471
|
+
(function(Status2) {
|
|
6472
|
+
Status2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
6473
|
+
Status2["VALID"] = "VALID";
|
|
6474
|
+
Status2["INVALID"] = "INVALID";
|
|
6475
|
+
})(Status || (Status = {}));
|
|
6464
6476
|
var SiteBootstrapHttpMethod;
|
|
6465
6477
|
(function(SiteBootstrapHttpMethod2) {
|
|
6466
6478
|
SiteBootstrapHttpMethod2["SITE_BOOTSTRAP_HTTP_METHOD_UNSPECIFIED"] = "SITE_BOOTSTRAP_HTTP_METHOD_UNSPECIFIED";
|
|
@@ -10966,7 +10978,14 @@ function calculateFromPricing(modelId, tokenUsage) {
|
|
|
10966
10978
|
return tokenUsage.prompt / 1e6 * pricing.input + tokenUsage.completion / 1e6 * pricing.output;
|
|
10967
10979
|
}
|
|
10968
10980
|
function calculateStepCost(step, modelId, provider, tokenUsage) {
|
|
10969
|
-
|
|
10981
|
+
const gatewayCost = extractGatewayCost(step, provider);
|
|
10982
|
+
if (gatewayCost !== void 0) {
|
|
10983
|
+
return gatewayCost;
|
|
10984
|
+
}
|
|
10985
|
+
console.warn(
|
|
10986
|
+
`[cost-calculation] gateway cost missing; using list-price fallback (provider=${provider}, model=${modelId}, promptTokens=${tokenUsage.prompt}, completionTokens=${tokenUsage.completion})`
|
|
10987
|
+
);
|
|
10988
|
+
return calculateFromPricing(modelId, tokenUsage);
|
|
10970
10989
|
}
|
|
10971
10990
|
|
|
10972
10991
|
// src/run-scenario/agents/simple-agent/build-conversation.ts
|