@salesforce/lds-adapters-service-einsteinllm 1.414.1 → 1.416.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.
Files changed (20) hide show
  1. package/dist/es/es2018/service-einsteinllm.js +1835 -856
  2. package/dist/es/es2018/types/src/generated/adapters/getEinsteinPromptTemplateReferences.d.ts +27 -0
  3. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
  4. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -1
  5. package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesReferencesByPromptTemplateDevName.d.ts +15 -0
  6. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsInputRepresentation.d.ts +4 -1
  7. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsRepresentation.d.ts +7 -1
  8. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateLatencyBreakdownItemRepresentation.d.ts +31 -0
  9. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateLatencyExecutionRepresentation.d.ts +38 -0
  10. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateLatencyRepresentation.d.ts +31 -0
  11. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateLatencyStepRepresentation.d.ts +33 -0
  12. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplatePerformanceRepresentation.d.ts +31 -0
  13. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplatePromptTokenUsageRepresentation.d.ts +32 -0
  14. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateReferencesRepresentation.d.ts +50 -0
  15. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateTokenBreakdownRepresentation.d.ts +37 -0
  16. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateTokenUsageRepresentation.d.ts +35 -0
  17. package/package.json +4 -4
  18. package/sfdc/index.js +1680 -689
  19. package/src/raml/api.raml +176 -0
  20. package/src/raml/luvio.raml +8 -0
package/src/raml/api.raml CHANGED
@@ -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
@@ -704,6 +717,40 @@ types:
704
717
  type: array
705
718
  items:
706
719
  type: string
720
+ EinsteinPromptTemplateReferencesRepresentation:
721
+ description: Representation for prompt template references response
722
+ type: object
723
+ properties:
724
+ additionalData?: # TODO Hand-rolled W-20775798
725
+ description: Additional data, such as references
726
+ type: WrappedMap
727
+ errorMessages:
728
+ description: Error Messages
729
+ type: array
730
+ items:
731
+ type: string
732
+ hasWarning:
733
+ description: has warning messages
734
+ type: boolean
735
+ isSuccessful:
736
+ description: IsSuccessful
737
+ type: boolean
738
+ statusCode:
739
+ description: Status Code of connect api
740
+ type: string
741
+ required: false # TODO Hand-rolled W-20775798
742
+ templateId:
743
+ description: Template Id
744
+ type: string
745
+ templateType:
746
+ description: Template Type
747
+ type: string
748
+ required: false # TODO Hand-rolled W-20775798
749
+ warningMessages:
750
+ description: Warning Messages
751
+ type: array
752
+ items:
753
+ type: string
707
754
  EinsteinPromptTemplateSupportedLanguageErrorRepresentation:
708
755
  description: Representation of an error encountered when returning the Prompt Template Version Supported Languages.
709
756
  type: object
@@ -984,6 +1031,121 @@ types:
984
1031
  versionId:
985
1032
  description: Prompt Template Version Id
986
1033
  type: string
