@memberjunction/realtime-widget 6.3.0-edge.0 → 6.3.0-edge.2

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.
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  IsPlainObject,
3
3
  SafeDeepMerge
4
- } from "./chunk-3SGPPDAR.js";
4
+ } from "./chunk-KHEWGJIZ.js";
5
5
 
6
6
  // ../../AI/Core/dist/generic/baseModel.js
7
7
  var BaseResult = class {
@@ -2684,6 +2684,14 @@ var BaseLLM = class extends BaseModel {
2684
2684
  }
2685
2685
  };
2686
2686
 
2687
+ // ../../AI/Core/dist/generic/decision.types.js
2688
+ var PLATT_LOGIT_CLAMP = 1e-6;
2689
+ function ApplyPlattCalibration(p, calibration) {
2690
+ const clamped = Math.min(1 - PLATT_LOGIT_CLAMP, Math.max(PLATT_LOGIT_CLAMP, p));
2691
+ const logit = Math.log(clamped / (1 - clamped));
2692
+ return 1 / (1 + Math.exp(-(calibration.A * logit + calibration.B)));
2693
+ }
2694
+
2687
2695
  // ../../AI/Core/dist/generic/apiKeyDictionary.js
2688
2696
  var AIAPIKeys = class _AIAPIKeys {
2689
2697
  static {
@@ -3686,6 +3694,7 @@ function fragmentTiming(data, init) {
3686
3694
  }
3687
3695
 
3688
3696
  export {
3697
+ ApplyPlattCalibration,
3689
3698
  RealtimeConversationMemory,
3690
3699
  RenderRealtimeMemorySeed,
3691
3700
  RenderRealtimeMemorySeedAsContextNote,