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

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 (27) hide show
  1. package/dist/es/es2018/service-einsteinllm.js +2638 -1261
  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/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderInstanceConfigRepresentation.d.ts +4 -1
  24. package/package.json +4 -4
  25. package/sfdc/index.js +2938 -1546
  26. package/src/raml/api.raml +241 -1
  27. 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
@@ -856,6 +945,10 @@ types:
856
945
  required: false # TODO Hand-rolled W-18968514
857
946
  items:
858
947
  type: PromptTemplateDataProviderOutputParamRepresentation
948
+ jinjaReferenceName:
949
+ description: The Jinja format reference name for the data provider instance
950
+ type: string
951
+ required: false
859
952
  referenceName:
860
953
  description: The reference name for the data provider instance
861
954
  type: string
@@ -946,6 +1039,121 @@ types:
946
1039
  versionId:
947
1040
  description: Prompt Template Version Id
948
1041
  type: string
1042
+ EinsteinPromptTemplatePerformanceRepresentation:
1043
+ description: Performance metrics including overall latency and detailed execution
1044
+ breakdown
1045
+ type: object
1046
+ properties:
1047
+ execution:
1048
+ description: Detailed latency breakdown for all execution steps
1049
+ type: EinsteinPromptTemplateLatencyExecutionRepresentation
1050
+ latency:
1051
+ description: Overall latency metrics for the entire operation
1052
+ type: EinsteinPromptTemplateLatencyRepresentation
1053
+ EinsteinPromptTemplateLatencyBreakdownItemRepresentation:
1054
+ description: Latency breakdown item with reference name and latency metrics
1055
+ type: object
1056
+ properties:
1057
+ latency:
1058
+ description: Latency information for this breakdown item
1059
+ type: EinsteinPromptTemplateLatencyRepresentation
1060
+ referenceName:
1061
+ description: Reference name for the breakdown item
1062
+ type: string
1063
+ EinsteinPromptTemplateLatencyExecutionRepresentation:
1064
+ description: Latency execution breakdown with metrics for all execution steps
1065
+ type: object
1066
+ properties:
1067
+ generation:
1068
+ description: Latency metrics for generation step
1069
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1070
+ required: false
1071
+ hydration:
1072
+ description: Latency metrics for hydration step
1073
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1074
+ required: false
1075
+ loadTemplate:
1076
+ description: Latency metrics for loading the template
1077
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1078
+ mask:
1079
+ description: Latency metrics for masking step
1080
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1081
+ required: false
1082
+ resolveData:
1083
+ description: Latency metrics for resolving all data (inputs and data providers)
1084
+ with breakdown
1085
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1086
+ required: false
1087
+ summarize:
1088
+ description: Latency metrics for summarization step
1089
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1090
+ required: false
1091
+ EinsteinPromptTemplateLatencyRepresentation:
1092
+ description: Latency information with duration and start time
1093
+ type: object
1094
+ properties:
1095
+ duration:
1096
+ description: Duration of the operation in milliseconds
1097
+ type: integer
1098
+ startTime:
1099
+ description: Start time of the operation in milliseconds
1100
+ type: integer
1101
+ EinsteinPromptTemplateLatencyStepRepresentation:
1102
+ description: Latency step information with latency metrics and breakdown
1103
+ type: object
1104
+ properties:
1105
+ breakdown:
1106
+ description: Breakdown of latency by reference name
1107
+ type: array
1108
+ required: false
1109
+ items:
1110
+ type: EinsteinPromptTemplateLatencyBreakdownItemRepresentation
1111
+ latency:
1112
+ description: Latency information for this step
1113
+ type: EinsteinPromptTemplateLatencyRepresentation
1114
+ EinsteinPromptTemplatePromptTokenUsageRepresentation:
1115
+ description: Output representation for prompt token usage with breakdown
1116
+ type: object
1117
+ properties:
1118
+ breakdown:
1119
+ description: Breakdown of token usage by source (text expressions, files,
1120
+ etc.)
1121
+ required: false
1122
+ type: array
1123
+ items:
1124
+ type: EinsteinPromptTemplateTokenBreakdownRepresentation
1125
+ total:
1126
+ description: Total number of tokens used in the prompt
1127
+ type: integer
1128
+ EinsteinPromptTemplateTokenUsageRepresentation:
1129
+ description: Output representation for token usage and its breakdown
1130
+ type: object
1131
+ properties:
1132
+ completion:
1133
+ description: Number of tokens used for completion
1134
+ type: integer
1135
+ prompt:
1136
+ description: Prompt token usage details including breakdown by source
1137
+ type: EinsteinPromptTemplatePromptTokenUsageRepresentation
1138
+ total:
1139
+ description: Total number of tokens used in the request
1140
+ type: integer
1141
+ EinsteinPromptTemplateTokenBreakdownRepresentation:
1142
+ description: Output representation for a single token breakdown item by source
1143
+ type: object
1144
+ properties:
1145
+ occurrences:
1146
+ description: Number of times this expression appears in the prompt
1147
+ type: integer
1148
+ role:
1149
+ description: Role associated with source of token.
1150
+ type: string
1151
+ source:
1152
+ description: Specific part of prompt that contributed to tokens.
1153
+ type: string
1154
+ tokens:
1155
+ description: Number of tokens contributed by this source
1156
+ type: integer
949
1157
  WrappedListString:
950
1158
  description: Wrapped list of String for use in Apex.
951
1159
  type: object
@@ -1171,6 +1379,38 @@ types:
1171
1379
  promptTemplateDevName:
1172
1380
  type: string
1173
1381
  required: true
1382
+ /status:
1383
+ put:
1384
+ displayName: putEinsteinPromptTemplateStatus
1385
+ description: Update prompt template status (deactivate)
1386
+ responses:
1387
+ '200':
1388
+ description: Success
1389
+ body:
1390
+ application/json:
1391
+ type: EinsteinPromptTemplateStatusRepresentation
1392
+ queryParameters:
1393
+ action:
1394
+ type: string
1395
+ required: false
1396
+ uriParameters:
1397
+ promptTemplateDevName:
1398
+ type: string
1399
+ required: true
1400
+ /references:
1401
+ get:
1402
+ displayName: getEinsteinPromptTemplateReferences
1403
+ description: Get references to a Prompt Template by prompttemplate developer name or id
1404
+ responses:
1405
+ '200':
1406
+ description: Success
1407
+ body:
1408
+ application/json:
1409
+ type: EinsteinPromptTemplateReferencesRepresentation
1410
+ uriParameters:
1411
+ promptTemplateDevName:
1412
+ type: string
1413
+ required: true
1174
1414
  /versions:
1175
1415
  get:
1176
1416
  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):