1034
+ EinsteinPromptTemplatePerformanceRepresentation:
1035
+ description: Performance metrics including overall latency and detailed execution
1036
+ breakdown
1037
+ type: object
1038
+ properties:
1039
+ execution:
1040
+ description: Detailed latency breakdown for all execution steps
1041
+ type: EinsteinPromptTemplateLatencyExecutionRepresentation
1042
+ latency:
1043
+ description: Overall latency metrics for the entire operation
1044
+ type: EinsteinPromptTemplateLatencyRepresentation
1045
+ EinsteinPromptTemplateLatencyBreakdownItemRepresentation:
1046
+ description: Latency breakdown item with reference name and latency metrics
1047
+ type: object
1048
+ properties:
1049
+ latency:
1050
+ description: Latency information for this breakdown item
1051
+ type: EinsteinPromptTemplateLatencyRepresentation
1052
+ referenceName:
1053
+ description: Reference name for the breakdown item
1054
+ type: string
1055
+ EinsteinPromptTemplateLatencyExecutionRepresentation:
1056
+ description: Latency execution breakdown with metrics for all execution steps
1057
+ type: object
1058
+ properties:
1059
+ generation:
1060
+ description: Latency metrics for generation step
1061
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1062
+ required: false
1063
+ hydration:
1064
+ description: Latency metrics for hydration step
1065
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1066
+ required: false
1067
+ loadTemplate:
1068
+ description: Latency metrics for loading the template
1069
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1070
+ mask:
1071
+ description: Latency metrics for masking step
1072
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1073
+ required: false
1074
+ resolveData:
1075
+ description: Latency metrics for resolving all data (inputs and data providers)
1076
+ with breakdown
1077
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1078
+ required: false
1079
+ summarize:
1080
+ description: Latency metrics for summarization step
1081
+ type: EinsteinPromptTemplateLatencyStepRepresentation
1082
+ required: false
1083
+ EinsteinPromptTemplateLatencyRepresentation:
1084
+ description: Latency information with duration and start time
1085
+ type: object
1086
+ properties:
1087
+ duration:
1088
+ description: Duration of the operation in milliseconds
1089
+ type: integer
1090
+ startTime:
1091
+ description: Start time of the operation in milliseconds
1092
+ type: integer
1093
+ EinsteinPromptTemplateLatencyStepRepresentation:
1094
+ description: Latency step information with latency metrics and breakdown
1095
+ type: object
1096
+ properties:
1097
+ breakdown:
1098
+ description: Breakdown of latency by reference name
1099
+ type: array
1100
+ required: false
1101
+ items:
1102
+ type: EinsteinPromptTemplateLatencyBreakdownItemRepresentation
1103
+ latency:
1104
+ description: Latency information for this step
1105
+ type: EinsteinPromptTemplateLatencyRepresentation
1106
+ EinsteinPromptTemplatePromptTokenUsageRepresentation:
1107
+ description: Output representation for prompt token usage with breakdown
1108
+ type: object
1109
+ properties:
1110
+ breakdown:
1111
+ description: Breakdown of token usage by source (text expressions, files,
1112
+ etc.)
1113
+ required: false
1114
+ type: array
1115
+ items:
1116
+ type: EinsteinPromptTemplateTokenBreakdownRepresentation
1117
+ total:
1118
+ description: Total number of tokens used in the prompt
1119
+ type: integer
1120
+ EinsteinPromptTemplateTokenUsageRepresentation:
1121
+ description: Output representation for token usage and its breakdown
1122
+ type: object
1123
+ properties:
1124
+ completion:
1125
+ description: Number of tokens used for completion
1126
+ type: integer
1127
+ prompt:
1128
+ description: Prompt token usage details including breakdown by source
1129
+ type: EinsteinPromptTemplatePromptTokenUsageRepresentation
1130
+ total:
1131
+ description: Total number of tokens used in the request
1132
+ type: integer
1133
+ EinsteinPromptTemplateTokenBreakdownRepresentation:
1134
+ description: Output representation for a single token breakdown item by source
1135
+ type: object
1136
+ properties:
1137
+ occurrences:
1138
+ description: Number of times this expression appears in the prompt
1139
+ type: integer
1140
+ role:
1141
+ description: Role associated with source of token.
1142
+ type: string
1143
+ source:
1144
+ description: Specific part of prompt that contributed to tokens.
1145
+ type: string
1146
+ tokens:
1147
+ description: Number of tokens contributed by this source
1148
+ type: integer
987
1149
  WrappedListString:
988
1150
  description: Wrapped list of String for use in Apex.
989
1151
  type: object
@@ -1227,6 +1389,20 @@ types:
1227
1389
  promptTemplateDevName:
1228
1390
  type: string
1229
1391
  required: true
1392
+ /references:
1393
+ get:
1394
+ displayName: getEinsteinPromptTemplateReferences
1395
+ description: Get references to a Prompt Template by prompttemplate developer name or id
1396
+ responses:
1397
+ '200':
1398
+ description: Success
1399
+ body:
1400
+ application/json:
1401
+ type: EinsteinPromptTemplateReferencesRepresentation
1402
+ uriParameters:
1403
+ promptTemplateDevName:
1404
+ type: string
1405
+ required: true
1230
1406
  /versions:
1231
1407
  get:
1232
1408
  displayName: getEinsteinPromptTemplateVersions
@@ -33,6 +33,9 @@ types:
33
33
  (luvio.ttl): 100
34
34
  (luvio.key):
35
35
  versionId: versionId
36
+ EinsteinPromptTemplateReferencesRepresentation:
37
+ (luvio.ttl): 100
38
+ (luvio.opaque): true
36
39
  EinsteinPromptTemplateStatusRepresentation:
37
40
  (luvio.ttl): 100
38
41
  (luvio.key):
@@ -133,6 +136,11 @@ types:
133
136
  (luvio.adapter):
134
137
  name: putEinsteinPromptTemplateStatus
135
138
 
139
+ /einstein/prompt-templates/{promptTemplateDevName}/references:
140
+ get:
141
+ (luvio.adapter):
142
+ name: getEinsteinPromptTemplateReferences
143
+
136
144
  /einstein/prompt-templates/{promptTemplateDevName}/versions/{versionId}/status:
137
145
  put:
138
146
  (luvio.adapter):