@memberjunction/core-entities 2.61.0 → 2.62.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.
|
@@ -1655,6 +1655,36 @@ exports.AIPromptSchema = zod_1.z.object({
|
|
|
1655
1655
|
* * Display Name: Top Log Probs
|
|
1656
1656
|
* * SQL Data Type: int
|
|
1657
1657
|
* * Description: Default number of top log probabilities to include when IncludeLogProbs is true. Can be overridden at runtime.`),
|
|
1658
|
+
FailoverMaxAttempts: zod_1.z.number().nullable().describe(`
|
|
1659
|
+
* * Field Name: FailoverMaxAttempts
|
|
1660
|
+
* * Display Name: Failover Max Attempts
|
|
1661
|
+
* * SQL Data Type: int
|
|
1662
|
+
* * Default Value: 3
|
|
1663
|
+
* * Description: Maximum number of failover attempts before giving up`),
|
|
1664
|
+
FailoverDelaySeconds: zod_1.z.number().nullable().describe(`
|
|
1665
|
+
* * Field Name: FailoverDelaySeconds
|
|
1666
|
+
* * Display Name: Failover Delay Seconds
|
|
1667
|
+
* * SQL Data Type: int
|
|
1668
|
+
* * Default Value: 5
|
|
1669
|
+
* * Description: Initial delay in seconds between failover attempts`),
|
|
1670
|
+
FailoverStrategy: zod_1.z.string().describe(`
|
|
1671
|
+
* * Field Name: FailoverStrategy
|
|
1672
|
+
* * Display Name: Failover Strategy
|
|
1673
|
+
* * SQL Data Type: nvarchar(50)
|
|
1674
|
+
* * Default Value: SameModelDifferentVendor
|
|
1675
|
+
* * Description: Failover strategy to use when the primary model fails. Options: SameModelDifferentVendor, NextBestModel, PowerRank, None`),
|
|
1676
|
+
FailoverModelStrategy: zod_1.z.string().describe(`
|
|
1677
|
+
* * Field Name: FailoverModelStrategy
|
|
1678
|
+
* * Display Name: Failover Model Strategy
|
|
1679
|
+
* * SQL Data Type: nvarchar(50)
|
|
1680
|
+
* * Default Value: PreferSameModel
|
|
1681
|
+
* * Description: Strategy for selecting failover models. Options: PreferSameModel, PreferDifferentModel, RequireSameModel`),
|
|
1682
|
+
FailoverErrorScope: zod_1.z.string().describe(`
|
|
1683
|
+
* * Field Name: FailoverErrorScope
|
|
1684
|
+
* * Display Name: Failover Error Scope
|
|
1685
|
+
* * SQL Data Type: nvarchar(50)
|
|
1686
|
+
* * Default Value: All
|
|
1687
|
+
* * Description: Types of errors that should trigger failover. Options: All, NetworkOnly, RateLimitOnly, ServiceErrorOnly`),
|
|
1658
1688
|
Template: zod_1.z.string().describe(`
|
|
1659
1689
|
* * Field Name: Template
|
|
1660
1690
|
* * Display Name: Template
|
|
@@ -8092,6 +8122,38 @@ exports.AIPromptRunSchema = zod_1.z.object({
|
|
|
8092
8122
|
* * Display Name: Validation Summary
|
|
8093
8123
|
* * SQL Data Type: nvarchar(MAX)
|
|
8094
8124
|
* * Description: JSON object containing summary information about the validation process`),
|
|
8125
|
+
FailoverAttempts: zod_1.z.number().nullable().describe(`
|
|
8126
|
+
* * Field Name: FailoverAttempts
|
|
8127
|
+
* * Display Name: Failover Attempts
|
|
8128
|
+
* * SQL Data Type: int
|
|
8129
|
+
* * Default Value: 0
|
|
8130
|
+
* * Description: Number of failover attempts made during this prompt run`),
|
|
8131
|
+
FailoverErrors: zod_1.z.string().nullable().describe(`
|
|
8132
|
+
* * Field Name: FailoverErrors
|
|
8133
|
+
* * Display Name: Failover Errors
|
|
8134
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
8135
|
+
* * Description: JSON array of error details from each failover attempt`),
|
|
8136
|
+
FailoverDurations: zod_1.z.string().nullable().describe(`
|
|
8137
|
+
* * Field Name: FailoverDurations
|
|
8138
|
+
* * Display Name: Failover Durations
|
|
8139
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
8140
|
+
* * Description: JSON array of duration in milliseconds for each failover attempt`),
|
|
8141
|
+
OriginalRequestStartTime: zod_1.z.date().nullable().describe(`
|
|
8142
|
+
* * Field Name: OriginalRequestStartTime
|
|
8143
|
+
* * Display Name: Original Request Start Time
|
|
8144
|
+
* * SQL Data Type: datetime
|
|
8145
|
+
* * Description: Timestamp when the original request started, before any failovers`),
|
|
8146
|
+
TotalFailoverDuration: zod_1.z.number().nullable().describe(`
|
|
8147
|
+
* * Field Name: TotalFailoverDuration
|
|
8148
|
+
* * Display Name: Total Failover Duration
|
|
8149
|
+
* * SQL Data Type: int
|
|
8150
|
+
* * Description: Total time spent in failover attempts in milliseconds`),
|
|
8151
|
+
OriginalModelID: zod_1.z.string().nullable().describe(`
|
|
8152
|
+
* * Field Name: OriginalModelID
|
|
8153
|
+
* * Display Name: Original Model ID
|
|
8154
|
+
* * SQL Data Type: uniqueidentifier
|
|
8155
|
+
* * Related Entity/Foreign Key: AI Models (vwAIModels.ID)
|
|
8156
|
+
* * Description: The AI Model ID that was originally attempted before any failovers`),
|
|
8095
8157
|
Prompt: zod_1.z.string().describe(`
|
|
8096
8158
|
* * Field Name: Prompt
|
|
8097
8159
|
* * Display Name: Prompt
|
|
@@ -8112,6 +8174,10 @@ exports.AIPromptRunSchema = zod_1.z.object({
|
|
|
8112
8174
|
* * Field Name: Configuration
|
|
8113
8175
|
* * Display Name: Configuration
|
|
8114
8176
|
* * SQL Data Type: nvarchar(100)`),
|
|
8177
|
+
OriginalModel: zod_1.z.string().nullable().describe(`
|
|
8178
|
+
* * Field Name: OriginalModel
|
|
8179
|
+
* * Display Name: Original Model
|
|
8180
|
+
* * SQL Data Type: nvarchar(50)`),
|
|
8115
8181
|
});
|
|
8116
8182
|
/**
|
|
8117
8183
|
* zod schema definition for the entity MJ: AI Vendor Type Definitions
|
|
@@ -15345,6 +15411,9 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
15345
15411
|
* * Table-Level: This rule ensures that if the parallelization mode is set to 'StaticCount', then the number of parallel tasks (ParallelCount) must be provided.
|
|
15346
15412
|
* * Table-Level: This rule ensures that if the Parallelization Mode is set to 'ConfigParam', then the Parallel Config Param field must be filled in. For any other mode, the Parallel Config Param can be left empty.
|
|
15347
15413
|
* * Table-Level: This rule ensures that if the OutputType is set to 'object', an OutputExample must be provided. If the OutputType is anything other than 'object', providing an OutputExample is not required.
|
|
15414
|
+
* * FailoverErrorScope: This rule ensures that the FailoverErrorScope field can only be set to 'ServiceErrorOnly', 'RateLimitOnly', 'NetworkOnly', 'All', or left empty.
|
|
15415
|
+
* * FailoverStrategy: This rule ensures that the FailoverStrategy field, if specified, must be either 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank (unset).
|
|
15416
|
+
* * 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.
|
|
15348
15417
|
* @public
|
|
15349
15418
|
* @method
|
|
15350
15419
|
* @override
|
|
@@ -15358,6 +15427,9 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
15358
15427
|
this.ValidateParallelCountWhenParallelizationModeIsStaticCount(result);
|
|
15359
15428
|
this.ValidateParallelConfigParamRequiredForConfigParamMode(result);
|
|
15360
15429
|
this.ValidateOutputExampleWhenOutputTypeObject(result);
|
|
15430
|
+
this.ValidateFailoverErrorScopeAgainstAllowedValues(result);
|
|
15431
|
+
this.ValidateFailoverStrategyAllowedValues(result);
|
|
15432
|
+
this.ValidateFailoverModelStrategyAgainstAllowedValues(result);
|
|
15361
15433
|
return result;
|
|
15362
15434
|
}
|
|
15363
15435
|
/**
|
|
@@ -15438,6 +15510,50 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
15438
15510
|
}
|
|
15439
15511
|
}
|
|
15440
15512
|
/**
|
|
15513
|
+
* This rule ensures that the FailoverErrorScope field can only be set to 'ServiceErrorOnly', 'RateLimitOnly', 'NetworkOnly', 'All', or left empty.
|
|
15514
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
15515
|
+
* @public
|
|
15516
|
+
* @method
|
|
15517
|
+
*/
|
|
15518
|
+
ValidateFailoverErrorScopeAgainstAllowedValues(result) {
|
|
15519
|
+
const allowedValues = ["ServiceErrorOnly", "RateLimitOnly", "NetworkOnly", "All", null];
|
|
15520
|
+
if (!allowedValues.includes(this.FailoverErrorScope)) {
|
|
15521
|
+
result.Errors.push(new core_1.ValidationErrorInfo("FailoverErrorScope", "The failover error scope must be one of: 'ServiceErrorOnly', 'RateLimitOnly', 'NetworkOnly', 'All', or left empty.", this.FailoverErrorScope, core_1.ValidationErrorType.Failure));
|
|
15522
|
+
}
|
|
15523
|
+
}
|
|
15524
|
+
/**
|
|
15525
|
+
* This rule ensures that the FailoverStrategy field, if specified, must be either 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank (unset).
|
|
15526
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
15527
|
+
* @public
|
|
15528
|
+
* @method
|
|
15529
|
+
*/
|
|
15530
|
+
ValidateFailoverStrategyAllowedValues(result) {
|
|
15531
|
+
const allowed = [
|
|
15532
|
+
"None",
|
|
15533
|
+
"PowerRank",
|
|
15534
|
+
"NextBestModel",
|
|
15535
|
+
"SameModelDifferentVendor",
|
|
15536
|
+
null, // Allowing null/undefined as valid per the constraint
|
|
15537
|
+
undefined
|
|
15538
|
+
];
|
|
15539
|
+
if (!allowed.includes(this.FailoverStrategy)) {
|
|
15540
|
+
result.Errors.push(new core_1.ValidationErrorInfo("FailoverStrategy", "The failover strategy must be 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank.", this.FailoverStrategy, core_1.ValidationErrorType.Failure));
|
|
15541
|
+
}
|
|
15542
|
+
}
|
|
15543
|
+
/**
|
|
15544
|
+
* This rule ensures that the value for FailoverModelStrategy is either 'RequireSameModel', 'PreferDifferentModel', 'PreferSameModel', or left blank (not set). Any other value is not allowed.
|
|
15545
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
15546
|
+
* @public
|
|
15547
|
+
* @method
|
|
15548
|
+
*/
|
|
15549
|
+
ValidateFailoverModelStrategyAgainstAllowedValues(result) {
|
|
15550
|
+
const allowedValues = ["RequireSameModel", "PreferDifferentModel", "PreferSameModel", null];
|
|
15551
|
+
if (this.FailoverModelStrategy !== null &&
|
|
15552
|
+
!allowedValues.includes(this.FailoverModelStrategy)) {
|
|
15553
|
+
result.Errors.push(new core_1.ValidationErrorInfo("FailoverModelStrategy", "FailoverModelStrategy must be null or one of: 'RequireSameModel', 'PreferDifferentModel', 'PreferSameModel'.", this.FailoverModelStrategy, core_1.ValidationErrorType.Failure));
|
|
15554
|
+
}
|
|
15555
|
+
}
|
|
15556
|
+
/**
|
|
15441
15557
|
* * Field Name: ID
|
|
15442
15558
|
* * Display Name: ID
|
|
15443
15559
|
* * SQL Data Type: uniqueidentifier
|
|
@@ -16053,6 +16169,71 @@ let AIPromptEntity = class AIPromptEntity extends core_1.BaseEntity {
|
|
|
16053
16169
|
this.Set('TopLogProbs', value);
|
|
16054
16170
|
}
|
|
16055
16171
|
/**
|
|
16172
|
+
* * Field Name: FailoverMaxAttempts
|
|
16173
|
+
* * Display Name: Failover Max Attempts
|
|
16174
|
+
* * SQL Data Type: int
|
|
16175
|
+
* * Default Value: 3
|
|
16176
|
+
* * Description: Maximum number of failover attempts before giving up
|
|
16177
|
+
*/
|
|
16178
|
+
get FailoverMaxAttempts() {
|
|
16179
|
+
return this.Get('FailoverMaxAttempts');
|
|
16180
|
+
}
|
|
16181
|
+
set FailoverMaxAttempts(value) {
|
|
16182
|
+
this.Set('FailoverMaxAttempts', value);
|
|
16183
|
+
}
|
|
16184
|
+
/**
|
|
16185
|
+
* * Field Name: FailoverDelaySeconds
|
|
16186
|
+
* * Display Name: Failover Delay Seconds
|
|
16187
|
+
* * SQL Data Type: int
|
|
16188
|
+
* * Default Value: 5
|
|
16189
|
+
* * Description: Initial delay in seconds between failover attempts
|
|
16190
|
+
*/
|
|
16191
|
+
get FailoverDelaySeconds() {
|
|
16192
|
+
return this.Get('FailoverDelaySeconds');
|
|
16193
|
+
}
|
|
16194
|
+
set FailoverDelaySeconds(value) {
|
|
16195
|
+
this.Set('FailoverDelaySeconds', value);
|
|
16196
|
+
}
|
|
16197
|
+
/**
|
|
16198
|
+
* * Field Name: FailoverStrategy
|
|
16199
|
+
* * Display Name: Failover Strategy
|
|
16200
|
+
* * SQL Data Type: nvarchar(50)
|
|
16201
|
+
* * Default Value: SameModelDifferentVendor
|
|
16202
|
+
* * Description: Failover strategy to use when the primary model fails. Options: SameModelDifferentVendor, NextBestModel, PowerRank, None
|
|
16203
|
+
*/
|
|
16204
|
+
get FailoverStrategy() {
|
|
16205
|
+
return this.Get('FailoverStrategy');
|
|
16206
|
+
}
|
|
16207
|
+
set FailoverStrategy(value) {
|
|
16208
|
+
this.Set('FailoverStrategy', value);
|
|
16209
|
+
}
|
|
16210
|
+
/**
|
|
16211
|
+
* * Field Name: FailoverModelStrategy
|
|
16212
|
+
* * Display Name: Failover Model Strategy
|
|
16213
|
+
* * SQL Data Type: nvarchar(50)
|
|
16214
|
+
* * Default Value: PreferSameModel
|
|
16215
|
+
* * Description: Strategy for selecting failover models. Options: PreferSameModel, PreferDifferentModel, RequireSameModel
|
|
16216
|
+
*/
|
|
16217
|
+
get FailoverModelStrategy() {
|
|
16218
|
+
return this.Get('FailoverModelStrategy');
|
|
16219
|
+
}
|
|
16220
|
+
set FailoverModelStrategy(value) {
|
|
16221
|
+
this.Set('FailoverModelStrategy', value);
|
|
16222
|
+
}
|
|
16223
|
+
/**
|
|
16224
|
+
* * Field Name: FailoverErrorScope
|
|
16225
|
+
* * Display Name: Failover Error Scope
|
|
16226
|
+
* * SQL Data Type: nvarchar(50)
|
|
16227
|
+
* * Default Value: All
|
|
16228
|
+
* * Description: Types of errors that should trigger failover. Options: All, NetworkOnly, RateLimitOnly, ServiceErrorOnly
|
|
16229
|
+
*/
|
|
16230
|
+
get FailoverErrorScope() {
|
|
16231
|
+
return this.Get('FailoverErrorScope');
|
|
16232
|
+
}
|
|
16233
|
+
set FailoverErrorScope(value) {
|
|
16234
|
+
this.Set('FailoverErrorScope', value);
|
|
16235
|
+
}
|
|
16236
|
+
/**
|
|
16056
16237
|
* * Field Name: Template
|
|
16057
16238
|
* * Display Name: Template
|
|
16058
16239
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -32552,6 +32733,80 @@ let AIPromptRunEntity = class AIPromptRunEntity extends core_1.BaseEntity {
|
|
|
32552
32733
|
this.Set('ValidationSummary', value);
|
|
32553
32734
|
}
|
|
32554
32735
|
/**
|
|
32736
|
+
* * Field Name: FailoverAttempts
|
|
32737
|
+
* * Display Name: Failover Attempts
|
|
32738
|
+
* * SQL Data Type: int
|
|
32739
|
+
* * Default Value: 0
|
|
32740
|
+
* * Description: Number of failover attempts made during this prompt run
|
|
32741
|
+
*/
|
|
32742
|
+
get FailoverAttempts() {
|
|
32743
|
+
return this.Get('FailoverAttempts');
|
|
32744
|
+
}
|
|
32745
|
+
set FailoverAttempts(value) {
|
|
32746
|
+
this.Set('FailoverAttempts', value);
|
|
32747
|
+
}
|
|
32748
|
+
/**
|
|
32749
|
+
* * Field Name: FailoverErrors
|
|
32750
|
+
* * Display Name: Failover Errors
|
|
32751
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
32752
|
+
* * Description: JSON array of error details from each failover attempt
|
|
32753
|
+
*/
|
|
32754
|
+
get FailoverErrors() {
|
|
32755
|
+
return this.Get('FailoverErrors');
|
|
32756
|
+
}
|
|
32757
|
+
set FailoverErrors(value) {
|
|
32758
|
+
this.Set('FailoverErrors', value);
|
|
32759
|
+
}
|
|
32760
|
+
/**
|
|
32761
|
+
* * Field Name: FailoverDurations
|
|
32762
|
+
* * Display Name: Failover Durations
|
|
32763
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
32764
|
+
* * Description: JSON array of duration in milliseconds for each failover attempt
|
|
32765
|
+
*/
|
|
32766
|
+
get FailoverDurations() {
|
|
32767
|
+
return this.Get('FailoverDurations');
|
|
32768
|
+
}
|
|
32769
|
+
set FailoverDurations(value) {
|
|
32770
|
+
this.Set('FailoverDurations', value);
|
|
32771
|
+
}
|
|
32772
|
+
/**
|
|
32773
|
+
* * Field Name: OriginalRequestStartTime
|
|
32774
|
+
* * Display Name: Original Request Start Time
|
|
32775
|
+
* * SQL Data Type: datetime
|
|
32776
|
+
* * Description: Timestamp when the original request started, before any failovers
|
|
32777
|
+
*/
|
|
32778
|
+
get OriginalRequestStartTime() {
|
|
32779
|
+
return this.Get('OriginalRequestStartTime');
|
|
32780
|
+
}
|
|
32781
|
+
set OriginalRequestStartTime(value) {
|
|
32782
|
+
this.Set('OriginalRequestStartTime', value);
|
|
32783
|
+
}
|
|
32784
|
+
/**
|
|
32785
|
+
* * Field Name: TotalFailoverDuration
|
|
32786
|
+
* * Display Name: Total Failover Duration
|
|
32787
|
+
* * SQL Data Type: int
|
|
32788
|
+
* * Description: Total time spent in failover attempts in milliseconds
|
|
32789
|
+
*/
|
|
32790
|
+
get TotalFailoverDuration() {
|
|
32791
|
+
return this.Get('TotalFailoverDuration');
|
|
32792
|
+
}
|
|
32793
|
+
set TotalFailoverDuration(value) {
|
|
32794
|
+
this.Set('TotalFailoverDuration', value);
|
|
32795
|
+
}
|
|
32796
|
+
/**
|
|
32797
|
+
* * Field Name: OriginalModelID
|
|
32798
|
+
* * Display Name: Original Model ID
|
|
32799
|
+
* * SQL Data Type: uniqueidentifier
|
|
32800
|
+
* * Related Entity/Foreign Key: AI Models (vwAIModels.ID)
|
|
32801
|
+
* * Description: The AI Model ID that was originally attempted before any failovers
|
|
32802
|
+
*/
|
|
32803
|
+
get OriginalModelID() {
|
|
32804
|
+
return this.Get('OriginalModelID');
|
|
32805
|
+
}
|
|
32806
|
+
set OriginalModelID(value) {
|
|
32807
|
+
this.Set('OriginalModelID', value);
|
|
32808
|
+
}
|
|
32809
|
+
/**
|
|
32555
32810
|
* * Field Name: Prompt
|
|
32556
32811
|
* * Display Name: Prompt
|
|
32557
32812
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -32591,6 +32846,14 @@ let AIPromptRunEntity = class AIPromptRunEntity extends core_1.BaseEntity {
|
|
|
32591
32846
|
get Configuration() {
|
|
32592
32847
|
return this.Get('Configuration');
|
|
32593
32848
|
}
|
|
32849
|
+
/**
|
|
32850
|
+
* * Field Name: OriginalModel
|
|
32851
|
+
* * Display Name: Original Model
|
|
32852
|
+
* * SQL Data Type: nvarchar(50)
|
|
32853
|
+
*/
|
|
32854
|
+
get OriginalModel() {
|
|
32855
|
+
return this.Get('OriginalModel');
|
|
32856
|
+
}
|
|
32594
32857
|
};
|
|
32595
32858
|
exports.AIPromptRunEntity = AIPromptRunEntity;
|
|
32596
32859
|
exports.AIPromptRunEntity = AIPromptRunEntity = __decorate([
|