@salesforce/lds-adapters-service-einsteinllm 1.404.0-dev2 → 1.404.0-dev20

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.
Files changed (26) hide show
  1. package/dist/es/es2018/service-einsteinllm.js +2632 -1262
  2. package/dist/es/es2018/types/src/generated/adapters/getEinsteinPromptTemplateReferences.d.ts +27 -0
  3. package/dist/es/es2018/types/src/generated/adapters/putEinsteinPromptTemplateStatus.d.ts +16 -0
  4. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
  5. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +4 -1
  6. package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesReferencesByPromptTemplateDevName.d.ts +15 -0
  7. package/dist/es/es2018/types/src/generated/resources/putEinsteinPromptTemplatesStatusByPromptTemplateDevName.d.ts +15 -0
  8. package/dist/es/es2018/types/src/generated/types/EinsteinLlmGenerationGenAiCitedReferenceRepresentation.d.ts +4 -1
  9. package/dist/es/es2018/types/src/generated/types/EinsteinPromptRecordFieldRepresentation.d.ts +3 -3
  10. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateAttachmentRepresentation.d.ts +4 -1
  11. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsInputRepresentation.d.ts +4 -1
  12. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsRepresentation.d.ts +7 -1
  13. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateLatencyBreakdownItemRepresentation.d.ts +31 -0
  14. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateLatencyExecutionRepresentation.d.ts +38 -0
  15. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateLatencyRepresentation.d.ts +31 -0
  16. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateLatencyStepRepresentation.d.ts +33 -0
  17. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplatePerformanceRepresentation.d.ts +31 -0
  18. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplatePromptTokenUsageRepresentation.d.ts +32 -0
  19. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateReferencesRepresentation.d.ts +50 -0
  20. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateStatusRepresentation.d.ts +59 -0
  21. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateTokenBreakdownRepresentation.d.ts +37 -0
  22. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateTokenUsageRepresentation.d.ts +35 -0
  23. package/package.json +4 -4
  24. package/sfdc/index.js +2932 -1547
  25. package/src/raml/api.raml +237 -1
  26. package/src/raml/luvio.raml +17 -0
package/src/raml/api.raml CHANGED
@@ -356,7 +356,7 @@ types:
356
356
  type: string
357
357
  value:
358
358
  description: The value of a field in its raw data form.
359
- type: boolean | integer | string | nil
359
+ type: boolean | integer | string | string[] | nil # TODO Hand-rolled W-20480888
360
360
  EinsteinPromptRecordInputRepresentation:
361
361
  description: Input representation for creating a prompt template
362
362
  type: object
@@ -435,6 +435,10 @@ types:
435
435
  description: Additional configuration to fine tune model parameters
436
436
  type: EinsteinLlmAdditionalConfigInputRepresentation # Hand-rolled update from 'object'
437
437
  required: false # TODO Hand-rolled W-9314597
438
+ includeMetrics:
439
+ description: Whether to return metrics
440
+ type: boolean
441
+ required: false
438
442
  inputParams:
439
443
  description: Dictionary of input parameters to generate prompt from prompt
440
444
  template.
@@ -481,6 +485,11 @@ types:
481
485
  description: Any provider specific attributes will be included as part of
482
486
  this object
483
487
  type: WrappedMap | nil # Hand-rolled union 'nil'
488
+ performance:
489
+ description: Performance metrics including overall latency and detailed execution
490
+ breakdown
491
+ required: false
492
+ type: EinsteinPromptTemplatePerformanceRepresentation
484
493
  prompt:
485
494
  description: Prompt used for the generation
486
495
  type: string | nil # Hand-rolled union 'nil'
@@ -520,6 +529,10 @@ types:
520
529
  required: false # TODO Hand-rolled W-17552098
521
530
  items:
522
531
  type: EinsteinPromptTemplateAttachmentRepresentation
532
+ tokenUsage:
533
+ description: token usage information
534
+ required: false
535
+ type: EinsteinPromptTemplateTokenUsageRepresentation
523
536
  EinsteinLlmGenerationCitationRepresentation:
524
537
  description: Output of a Einstein LLM Generation Citation output
525
538
  type: object
@@ -551,6 +564,10 @@ types:
551
564
  description: Link
552
565
  type: string
553
566
  required: false # TODO Hand-rolled W-19304625
567
+ label:
568
+ description: Label
569
+ type: string
570
+ required: false
554
571
  sourceObjectApiName:
555
572
  description: SourceObjectApiName
556
573
  type: string
@@ -563,6 +580,10 @@ types:
563
580
  description: Representation of file data for prompt template attachments
564
581
  type: object
565
582
  properties:
583
+ actualFileMimeType:
584
+ description: Actual detected MIME type when file is excluded due to MIME/extension mismatch
585
+ type: string
586
+ required: false
566
587
  exclusionInfo:
567
588
  description: data for file exclusion from LLM request
