@memberjunction/core-entities 2.66.0 → 2.68.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.
@@ -1108,13 +1108,13 @@ exports.AIAgentSchema = zod_1.z.object({
1108
1108
  * * Field Name: PayloadSelfReadPaths
1109
1109
  * * Display Name: Payload Self Read Paths
1110
1110
  * * SQL Data Type: nvarchar(MAX)
1111
- * * Description: JSON array of paths that specify what parts of the payload the agent's own prompt can read. Controls downstream data
1111
+ * * Description: JSON array of paths that specify what parts of the payload the agent's own prompt can read. Controls downstream data
1112
1112
  flow when the agent executes its own prompt step.`),
1113
1113
  PayloadSelfWritePaths: zod_1.z.string().nullable().describe(`
1114
1114
  * * Field Name: PayloadSelfWritePaths
1115
1115
  * * Display Name: Payload Self Write Paths
1116
1116
  * * SQL Data Type: nvarchar(MAX)
1117
- * * Description: JSON array of paths that specify what parts of the payload the agent's own prompt can write back. Controls upstream
1117
+ * * Description: JSON array of paths that specify what parts of the payload the agent's own prompt can write back. Controls upstream
1118
1118
  data flow when the agent executes its own prompt step.`),
1119
1119
  Parent: zod_1.z.string().nullable().describe(`
1120
1120
  * * Field Name: Parent
@@ -1669,6 +1669,12 @@ exports.AIPromptSchema = zod_1.z.object({
1669
1669
  * * Display Name: Top Log Probs
1670
1670
  * * SQL Data Type: int
1671
1671
  * * Description: Default number of top log probabilities to include when IncludeLogProbs is true. Can be overridden at runtime.`),
1672
+ FailoverStrategy: zod_1.z.string().describe(`
1673
+ * * Field Name: FailoverStrategy
1674
+ * * Display Name: Failover Strategy
1675
+ * * SQL Data Type: nvarchar(50)
1676
+ * * Default Value: SameModelDifferentVendor
1677
+ * * Description: Failover strategy to use when the primary model fails. Options: SameModelDifferentVendor, NextBestModel, PowerRank, None`),
1672
1678
  FailoverMaxAttempts: zod_1.z.number().nullable().describe(`
1673
1679
  * * Field Name: FailoverMaxAttempts
1674
1680
  * * Display Name: Failover Max Attempts
@@ -1681,12 +1687,6 @@ exports.AIPromptSchema = zod_1.z.object({
1681
1687
  * * SQL Data Type: int
1682
1688
  * * Default Value: 5
1683
1689
  * * Description: Initial delay in seconds between failover attempts`),
1684
- FailoverStrategy: zod_1.z.string().describe(`
1685
- * * Field Name: FailoverStrategy
1686
- * * Display Name: Failover Strategy
1687
- * * SQL Data Type: nvarchar(50)
1688
- * * Default Value: SameModelDifferentVendor
1689
- * * Description: Failover strategy to use when the primary model fails. Options: SameModelDifferentVendor, NextBestModel, PowerRank, None`),
1690
1690
  FailoverModelStrategy: zod_1.z.string().describe(`
1691
1691
  * * Field Name: FailoverModelStrategy
1692
1692
  * * Display Name: Failover Model Strategy
@@ -8163,6 +8163,12 @@ exports.AIPromptRunSchema = zod_1.z.object({
8163
8163
  * * Display Name: Failover Durations
8164
8164
  * * SQL Data Type: nvarchar(MAX)
8165
8165
  * * Description: JSON array of duration in milliseconds for each failover attempt`),
8166
+ OriginalModelID: zod_1.z.string().nullable().describe(`
8167
+ * * Field Name: OriginalModelID
8168
+ * * Display Name: Original Model ID
8169
+ * * SQL Data Type: uniqueidentifier
8170
+ * * Related Entity/Foreign Key: AI Models (vwAIModels.ID)
8171
+ * * Description: The AI Model ID that was originally attempted before any failovers`),
8166
8172
  OriginalRequestStartTime: zod_1.z.date().nullable().describe(`
8167
8173
  * * Field Name: OriginalRequestStartTime
8168
8174
  * * Display Name: Original Request Start Time
@@ -8173,12 +8179,6 @@ exports.AIPromptRunSchema = zod_1.z.object({
8173
8179
  * * Display Name: Total Failover Duration
8174
8180
  * * SQL Data Type: int
8175
8181
  * * Description: Total time spent in failover attempts in milliseconds`),
8176
- OriginalModelID: zod_1.z.string().nullable().describe(`
8177
- * * Field Name: OriginalModelID
8178
- * * Display Name: Original Model ID
8179
- * * SQL Data Type: uniqueidentifier
8180
- * * Related Entity/Foreign Key: AI Models (vwAIModels.ID)
8181
- * * Description: The AI Model ID that was originally attempted before any failovers`),
8182
8182
  Prompt: zod_1.z.string().describe(`
8183
8183
  * * Field Name: Prompt
8184
8184
  * * Display Name: Prompt
@@ -15459,11 +15459,11 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
15459
15459
  }
15460
15460
  /**
15461
15461
  * Validate() method override for AI Prompts entity. This is an auto-generated method that invokes the generated validators for this entity for the following fields:
15462
- * * CacheSimilarityThreshold: This rule ensures that if a cache similarity threshold is provided, it must be a value between 0 and 1, inclusive. If no value is provided, that's also allowed.
15463
- * * CacheTTLSeconds: This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
15464
15462
  * * FailoverStrategy: This rule ensures that the FailoverStrategy field, if specified, must be either 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank (unset).
15465
15463
  * * FailoverModelStrategy: This rule ensures that the value for FailoverModelStrategy is either 'RequireSameModel', 'PreferDifferentModel', 'PreferSameModel', or left blank (not set). Any other value is not allowed.
15466
15464
  * * FailoverErrorScope: This rule ensures that the FailoverErrorScope field can only be set to 'ServiceErrorOnly', 'RateLimitOnly', 'NetworkOnly', 'All', or left empty.
15465
+ * * CacheSimilarityThreshold: This rule ensures that if a cache similarity threshold is provided, it must be a value between 0 and 1, inclusive. If no value is provided, that's also allowed.
15466
+ * * CacheTTLSeconds: This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
15467
15467
  * * Table-Level: This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
15468
15468
  * * Table-Level: This rule ensures that if the cache match type is set to 'Vector', the cache similarity threshold must be specified. If the match type is anything other than 'Vector', the similarity threshold can be left empty.
15469
15469
  * * Table-Level: This rule ensures that if the parallelization mode is set to 'StaticCount', then the number of parallel tasks (ParallelCount) must be provided.
@@ -15475,11 +15475,11 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
15475
15475
  */
15476
15476
  Validate() {
15477
15477
  const result = super.Validate();
15478
- this.ValidateCacheSimilarityThresholdIsBetweenZeroAndOne(result);
15479
- this.ValidateCacheTTLSecondsGreaterThanZero(result);
15480
15478
  this.ValidateFailoverStrategyAllowedValues(result);
15481
15479
  this.ValidateFailoverModelStrategyAgainstAllowedValues(result);
15482
15480
  this.ValidateFailoverErrorScopeAgainstAllowedValues(result);
15481
+ this.ValidateCacheSimilarityThresholdIsBetweenZeroAndOne(result);
15482
+ this.ValidateCacheTTLSecondsGreaterThanZero(result);
15483
15483
  this.ValidateResultSelectorPromptIDNotEqualID(result);
15484
15484
  this.ValidateCacheSimilarityThresholdRequiredForVectorCache(result);
15485
15485
  this.ValidateParallelCountWhenParallelizationModeIsStaticCount(result);
@@ -15488,28 +15488,6 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
15488
15488
  return result;
15489
15489
  }
15490
15490
  /**
15491
- * This rule ensures that if a cache similarity threshold is provided, it must be a value between 0 and 1, inclusive. If no value is provided, that's also allowed.
15492
- * @param result - the ValidationResult object to add any errors or warnings to
15493
- * @public
15494
- * @method
15495
- */
15496
- ValidateCacheSimilarityThresholdIsBetweenZeroAndOne(result) {
15497
- if (this.CacheSimilarityThreshold !== null && (this.CacheSimilarityThreshold < 0 || this.CacheSimilarityThreshold > 1)) {
15498
- result.Errors.push(new core_1.ValidationErrorInfo("CacheSimilarityThreshold", "Cache similarity threshold must be between 0 and 1.", this.CacheSimilarityThreshold, core_1.ValidationErrorType.Failure));
15499
- }
15500
- }
15501
- /**
15502
- * This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
15503
- * @param result - the ValidationResult object to add any errors or warnings to
15504
- * @public
15505
- * @method
15506
- */
15507
- ValidateCacheTTLSecondsGreaterThanZero(result) {
15508
- if (this.CacheTTLSeconds !== null && this.CacheTTLSeconds <= 0) {
15509
- result.Errors.push(new core_1.ValidationErrorInfo("CacheTTLSeconds", "If cache expiration time (CacheTTLSeconds) is specified, it must be greater than zero.", this.CacheTTLSeconds, core_1.ValidationErrorType.Failure));
15510
- }
15511
- }
15512
- /**
15513
15491
  * This rule ensures that the FailoverStrategy field, if specified, must be either 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank (unset).
15514
15492
  * @param result - the ValidationResult object to add any errors or warnings to
15515
15493
  * @public
@@ -15554,6 +15532,28 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
15554
15532
  }
15555
15533
  }
15556
15534
  /**
15535
+ * This rule ensures that if a cache similarity threshold is provided, it must be a value between 0 and 1, inclusive. If no value is provided, that's also allowed.
15536
+ * @param result - the ValidationResult object to add any errors or warnings to
15537
+ * @public
15538
+ * @method
15539
+ */
15540
+ ValidateCacheSimilarityThresholdIsBetweenZeroAndOne(result) {
15541
+ if (this.CacheSimilarityThreshold !== null && (this.CacheSimilarityThreshold < 0 || this.CacheSimilarityThreshold > 1)) {
15542
+ result.Errors.push(new core_1.ValidationErrorInfo("CacheSimilarityThreshold", "Cache similarity threshold must be between 0 and 1.", this.CacheSimilarityThreshold, core_1.ValidationErrorType.Failure));
15543
+ }
15544
+ }
15545
+ /**
15546
+ * This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
15547
+ * @param result - the ValidationResult object to add any errors or warnings to
15548
+ * @public
15549
+ * @method
15550
+ */
15551
+ ValidateCacheTTLSecondsGreaterThanZero(result) {
15552
+ if (this.CacheTTLSeconds !== null && this.CacheTTLSeconds <= 0) {
15553
+ result.Errors.push(new core_1.ValidationErrorInfo("CacheTTLSeconds", "If cache expiration time (CacheTTLSeconds) is specified, it must be greater than zero.", this.CacheTTLSeconds, core_1.ValidationErrorType.Failure));
15554
+ }
15555
+ }
15556
+ /**
15557
15557
  * This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
15558
15558
  * @param result - the ValidationResult object to add any errors or warnings to
15559
15559
  * @public
@@ -16224,6 +16224,19 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
16224
16224
  this.Set('TopLogProbs', value);
16225
16225
  }
16226
16226
  /**
16227
+ * * Field Name: FailoverStrategy
16228
+ * * Display Name: Failover Strategy
16229
+ * * SQL Data Type: nvarchar(50)
16230
+ * * Default Value: SameModelDifferentVendor
16231
+ * * Description: Failover strategy to use when the primary model fails. Options: SameModelDifferentVendor, NextBestModel, PowerRank, None
16232
+ */
16233
+ get FailoverStrategy() {
16234
+ return this.Get('FailoverStrategy');
16235
+ }
16236
+ set FailoverStrategy(value) {
16237
+ this.Set('FailoverStrategy', value);
16238
+ }
16239
+ /**
16227
16240
  * * Field Name: FailoverMaxAttempts
16228
16241
  * * Display Name: Failover Max Attempts
16229
16242
  * * SQL Data Type: int
@@ -16250,19 +16263,6 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
16250
16263
  this.Set('FailoverDelaySeconds', value);
16251
16264
  }
16252
16265
  /**
16253
- * * Field Name: FailoverStrategy
16254
- * * Display Name: Failover Strategy
16255
- * * SQL Data Type: nvarchar(50)
16256
- * * Default Value: SameModelDifferentVendor
16257
- * * Description: Failover strategy to use when the primary model fails. Options: SameModelDifferentVendor, NextBestModel, PowerRank, None
16258
- */
16259
- get FailoverStrategy() {
16260
- return this.Get('FailoverStrategy');
16261
- }
16262
- set FailoverStrategy(value) {
16263
- this.Set('FailoverStrategy', value);
16264
- }
16265
- /**
16266
16266
  * * Field Name: FailoverModelStrategy
16267
16267
  * * Display Name: Failover Model Strategy
16268
16268
  * * SQL Data Type: nvarchar(50)
@@ -32864,6 +32864,19 @@ let AIPromptRunEntity = class AIPromptRunEntity extends core_1.BaseEntity {
32864
32864
  this.Set('FailoverDurations', value);
32865
32865
  }
32866
32866
  /**
32867
+ * * Field Name: OriginalModelID
32868
+ * * Display Name: Original Model ID
32869
+ * * SQL Data Type: uniqueidentifier
32870
+ * * Related Entity/Foreign Key: AI Models (vwAIModels.ID)
32871
+ * * Description: The AI Model ID that was originally attempted before any failovers
32872
+ */
32873
+ get OriginalModelID() {
32874
+ return this.Get('OriginalModelID');
32875
+ }
32876
+ set OriginalModelID(value) {
32877
+ this.Set('OriginalModelID', value);
32878
+ }
32879
+ /**
32867
32880
  * * Field Name: OriginalRequestStartTime
32868
32881
  * * Display Name: Original Request Start Time
32869
32882
  * * SQL Data Type: datetime
@@ -32888,19 +32901,6 @@ let AIPromptRunEntity = class AIPromptRunEntity extends core_1.BaseEntity {
32888
32901
  this.Set('TotalFailoverDuration', value);
32889
32902
  }
32890
32903
  /**
32891
- * * Field Name: OriginalModelID
32892
- * * Display Name: Original Model ID
32893
- * * SQL Data Type: uniqueidentifier
32894
- * * Related Entity/Foreign Key: AI Models (vwAIModels.ID)
32895
- * * Description: The AI Model ID that was originally attempted before any failovers
32896
- */
32897
- get OriginalModelID() {
32898
- return this.Get('OriginalModelID');
32899
- }
32900
- set OriginalModelID(value) {
32901
- this.Set('OriginalModelID', value);
32902
- }
32903
- /**
32904
32904
  * * Field Name: Prompt
32905
32905
  * * Display Name: Prompt
32906
32906
  * * SQL Data Type: nvarchar(255)