@memberjunction/core-entities 2.77.0 → 2.78.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.
|
@@ -5418,17 +5418,33 @@ export declare const AIPromptRunSchema: z.ZodObject<{
|
|
|
5418
5418
|
OriginalRequestStartTime: z.ZodNullable<z.ZodDate>;
|
|
5419
5419
|
TotalFailoverDuration: z.ZodNullable<z.ZodNumber>;
|
|
5420
5420
|
RerunFromPromptRunID: z.ZodNullable<z.ZodString>;
|
|
5421
|
+
ModelSelection: z.ZodNullable<z.ZodString>;
|
|
5422
|
+
Status: z.ZodUnion<[z.ZodLiteral<"Pending">, z.ZodLiteral<"Running">, z.ZodLiteral<"Completed">, z.ZodLiteral<"Failed">, z.ZodLiteral<"Cancelled">]>;
|
|
5423
|
+
Cancelled: z.ZodBoolean;
|
|
5424
|
+
CancellationReason: z.ZodNullable<z.ZodString>;
|
|
5425
|
+
ModelPowerRank: z.ZodNullable<z.ZodNumber>;
|
|
5426
|
+
SelectionStrategy: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"Default">, z.ZodLiteral<"Specific">, z.ZodLiteral<"ByPower">]>>;
|
|
5427
|
+
CacheHit: z.ZodBoolean;
|
|
5428
|
+
CacheKey: z.ZodNullable<z.ZodString>;
|
|
5429
|
+
JudgeID: z.ZodNullable<z.ZodString>;
|
|
5430
|
+
JudgeScore: z.ZodNullable<z.ZodNumber>;
|
|
5431
|
+
WasSelectedResult: z.ZodBoolean;
|
|
5432
|
+
StreamingEnabled: z.ZodBoolean;
|
|
5433
|
+
FirstTokenTime: z.ZodNullable<z.ZodNumber>;
|
|
5434
|
+
ErrorDetails: z.ZodNullable<z.ZodString>;
|
|
5421
5435
|
Prompt: z.ZodString;
|
|
5422
5436
|
Model: z.ZodString;
|
|
5423
5437
|
Vendor: z.ZodString;
|
|
5424
5438
|
Agent: z.ZodNullable<z.ZodString>;
|
|
5425
5439
|
Configuration: z.ZodNullable<z.ZodString>;
|
|
5426
5440
|
OriginalModel: z.ZodNullable<z.ZodString>;
|
|
5441
|
+
Judge: z.ZodNullable<z.ZodString>;
|
|
5427
5442
|
}, "strip", z.ZodTypeAny, {
|
|
5428
5443
|
ID?: string;
|
|
5429
5444
|
__mj_CreatedAt?: Date;
|
|
5430
5445
|
__mj_UpdatedAt?: Date;
|
|
5431
5446
|
ParentID?: string;
|
|
5447
|
+
Status?: "Pending" | "Failed" | "Running" | "Completed" | "Cancelled";
|
|
5432
5448
|
AgentID?: string;
|
|
5433
5449
|
Agent?: string;
|
|
5434
5450
|
ModelID?: string;
|
|
@@ -5436,6 +5452,7 @@ export declare const AIPromptRunSchema: z.ZodObject<{
|
|
|
5436
5452
|
ExecutionOrder?: number;
|
|
5437
5453
|
Vendor?: string;
|
|
5438
5454
|
ResponseFormat?: string;
|
|
5455
|
+
SelectionStrategy?: "Default" | "Specific" | "ByPower";
|
|
5439
5456
|
ValidationBehavior?: string;
|
|
5440
5457
|
RetryStrategy?: string;
|
|
5441
5458
|
Temperature?: number;
|
|
@@ -5456,9 +5473,11 @@ export declare const AIPromptRunSchema: z.ZodObject<{
|
|
|
5456
5473
|
Prompt?: string;
|
|
5457
5474
|
PromptID?: string;
|
|
5458
5475
|
AgentRunID?: string;
|
|
5476
|
+
Cancelled?: boolean;
|
|
5459
5477
|
CompletedAt?: Date;
|
|
5460
5478
|
Result?: string;
|
|
5461
5479
|
TotalCost?: number;
|
|
5480
|
+
CancellationReason?: string;
|
|
5462
5481
|
ExecutionTimeMS?: number;
|
|
5463
5482
|
Messages?: string;
|
|
5464
5483
|
TokensUsed?: number;
|
|
@@ -5491,12 +5510,24 @@ export declare const AIPromptRunSchema: z.ZodObject<{
|
|
|
5491
5510
|
OriginalRequestStartTime?: Date;
|
|
5492
5511
|
TotalFailoverDuration?: number;
|
|
5493
5512
|
RerunFromPromptRunID?: string;
|
|
5513
|
+
ModelSelection?: string;
|
|
5514
|
+
ModelPowerRank?: number;
|
|
5515
|
+
CacheHit?: boolean;
|
|
5516
|
+
CacheKey?: string;
|
|
5517
|
+
JudgeID?: string;
|
|
5518
|
+
JudgeScore?: number;
|
|
5519
|
+
WasSelectedResult?: boolean;
|
|
5520
|
+
StreamingEnabled?: boolean;
|
|
5521
|
+
FirstTokenTime?: number;
|
|
5522
|
+
ErrorDetails?: string;
|
|
5494
5523
|
OriginalModel?: string;
|
|
5524
|
+
Judge?: string;
|
|
5495
5525
|
}, {
|
|
5496
5526
|
ID?: string;
|
|
5497
5527
|
__mj_CreatedAt?: Date;
|
|
5498
5528
|
__mj_UpdatedAt?: Date;
|
|
5499
5529
|
ParentID?: string;
|
|
5530
|
+
Status?: "Pending" | "Failed" | "Running" | "Completed" | "Cancelled";
|
|
5500
5531
|
AgentID?: string;
|
|
5501
5532
|
Agent?: string;
|
|
5502
5533
|
ModelID?: string;
|
|
@@ -5504,6 +5535,7 @@ export declare const AIPromptRunSchema: z.ZodObject<{
|
|
|
5504
5535
|
ExecutionOrder?: number;
|
|
5505
5536
|
Vendor?: string;
|
|
5506
5537
|
ResponseFormat?: string;
|
|
5538
|
+
SelectionStrategy?: "Default" | "Specific" | "ByPower";
|
|
5507
5539
|
ValidationBehavior?: string;
|
|
5508
5540
|
RetryStrategy?: string;
|
|
5509
5541
|
Temperature?: number;
|
|
@@ -5524,9 +5556,11 @@ export declare const AIPromptRunSchema: z.ZodObject<{
|
|
|
5524
5556
|
Prompt?: string;
|
|
5525
5557
|
PromptID?: string;
|
|
5526
5558
|
AgentRunID?: string;
|
|
5559
|
+
Cancelled?: boolean;
|
|
5527
5560
|
CompletedAt?: Date;
|
|
5528
5561
|
Result?: string;
|
|
5529
5562
|
TotalCost?: number;
|
|
5563
|
+
CancellationReason?: string;
|
|
5530
5564
|
ExecutionTimeMS?: number;
|
|
5531
5565
|
Messages?: string;
|
|
5532
5566
|
TokensUsed?: number;
|
|
@@ -5559,7 +5593,18 @@ export declare const AIPromptRunSchema: z.ZodObject<{
|
|
|
5559
5593
|
OriginalRequestStartTime?: Date;
|
|
5560
5594
|
TotalFailoverDuration?: number;
|
|
5561
5595
|
RerunFromPromptRunID?: string;
|
|
5596
|
+
ModelSelection?: string;
|
|
5597
|
+
ModelPowerRank?: number;
|
|
5598
|
+
CacheHit?: boolean;
|
|
5599
|
+
CacheKey?: string;
|
|
5600
|
+
JudgeID?: string;
|
|
5601
|
+
JudgeScore?: number;
|
|
5602
|
+
WasSelectedResult?: boolean;
|
|
5603
|
+
StreamingEnabled?: boolean;
|
|
5604
|
+
FirstTokenTime?: number;
|
|
5605
|
+
ErrorDetails?: string;
|
|
5562
5606
|
OriginalModel?: string;
|
|
5607
|
+
Judge?: string;
|
|
5563
5608
|
}>;
|
|
5564
5609
|
export type AIPromptRunEntityType = z.infer<typeof AIPromptRunSchema>;
|
|
5565
5610
|
/**
|
|
@@ -23957,6 +24002,136 @@ export declare class AIPromptRunEntity extends BaseEntity<AIPromptRunEntityType>
|
|
|
23957
24002
|
get RerunFromPromptRunID(): string | null;
|
|
23958
24003
|
set RerunFromPromptRunID(value: string | null);
|
|
23959
24004
|
/**
|
|
24005
|
+
* * Field Name: ModelSelection
|
|
24006
|
+
* * Display Name: Model Selection
|
|
24007
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
24008
|
+
* * Description: JSON object containing detailed model selection information including all models considered, their scores, and the selection rationale
|
|
24009
|
+
*/
|
|
24010
|
+
get ModelSelection(): string | null;
|
|
24011
|
+
set ModelSelection(value: string | null);
|
|
24012
|
+
/**
|
|
24013
|
+
* * Field Name: Status
|
|
24014
|
+
* * Display Name: Status
|
|
24015
|
+
* * SQL Data Type: nvarchar(50)
|
|
24016
|
+
* * Default Value: Pending
|
|
24017
|
+
* * Value List Type: List
|
|
24018
|
+
* * Possible Values
|
|
24019
|
+
* * Pending
|
|
24020
|
+
* * Running
|
|
24021
|
+
* * Completed
|
|
24022
|
+
* * Failed
|
|
24023
|
+
* * Cancelled
|
|
24024
|
+
* * Description: Current execution status of the prompt run. Valid values: Pending, Running, Completed, Failed, Cancelled
|
|
24025
|
+
*/
|
|
24026
|
+
get Status(): 'Pending' | 'Running' | 'Completed' | 'Failed' | 'Cancelled';
|
|
24027
|
+
set Status(value: 'Pending' | 'Running' | 'Completed' | 'Failed' | 'Cancelled');
|
|
24028
|
+
/**
|
|
24029
|
+
* * Field Name: Cancelled
|
|
24030
|
+
* * Display Name: Cancelled
|
|
24031
|
+
* * SQL Data Type: bit
|
|
24032
|
+
* * Default Value: 0
|
|
24033
|
+
* * Description: Indicates whether this prompt run was cancelled before completion
|
|
24034
|
+
*/
|
|
24035
|
+
get Cancelled(): boolean;
|
|
24036
|
+
set Cancelled(value: boolean);
|
|
24037
|
+
/**
|
|
24038
|
+
* * Field Name: CancellationReason
|
|
24039
|
+
* * Display Name: Cancellation Reason
|
|
24040
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
24041
|
+
* * Description: Detailed reason for cancellation if the prompt run was cancelled. Could be user_requested, timeout, error, or resource_limit
|
|
24042
|
+
*/
|
|
24043
|
+
get CancellationReason(): string | null;
|
|
24044
|
+
set CancellationReason(value: string | null);
|
|
24045
|
+
/**
|
|
24046
|
+
* * Field Name: ModelPowerRank
|
|
24047
|
+
* * Display Name: Model Power Rank
|
|
24048
|
+
* * SQL Data Type: int
|
|
24049
|
+
* * Description: Power rank of the model that was selected for this run. Lower numbers indicate more powerful models
|
|
24050
|
+
*/
|
|
24051
|
+
get ModelPowerRank(): number | null;
|
|
24052
|
+
set ModelPowerRank(value: number | null);
|
|
24053
|
+
/**
|
|
24054
|
+
* * Field Name: SelectionStrategy
|
|
24055
|
+
* * Display Name: Selection Strategy
|
|
24056
|
+
* * SQL Data Type: nvarchar(50)
|
|
24057
|
+
* * Value List Type: List
|
|
24058
|
+
* * Possible Values
|
|
24059
|
+
* * Default
|
|
24060
|
+
* * Specific
|
|
24061
|
+
* * ByPower
|
|
24062
|
+
* * Description: Strategy used for model selection. Valid values: Default (system default), Specific (specific models configured), ByPower (based on power ranking)
|
|
24063
|
+
*/
|
|
24064
|
+
get SelectionStrategy(): 'Default' | 'Specific' | 'ByPower' | null;
|
|
24065
|
+
set SelectionStrategy(value: 'Default' | 'Specific' | 'ByPower' | null);
|
|
24066
|
+
/**
|
|
24067
|
+
* * Field Name: CacheHit
|
|
24068
|
+
* * Display Name: Cache Hit
|
|
24069
|
+
* * SQL Data Type: bit
|
|
24070
|
+
* * Default Value: 0
|
|
24071
|
+
* * Description: Indicates whether this result was served from cache rather than executing a new model call
|
|
24072
|
+
*/
|
|
24073
|
+
get CacheHit(): boolean;
|
|
24074
|
+
set CacheHit(value: boolean);
|
|
24075
|
+
/**
|
|
24076
|
+
* * Field Name: CacheKey
|
|
24077
|
+
* * Display Name: Cache Key
|
|
24078
|
+
* * SQL Data Type: nvarchar(500)
|
|
24079
|
+
* * Description: Unique key used for caching this prompt result, typically a hash of the prompt and parameters
|
|
24080
|
+
*/
|
|
24081
|
+
get CacheKey(): string | null;
|
|
24082
|
+
set CacheKey(value: string | null);
|
|
24083
|
+
/**
|
|
24084
|
+
* * Field Name: JudgeID
|
|
24085
|
+
* * Display Name: Judge ID
|
|
24086
|
+
* * SQL Data Type: uniqueidentifier
|
|
24087
|
+
* * Related Entity/Foreign Key: AI Prompts (vwAIPrompts.ID)
|
|
24088
|
+
* * Description: ID of the AIPrompt used as a judge to evaluate and rank multiple parallel execution results
|
|
24089
|
+
*/
|
|
24090
|
+
get JudgeID(): string | null;
|
|
24091
|
+
set JudgeID(value: string | null);
|
|
24092
|
+
/**
|
|
24093
|
+
* * Field Name: JudgeScore
|
|
24094
|
+
* * Display Name: Judge Score
|
|
24095
|
+
* * SQL Data Type: float(53)
|
|
24096
|
+
* * Description: Score assigned by the judge prompt when evaluating multiple results. Higher scores indicate better results
|
|
24097
|
+
*/
|
|
24098
|
+
get JudgeScore(): number | null;
|
|
24099
|
+
set JudgeScore(value: number | null);
|
|
24100
|
+
/**
|
|
24101
|
+
* * Field Name: WasSelectedResult
|
|
24102
|
+
* * Display Name: Was Selected Result
|
|
24103
|
+
* * SQL Data Type: bit
|
|
24104
|
+
* * Default Value: 0
|
|
24105
|
+
* * Description: Indicates whether this result was selected as the best result when multiple models were run in parallel
|
|
24106
|
+
*/
|
|
24107
|
+
get WasSelectedResult(): boolean;
|
|
24108
|
+
set WasSelectedResult(value: boolean);
|
|
24109
|
+
/**
|
|
24110
|
+
* * Field Name: StreamingEnabled
|
|
24111
|
+
* * Display Name: Streaming Enabled
|
|
24112
|
+
* * SQL Data Type: bit
|
|
24113
|
+
* * Default Value: 0
|
|
24114
|
+
* * Description: Indicates whether streaming was enabled for this prompt execution
|
|
24115
|
+
*/
|
|
24116
|
+
get StreamingEnabled(): boolean;
|
|
24117
|
+
set StreamingEnabled(value: boolean);
|
|
24118
|
+
/**
|
|
24119
|
+
* * Field Name: FirstTokenTime
|
|
24120
|
+
* * Display Name: First Token Time
|
|
24121
|
+
* * SQL Data Type: int
|
|
24122
|
+
* * Description: Time in milliseconds from request initiation to receiving the first token from the model
|
|
24123
|
+
*/
|
|
24124
|
+
get FirstTokenTime(): number | null;
|
|
24125
|
+
set FirstTokenTime(value: number | null);
|
|
24126
|
+
/**
|
|
24127
|
+
* * Field Name: ErrorDetails
|
|
24128
|
+
* * Display Name: Error Details
|
|
24129
|
+
* * SQL Data Type: nvarchar(MAX)
|
|
24130
|
+
* * Description: Detailed error information in JSON format if the prompt execution failed, including stack traces and error codes
|
|
24131
|
+
*/
|
|
24132
|
+
get ErrorDetails(): string | null;
|
|
24133
|
+
set ErrorDetails(value: string | null);
|
|
24134
|
+
/**
|
|
23960
24135
|
* * Field Name: Prompt
|
|
23961
24136
|
* * Display Name: Prompt
|
|
23962
24137
|
* * SQL Data Type: nvarchar(255)
|
|
@@ -23992,6 +24167,12 @@ export declare class AIPromptRunEntity extends BaseEntity<AIPromptRunEntityType>
|
|
|
23992
24167
|
* * SQL Data Type: nvarchar(50)
|
|
23993
24168
|
*/
|
|
23994
24169
|
get OriginalModel(): string | null;
|
|
24170
|
+
/**
|
|
24171
|
+
* * Field Name: Judge
|
|
24172
|
+
* * Display Name: Judge
|
|
24173
|
+
* * SQL Data Type: nvarchar(255)
|
|
24174
|
+
*/
|
|
24175
|
+
get Judge(): string | null;
|
|
23995
24176
|
}
|
|
23996
24177
|
/**
|
|
23997
24178
|
* MJ: AI Vendor Type Definitions - strongly typed entity sub-class
|
|
@@ -25415,6 +25596,16 @@ export declare class QueryEntity extends BaseEntity<QueryEntityType> {
|
|
|
25415
25596
|
*/
|
|
25416
25597
|
Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
|
|
25417
25598
|
/**
|
|
25599
|
+
* Queries - Delete method override to wrap in transaction since CascadeDeletes is true.
|
|
25600
|
+
* Wrapping in a transaction ensures that all cascade delete operations are handled atomically.
|
|
25601
|
+
* @public
|
|
25602
|
+
* @method
|
|
25603
|
+
* @override
|
|
25604
|
+
* @memberof QueryEntity
|
|
25605
|
+
* @returns {Promise<boolean>} - true if successful, false otherwise
|
|
25606
|
+
*/
|
|
25607
|
+
Delete(options?: EntityDeleteOptions): Promise<boolean>;
|
|
25608
|
+
/**
|
|
25418
25609
|
* * Field Name: ID
|
|
25419
25610
|
* * Display Name: ID
|
|
25420
25611
|
* * SQL Data Type: uniqueidentifier
|