568
589
  type: EinsteinPromptTemplateAttachmentExclusionInfoRepresentation
@@ -666,6 +687,74 @@ types:
666
687
  enableModeration:
667
688
  description: enable moderation value
668
689
  type: boolean
690
+ EinsteinPromptTemplateStatusRepresentation:
691
+ description: Comprehensive representation for prompt template operations including creation, updates, and activation/deactivation
692
+ type: object
693
+ properties:
694
+ additionalData?: # TODO Hand-rolled W-20775798
695
+ description: Additional data, such as references
696
+ type: WrappedMap
697
+ errorMessages:
698
+ description: Error Messages
699
+ type: array
700
+ items:
701
+ type: string
702
+ hasWarning:
703
+ description: has warning messages
704
+ type: boolean
705
+ isSuccessful:
706
+ description: IsSuccessful
707
+ type: boolean
708
+ statusCode:
709
+ description: Status Code of connect api
710
+ type: string
711
+ required: false # TODO Hand-rolled W-20775798
712
+ templateId:
713
+ description: Template Id
714
+ type: string
715
+ templateType:
716
+ description: Template Type
717
+ type: string
718
+ required: false # TODO Hand-rolled W-20775798
719
+ warningMessages:
720
+ description: Warning Messages
721
+ type: array
722
+ items:
723
+ type: string
724
+ EinsteinPromptTemplateReferencesRepresentation:
725
+ description: Representation for prompt template references response
726
+ type: object
727
+ properties:
728
+ additionalData?: # TODO Hand-rolled W-20775798
729
+ description: Additional data, such as references
730
+ type: WrappedMap
731
+ errorMessages:
732
+ description: Error Messages
733
+ type: array
734
+ items:
735
+ type: string
736
+ hasWarning:
737
+ description: has warning messages
738
+ type: boolean
739
+ isSuccessful:
740
+ description: IsSuccessful
741
+ type: boolean
742
+ statusCode:
743
+ description: Status Code of connect api
744
+ type: string
745
+ required: false # TODO Hand-rolled W-20775798
746
+ templateId:
747
+ description: Template Id
748
+ type: string
749
+ templateType:
750
+ description: Template Type
751
+ type: string
752
+ required: false # TODO Hand-rolled W-20775798
753
+ warningMessages:
754
+ description: Warning Messages
755
+ type: array
756
+ items:
757
+ type: string
669
758
  EinsteinPromptTemplateSupportedLanguageErrorRepresentation:
670
759
  description: Representation of an error encountered when returning the Prompt Template Version Supported Languages.
671
760
  type: object
@@ -946,6 +1035,121 @@ types:
946
1035
  versionId:
947
1036
  description: Prompt Template Version Id
948
1037
  type: string
1038
+ EinsteinPromptTemplatePerformanceRepresentation:
1039
+ description: Performance metrics including overall latency and detailed execution
1040
+ breakdown
1041
+ type: object
1042
+ properties:
1043
+ execution:
1044
+ description: Detailed latency breakdown for all execution steps
1045
+ type: EinsteinPromptTemplateLatencyExecutionRepresentation
1046
+ latency:
1047
+ description: Overall latency metrics for the entire operation
1048
+ type: EinsteinPromptTemplateLatencyRepresentation
1049
+ EinsteinPromptTemplateLatencyBreakdownItemRepresentation:
1050
+ description: Latency breakdown item with reference name and latency metrics
1051
+ type: object
1052
+ properties:
1053
+ latency:
1054
+ description: Latency information for this breakdown item
1055
+ type: EinsteinPromptTemplateLatencyRepresentation
1056
+ referenceName:
1057
+ description: Reference name for the breakdown item
1058
+ type: string
1059
+ EinsteinPromptTemplateLatencyExecutionRepresentation:
1060
+ description: Latency execution breakdown with metrics for all execution steps
1061
+ type: object
1062
+ properties:
1063
+ generation:
1064
+ description: Latency metrics for generation step
1065
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1066
+ required: false
1067
+ hydration:
1068
+ description: Latency metrics for hydration step
1069
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1070
+ required: false
1071
+ loadTemplate:
1072
+ description: Latency metrics for loading the template
1073
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1074
+ mask:
1075
+ description: Latency metrics for masking step
1076
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1077
+ required: false
1078
+ resolveData:
1079
+ description: Latency metrics for resolving all data (inputs and data providers)
1080
+ with breakdown
1081
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1082
+ required: false
1083
+ summarize:
1084
+ description: Latency metrics for summarization step
1085
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1086
+ required: false
1087
+ EinsteinPromptTemplateLatencyRepresentation:
1088
+ description: Latency information with duration and start time
1089
+ type: object
1090
+ properties:
1091
+ duration:
1092
+ description: Duration of the operation in milliseconds
1093
+ type: integer
1094
+ startTime:
1095
+ description: Start time of the operation in milliseconds
1096
+ type: integer
1097
+ EinsteinPromptTemplateLatencyStepRepresentation:
1098
+ description: Latency step information with latency metrics and breakdown
1099
+ type: object
1100
+ properties:
1101
+ breakdown:
1102
+ description: Breakdown of latency by reference name
1103
+ type: array
1104
+ required: false
1105
+ items:
1106
+ type: EinsteinPromptTemplateLatencyBreakdownItemRepresentation
1107
+ latency:
1108
+ description: Latency information for this step
1109
+ type: EinsteinPromptTemplateLatencyRepresentation
1110
+ EinsteinPromptTemplatePromptTokenUsageRepresentation:
1111
+ description: Output representation for prompt token usage with breakdown
1112
+ type: object
1113
+ properties:
1114
+ breakdown:
1115
+ description: Breakdown of token usage by source (text expressions, files,
1116
+ etc.)
1117
+ required: false
1118
+ type: array
1119
+ items:
1120
+ type: EinsteinPromptTemplateTokenBreakdownRepresentation
1121
+ total:
1122
+ description: Total number of tokens used in the prompt
1123
+ type: integer
1124
+ EinsteinPromptTemplateTokenUsageRepresentation:
1125
+ description: Output representation for token usage and its breakdown
1126
+ type: object
1127
+ properties:
1128
+ completion:
1129
+ description: Number of tokens used for completion
1130
+ type: integer
1131
+ prompt:
1132
+ description: Prompt token usage details including breakdown by source
1133
+ type: EinsteinPromptTemplatePromptTokenUsageRepresentation
1134
+ total:
1135
+ description: Total number of tokens used in the request
1136
+ type: integer
1137
+ EinsteinPromptTemplateTokenBreakdownRepresentation:
1138
+ description: Output representation for a single token breakdown item by source
1139
+ type: object
1140
+ properties:
1141
+ occurrences:
1142
+ description: Number of times this expression appears in the prompt
1143
+ type: integer
1144
+ role:
1145
+ description: Role associated with source of token.
1146
+ type: string
1147
+ source:
1148
+ description: Specific part of prompt that contributed to tokens.
1149
+ type: string
1150
+ tokens:
1151
+ description: Number of tokens contributed by this source
1152
+ type: integer
949
1153
  WrappedListString:
950
1154
  description: Wrapped list of String for use in Apex.
951
1155
  type: object
@@ -1171,6 +1375,38 @@ types:
1171
1375
  promptTemplateDevName:
1172
1376
  type: string
1173
1377
  required: true
1378
+ /status:
1379
+ put:
1380
+ displayName: putEinsteinPromptTemplateStatus
1381
+ description: Update prompt template status (deactivate)
1382
+ responses:
1383
+ '200':
1384
+ description: Success
1385
+ body:
1386
+ application/json:
1387
+ type: EinsteinPromptTemplateStatusRepresentation
1388
+ queryParameters:
1389
+ action:
1390
+ type: string
1391
+ required: false
1392
+ uriParameters:
1393
+ promptTemplateDevName:
1394
+ type: string
1395
+ required: true
1396
+ /references:
1397
+ get:
1398
+ displayName: getEinsteinPromptTemplateReferences
1399
+ description: Get references to a Prompt Template by prompttemplate developer name or id
1400
+ responses:
1401
+ '200':
1402
+ description: Success
1403
+ body:
1404
+ application/json:
1405
+ type: EinsteinPromptTemplateReferencesRepresentation
1406
+ uriParameters:
1407
+ promptTemplateDevName:
1408
+ type: string
1409
+ required: true
1174
1410
  /versions:
1175
1411
  get:
1176
1412
  displayName: getEinsteinPromptTemplateVersions
@@ -33,6 +33,13 @@ types:
33
33
  (luvio.ttl): 100
34
34
  (luvio.key):
35
35
  versionId: versionId
36
+ EinsteinPromptTemplateReferencesRepresentation:
37
+ (luvio.ttl): 100
38
+ (luvio.opaque): true
39
+ EinsteinPromptTemplateStatusRepresentation:
40
+ (luvio.ttl): 100
41
+ (luvio.key):
42
+ templateId: templateId
36
43
  PromptTemplateDataProviderInstanceConfigCollectionRepresentation:
37
44
  (luvio.ttl): 300
38
45
  (luvio.opaque): true
@@ -124,6 +131,16 @@ types:
124
131
  (luvio.adapter):
125
132
  name: createEmbeddings
126
133
 
134
+ /einstein/prompt-templates/{promptTemplateDevName}/status:
135
+ put:
136
+ (luvio.adapter):
137
+ name: putEinsteinPromptTemplateStatus
138
+
139
+ /einstein/prompt-templates/{promptTemplateDevName}/references:
140
+ get:
141
+ (luvio.adapter):
142
+ name: getEinsteinPromptTemplateReferences
143
+
127
144
  /einstein/prompt-templates/{promptTemplateDevName}/versions/{versionId}/status:
128
145
  put:
129
146
  (luvio.adapter):