@memberjunction/core-entities 2.61.0 → 2.63.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.
|
@@ -942,6 +942,11 @@ export declare const AIPromptSchema: z.ZodObject<{
|
|
|
942
942
|
StopSequences: z.ZodNullable<z.ZodString>;
|
|
943
943
|
IncludeLogProbs: z.ZodNullable<z.ZodBoolean>;
|
|
944
944
|
TopLogProbs: z.ZodNullable<z.ZodNumber>;
|
|
945
|
+
FailoverMaxAttempts: z.ZodNullable<z.ZodNumber>;
|
|
946
|
+
FailoverDelaySeconds: z.ZodNullable<z.ZodNumber>;
|
|
947
|
+
FailoverStrategy: z.ZodString;
|
|
948
|
+
FailoverModelStrategy: z.ZodString;
|
|
949
|
+
FailoverErrorScope: z.ZodString;
|
|
945
950
|
Template: z.ZodString;
|
|
946
951
|
Category: z.ZodNullable<z.ZodString>;
|
|
947
952
|
Type: z.ZodString;
|
|
@@ -996,6 +1001,11 @@ export declare const AIPromptSchema: z.ZodObject<{
|
|
|
996
1001
|
StopSequences?: string;
|
|
997
1002
|
IncludeLogProbs?: boolean;
|
|
998
1003
|
TopLogProbs?: number;
|
|
1004
|
+
FailoverMaxAttempts?: number;
|
|
1005
|
+
FailoverDelaySeconds?: number;
|
|
1006
|
+
FailoverStrategy?: string;
|
|
1007
|
+
FailoverModelStrategy?: string;
|
|
1008
|
+
FailoverErrorScope?: string;
|
|
999
1009
|
Template?: string;
|
|
1000
1010
|
ResultSelectorPrompt?: string;
|
|
1001
1011
|
}, {
|
|
@@ -1047,6 +1057,11 @@ export declare const AIPromptSchema: z.ZodObject<{
|
|
|
1047
1057
|
StopSequences?: string;
|
|
1048
1058
|
IncludeLogProbs?: boolean;
|
|
1049
1059
|
TopLogProbs?: number;
|
|
1060
|
+
FailoverMaxAttempts?: number;
|
|
1061
|
+
FailoverDelaySeconds?: number;
|
|
1062
|
+
FailoverStrategy?: string;
|
|
1063
|
+
FailoverModelStrategy?: string;
|
|
1064
|
+
FailoverErrorScope?: string;
|
|
1050
1065
|
Template?: string;
|
|
1051
1066
|
ResultSelectorPrompt?: string;
|
|
1052
1067
|
}>;
|
|
@@ -4718,6 +4733,8 @@ export declare const AIAgentRunSchema: z.ZodObject<{
|
|
|
4718
4733
|
FinalStep: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"Success">, z.ZodLiteral<"Failed">, z.ZodLiteral<"Retry">, z.ZodLiteral<"Sub-Agent">, z.ZodLiteral<"Actions">, z.ZodLiteral<"Chat">]>>;
|
|
4719
4734
|
FinalPayload: z.ZodNullable<z.ZodString>;
|
|
4720
4735
|
Message: z.ZodNullable<z.ZodString>;
|
|
4736
|
+
LastRunID: z.ZodNullable<z.ZodString>;
|
|
4737
|
+
StartingPayload: z.ZodNullable<z.ZodString>;
|
|
4721
4738
|
Agent: z.ZodNullable<z.ZodString>;
|
|
4722
4739
|
Conversation: z.ZodNullable<z.ZodString>;
|
|
4723
4740
|
User: z.ZodNullable<z.ZodString>;
|
|
@@ -4734,6 +4751,7 @@ export declare const AIAgentRunSchema: z.ZodObject<{
|
|
|
4734
4751
|
Agent?: string;
|
|
4735
4752
|
Success?: boolean;
|
|
4736
4753
|
ErrorMessage?: string;
|
|
4754
|
+
LastRunID?: string;
|
|
4737
4755
|
ConversationID?: string;
|
|
4738
4756
|
Conversation?: string;
|
|
4739
4757
|
CompletedAt?: Date;
|
|
@@ -4753,6 +4771,7 @@ export declare const AIAgentRunSchema: z.ZodObject<{
|
|
|
4753
4771
|
CancellationReason?: "System" | "User Request" | "Timeout";
|
|
4754
4772
|
FinalStep?: "Failed" | "Success" | "Actions" | "Sub-Agent" | "Chat" | "Retry";
|
|
4755
4773
|
FinalPayload?: string;
|
|
4774
|
+
StartingPayload?: string;
|
|
4756
4775
|
}, {
|
|
4757
4776
|
ID?: string;
|
|
4758
4777
|
__mj_CreatedAt?: Date;
|
|
@@ -4766,6 +4785,7 @@ export declare const AIAgentRunSchema: z.ZodObject<{
|
|
|
4766
4785
|
Agent?: string;
|
|
4767
4786
|
Success?: boolean;
|
|
4768
4787
|
ErrorMessage?: string;
|
|
4788
|
+
LastRunID?: string;
|
|
4769
4789
|
ConversationID?: string;
|
|
4770
4790
|
Conversation?: string;
|
|
4771
4791
|
CompletedAt?: Date;
|
|
@@ -4785,6 +4805,7 @@ export declare const AIAgentRunSchema: z.ZodObject<{
|
|
|
4785
4805
|
CancellationReason?: "System" | "User Request" | "Timeout";
|
|
4786
4806
|
FinalStep?: "Failed" | "Success" | "Actions" | "Sub-Agent" | "Chat" | "Retry";
|
|
4787
4807
|
FinalPayload?: string;
|
|
4808
|
+
StartingPayload?: string;
|
|
4788
4809
|
}>;
|
|
4789
4810
|
export type AIAgentRunEntityType = z.infer<typeof AIAgentRunSchema>;
|
|
4790
4811
|
/**
|
|
@@ -5200,11 +5221,18 @@ export declare const AIPromptRunSchema: z.ZodObject<{
|
|
|
5200
5221
|
TotalRetryDurationMS: z.ZodNullable<z.ZodNumber>;
|
|
5201
5222
|
ValidationAttempts: z.ZodNullable<z.ZodString>;
|
|
5202
5223
|
ValidationSummary: z.ZodNullable<z.ZodString>;
|
|
5224
|
+
FailoverAttempts: z.ZodNullable<z.ZodNumber>;
|
|
5225
|
+
FailoverErrors: z.ZodNullable<z.ZodString>;
|
|
5226
|
+
FailoverDurations: z.ZodNullable<z.ZodString>;
|
|
5227
|
+
OriginalRequestStartTime: z.ZodNullable<z.ZodDate>;
|
|
5228
|
+
TotalFailoverDuration: z.ZodNullable<z.ZodNumber>;
|
|
5229
|
+
OriginalModelID: z.ZodNullable<z.ZodString>;
|
|
5203
5230
|
Prompt: z.ZodString;
|
|
5204
5231
|
Model: z.ZodString;
|
|
5205
5232
|
Vendor: z.ZodString;
|
|
5206
5233
|
Agent: z.ZodNullable<z.ZodString>;
|
|
5207
5234
|
Configuration: z.ZodNullable<z.ZodString>;
|
|
5235
|
+
OriginalModel: z.ZodNullable<z.ZodString>;
|
|
5208
5236
|
}, "strip", z.ZodTypeAny, {
|
|
5209
5237
|
ID?: string;
|
|
5210
5238
|
__mj_CreatedAt?: Date;
|
|
@@ -5265,6 +5293,13 @@ export declare const AIPromptRunSchema: z.ZodObject<{
|
|
|
5265
5293
|
TotalRetryDurationMS?: number;
|
|
5266
5294
|
ValidationAttempts?: string;
|
|
5267
5295
|
ValidationSummary?: string;
|
|
5296
|
+
FailoverAttempts?: number;
|
|
5297
|
+
FailoverErrors?: string;
|
|
5298
|
+
FailoverDurations?: string;
|
|
5299
|
+
OriginalRequestStartTime?: Date;
|
|
5300
|
+
TotalFailoverDuration?: number;
|
|
5301
|
+
OriginalModelID?: string;
|
|
5302
|
+
OriginalModel?: string;
|
|
5268
5303
|
}, {
|
|
5269
5304
|
ID?: string;
|
|
5270
5305
|
__mj_CreatedAt?: Date;
|
|
@@ -5325,6 +5360,13 @@ export declare const AIPromptRunSchema: z.ZodObject<{
|
|
|
5325
5360
|
TotalRetryDurationMS?: number;
|
|
5326
5361
|
ValidationAttempts?: string;
|
|
5327
5362
|
ValidationSummary?: string;
|
|
5363
|
+
FailoverAttempts?: number;
|
|
5364
|
+
FailoverErrors?: string;
|
|
5365
|
+
FailoverDurations?: string;
|
|
5366
|
+
OriginalRequestStartTime?: Date;
|
|
5367
|
+
TotalFailoverDuration?: number;
|
|
5368
|
+
OriginalModelID?: string;
|
|
5369
|
+
OriginalModel?: string;
|
|
5328
5370
|
}>;
|
|
5329
5371
|
export type AIPromptRunEntityType = z.infer<typeof AIPromptRunSchema>;
|
|
5330
5372
|
/**
|
|
@@ -10462,6 +10504,9 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
|
|
|
10462
10504
|
* 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:
|
|
10463
10505
|
* * 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.
|
|
10464
10506
|
* * CacheTTLSeconds: This rule ensures that if the cache expiration time in seconds is provided, it must be greater than zero.
|
|
10507
|
+
* * FailoverStrategy: This rule ensures that the FailoverStrategy field, if specified, must be either 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank (unset).
|
|
10508
|
+
* * 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.
|
|
10509
|
+
* * FailoverErrorScope: This rule ensures that the FailoverErrorScope field can only be set to 'ServiceErrorOnly', 'RateLimitOnly', 'NetworkOnly', 'All', or left empty.
|
|
10465
10510
|
* * 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.
|
|
10466
10511
|
* * 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.
|
|
10467
10512
|
* * Table-Level: This rule ensures that if the parallelization mode is set to 'StaticCount', then the number of parallel tasks (ParallelCount) must be provided.
|
|
@@ -10487,6 +10532,27 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
|
|
|
10487
10532
|
*/
|
|
10488
10533
|
ValidateCacheTTLSecondsGreaterThanZero(result: ValidationResult): void;
|
|
10489
10534
|
/**
|
|
10535
|
+
* This rule ensures that the FailoverStrategy field, if specified, must be either 'None', 'PowerRank', 'NextBestModel', 'SameModelDifferentVendor', or left blank (unset).
|
|
10536
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
10537
|
+
* @public
|
|
10538
|
+
* @method
|
|
10539
|
+
*/
|
|
10540
|
+
ValidateFailoverStrategyAllowedValues(result: ValidationResult): void;
|
|
10541
|
+
/**
|
|
10542
|
+
* This rule ensures that the value for FailoverModelStrategy is either 'RequireSameModel', 'PreferDifferentModel', 'PreferSameModel', or left blank (not set). Any other value is not allowed.
|
|
10543
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
10544
|
+
* @public
|
|
10545
|
+
* @method
|
|
10546
|
+
*/
|
|
10547
|
+
ValidateFailoverModelStrategyAgainstAllowedValues(result: ValidationResult): void;
|
|
10548
|
+
/**
|
|
10549
|
+
* This rule ensures that the FailoverErrorScope field can only be set to 'ServiceErrorOnly', 'RateLimitOnly', 'NetworkOnly', 'All', or left empty.
|
|
10550
|
+
* @param result - the ValidationResult object to add any errors or warnings to
|
|
10551
|
+
* @public
|
|
10552
|
+
* @method
|
|
10553
|
+
*/
|
|
10554
|
+
ValidateFailoverErrorScopeAgainstAllowedValues(result: ValidationResult): void;
|
|
10555
|
+
/**
|
|
10490
10556
|
* This rule ensures that the ResultSelectorPromptID field must be different from the ID field. In other words, a result selector prompt cannot reference itself.
|
|
10491
10557
|
* @param result - the ValidationResult object to add any errors or warnings to
|
|
10492
10558
|
* @public
|
|
@@ -10961,6 +11027,51 @@ export declare class AIPromptEntity extends BaseEntity<AIPromptEntityType> {
|
|
|
10961
11027
|
get TopLogProbs(): number | null;
|
|
10962
11028
|
set TopLogProbs(value: number | null);
|
|
10963
11029
|
/**
|
|
11030
|
+
* * Field Name: FailoverMaxAttempts
|
|
11031
|
+
* * Display Name: Failover Max Attempts
|
|
11032
|
+
* * SQL Data Type: int
|
|
11033
|
+
* * Default Value: 3
|
|
11034
|
+
* * Description: Maximum number of failover attempts before giving up
|
|
11035
|
+
*/
|
|
11036
|
+
get FailoverMaxAttempts(): number | null;
|
|
11037
|
+
set FailoverMaxAttempts(value: number | null);
|
|
11038
|
+
/**
|
|
11039
|
+
* * Field Name: FailoverDelaySeconds
|
|
11040
|
+
* * Display Name: Failover Delay Seconds
|
|
11041
|
+
* * SQL Data Type: int
|
|
11042
|
+
* * Default Value: 5
|
|
11043
|
+
* * Description: Initial delay in seconds between failover attempts
|
|
11044
|
+
*/
|
|
11045
|
+
get FailoverDelaySeconds(): number | null;
|
|
11046
|
+
set FailoverDelaySeconds(value: number | null);
|
|
11047
|
+
/**
|
|
11048
|
+
* * Field Name: FailoverStrategy
|
|
11049
|
+
* * Display Name: Failover Strategy
|
|
11050
|
+
* * SQL Data Type: nvarchar(50)
|
|
11051
|
+
* * Default Value: SameModelDifferentVendor
|
|
11052
|
+
* * Description: Failover strategy to use when the primary model fails. Options: SameModelDifferentVendor, NextBestModel, PowerRank, None
|
|
11053
|
+
*/
|
|
11054
|
+
get FailoverStrategy(): string;
|
|
11055
|
+
set FailoverStrategy(value: string);
|
|
11056
|
+
/**
|
|
11057
|
+
* * Field Name: FailoverModelStrategy
|
|
11058
|
+
* * Display Name: Failover Model Strategy
|
|
11059
|
+
* * SQL Data Type: nvarchar(50)
|
|
11060
|
+
* * Default Value: PreferSameModel
|
|
11061
|
+
* * Description: Strategy for selecting failover models. Options: PreferSameModel, PreferDifferentModel, RequireSameModel
|
|
11062
|
+
*/
|
|
11063
|
+
get FailoverModelStrategy(): string;
|
|
11064
|
+
set FailoverModelStrategy(value: string);
|
|
11065
|
+
/**
|
|
11066
|
+
* * Field Name: FailoverErrorScope
|
|
11067
|
+
* * Display Name: Failover Error Scope
|
|
11068
|
+
* * SQL Data Type: nvarchar(50)
|
|
11069
|
+
* * Default Value: All
|
|
11070
|
+
* * Description: Types of errors that should trigger failover. Options: All, NetworkOnly, RateLimitOnly, ServiceErrorOnly
|
|
11071
|
+
*/
|
|
11072
|
+
get FailoverErrorScope(): string;
|
|
11073
|
+
set FailoverErrorScope(value: string);
|
|
11074
|
+
/**
|
|
10964
11075
|
* * Field Name: Template
|
|
10965
11076
|
* * Display Name: Template
|
|
10966
11077
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -20967,6 +21078,23 @@ export declare class AIAgentRunEntity extends BaseEntity<AIAgentRunEntityType> {
|
|
|
20967
21078
|
get Message(): string | null;
|
|
20968
21079
|
set Message(value: string | null);
|
|
20969
21080
|
/**
|
|
21081
|
+
* * Field Name: LastRunID
|
|
21082
|
+
* * Display Name: Last Run ID
|
|
21083
|
+
* * SQL Data Type: uniqueidentifier
|
|
21084
|
+
* * Related Entity/Foreign Key: MJ: AI Agent Runs (vwAIAgentRuns.ID)
|
|
21085
|
+
* * Description: Links to the previous run in a chain. Different from ParentRunID which is for sub-agent hierarchy.
|
|
21086
|
+
*/
|
|
21087
|
+
get LastRunID(): string | null;
|
|
21088
|
+
set LastRunID(value: string | null);
|
|
21089
|
+
/**
|
|
21090
|
+
* * Field Name: StartingPayload
|
|
21091
|
+
* * Display Name: Starting Payload
|
|
21092
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
21093
|
+
* * Description: The initial payload provided at the start of this run. Can be populated from the FinalPayload of the LastRun.
|
|
21094
|
+
*/
|
|
21095
|
+
get StartingPayload(): string | null;
|
|
21096
|
+
set StartingPayload(value: string | null);
|
|
21097
|
+
/**
|
|
20970
21098
|
* * Field Name: Agent
|
|
20971
21099
|
* * Display Name: Agent
|
|
20972
21100
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -22611,6 +22739,56 @@ export declare class AIPromptRunEntity extends BaseEntity<AIPromptRunEntityType>
|
|
|
22611
22739
|
get ValidationSummary(): string | null;
|
|
22612
22740
|
set ValidationSummary(value: string | null);
|
|
22613
22741
|
/**
|
|
22742
|
+
* * Field Name: FailoverAttempts
|
|
22743
|
+
* * Display Name: Failover Attempts
|
|
22744
|
+
* * SQL Data Type: int
|
|
22745
|
+
* * Default Value: 0
|
|
22746
|
+
* * Description: Number of failover attempts made during this prompt run
|
|
22747
|
+
*/
|
|
22748
|
+
get FailoverAttempts(): number | null;
|
|
22749
|
+
set FailoverAttempts(value: number | null);
|
|
22750
|
+
/**
|
|
22751
|
+
* * Field Name: FailoverErrors
|
|
22752
|
+
* * Display Name: Failover Errors
|
|
22753
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
22754
|
+
* * Description: JSON array of error details from each failover attempt
|
|
22755
|
+
*/
|
|
22756
|
+
get FailoverErrors(): string | null;
|
|
22757
|
+
set FailoverErrors(value: string | null);
|
|
22758
|
+
/**
|
|
22759
|
+
* * Field Name: FailoverDurations
|
|
22760
|
+
* * Display Name: Failover Durations
|
|
22761
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
22762
|
+
* * Description: JSON array of duration in milliseconds for each failover attempt
|
|
22763
|
+
*/
|
|
22764
|
+
get FailoverDurations(): string | null;
|
|
22765
|
+
set FailoverDurations(value: string | null);
|
|
22766
|
+
/**
|
|
22767
|
+
* * Field Name: OriginalRequestStartTime
|
|
22768
|
+
* * Display Name: Original Request Start Time
|
|
22769
|
+
* * SQL Data Type: datetime
|
|
22770
|
+
* * Description: Timestamp when the original request started, before any failovers
|
|
22771
|
+
*/
|
|
22772
|
+
get OriginalRequestStartTime(): Date | null;
|
|
22773
|
+
set OriginalRequestStartTime(value: Date | null);
|
|
22774
|
+
/**
|
|
22775
|
+
* * Field Name: TotalFailoverDuration
|
|
22776
|
+
* * Display Name: Total Failover Duration
|
|
22777
|
+
* * SQL Data Type: int
|
|
22778
|
+
* * Description: Total time spent in failover attempts in milliseconds
|
|
22779
|
+
*/
|
|
22780
|
+
get TotalFailoverDuration(): number | null;
|
|
22781
|
+
set TotalFailoverDuration(value: number | null);
|
|
22782
|
+
/**
|
|
22783
|
+
* * Field Name: OriginalModelID
|
|
22784
|
+
* * Display Name: Original Model ID
|
|
22785
|
+
* * SQL Data Type: uniqueidentifier
|
|
22786
|
+
* * Related Entity/Foreign Key: AI Models (vwAIModels.ID)
|
|
22787
|
+
* * Description: The AI Model ID that was originally attempted before any failovers
|
|
22788
|
+
*/
|
|
22789
|
+
get OriginalModelID(): string | null;
|
|
22790
|
+
set OriginalModelID(value: string | null);
|
|
22791
|
+
/**
|
|
22614
22792
|
* * Field Name: Prompt
|
|
22615
22793
|
* * Display Name: Prompt
|
|
22616
22794
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -22640,6 +22818,12 @@ export declare class AIPromptRunEntity extends BaseEntity<AIPromptRunEntityType>
|
|
|
22640
22818
|
* * SQL Data Type: nvarchar(100)
|
|
22641
22819
|
*/
|
|
22642
22820
|
get Configuration(): string | null;
|
|
22821
|
+
/**
|
|
22822
|
+
* * Field Name: OriginalModel
|
|
22823
|
+
* * Display Name: Original Model
|
|
22824
|
+
* * SQL Data Type: nvarchar(50)
|
|
22825
|
+
*/
|
|
22826
|
+
get OriginalModel(): string | null;
|
|
22643
22827
|
}
|
|
22644
22828
|
/**
|
|
22645
22829
|
* MJ: AI Vendor Type Definitions - strongly typed entity sub-class
|